Abbreviate name of the WP accessible attribute directive

pull/4078/head
Alex Dik 9 years ago
parent f8f24e4097
commit 7769e55916
  1. 4
      frontend/app/components/inplace-edit/directives/field-display/display-spent-time/display-spent-time.directive.html
  2. 4
      frontend/app/components/inplace-edit/directives/field-display/display-version/display-version.directive.html
  3. 4
      frontend/app/components/work-packages/wp-accessible-attribute/wp-accessible-attribute.directive.test.ts
  4. 6
      frontend/app/components/work-packages/wp-accessible-attribute/wp-accessible-attribute.directive.ts
  5. 2
      frontend/app/templates/inplace-edit/display/fields/boolean.html
  6. 2
      frontend/app/templates/inplace-edit/display/fields/date-range.html
  7. 2
      frontend/app/templates/inplace-edit/display/fields/embedded.html
  8. 4
      frontend/app/templates/inplace-edit/display/fields/text.html
  9. 2
      frontend/app/templates/inplace-edit/display/fields/wiki-textarea.html

@ -1,6 +1,6 @@
<div class="spent-time-wrapper">
<span ng-if="field.isEmpty()"
work-package-accessible-attribute="field">
wp-accessible-attribute="field">
{{ field.placeholder }}
</span>
<span ng-if="!field.isEmpty()">
@ -11,7 +11,7 @@
</a>
</span>
<span ng-if="!customEditorController.isLinkViewable()"
work-package-accessible-attribute="field">
wp-accessible-attribute="field">
{{ field.text }}
</span>
</span>

@ -1,6 +1,6 @@
<div class="version-wrapper">
<span ng-if="!field.text"
work-package-accessible-attribute="field">
wp-accessible-attribute="field">
{{field.placeholder}}
</span>
<span ng-if="field.text && customEditorController.isVersionLinkViewable()">
@ -10,7 +10,7 @@
</a>
</span>
<span ng-if="field.text && !customEditorController.isVersionLinkViewable()"
work-package-accessible-attribute="field">
wp-accessible-attribute="field">
{{field.text.props.name}}
</span>
</div>

@ -26,8 +26,8 @@
// See doc/COPYRIGHT.rdoc for more details.
//++
describe('workPackageAccessibleAttributeDirective', function() {
var html = '<div work-package-accessible-attribute="field"></div>';
describe('wpAccessibleAttributeDirective', function() {
var html = '<div wp-accessible-attribute="field"></div>';
var scope, element, $compile;
beforeEach(angular.mock.module('openproject.workPackages.directives'));

@ -26,11 +26,11 @@
// See doc/COPYRIGHT.rdoc for more details.
//++
function workPackageAccessibleAttribute() {
function wpAccessibleAttribute() {
return {
restrict: 'A',
scope: {
field: '=workPackageAccessibleAttribute'
field: '=wpAccessibleAttribute'
},
link: function(scope, element) {
@ -50,4 +50,4 @@ function workPackageAccessibleAttribute() {
angular
.module('openproject.workPackages.directives')
.directive('workPackageAccessibleAttribute', workPackageAccessibleAttribute);
.directive('wpAccessibleAttribute', wpAccessibleAttribute);

@ -1,2 +1,2 @@
<span ng-bind="field.text"
work-package-accessible-attribute="field"></span>
wp-accessible-attribute="field"></span>

@ -1,4 +1,4 @@
<span work-package-accessible-attribute="field">
<span wp-accessible-attribute="field">
<op-date date-value="field.text.startDate" no-date-text="field.text.noStartDate"></op-date>
&nbsp;&nbsp;-&nbsp;&nbsp;
<op-date date-value="field.text.dueDate" no-date-text="field.text.noEndDate"></op-date>

@ -1,2 +1,2 @@
<span work-package-accessible-attribute="field"
<span wp-accessible-attribute="field"
ng-bind="field.text.props.name || field.text.props.value || field.placeholder"></span>

@ -1,6 +1,6 @@
<span ng-if="field.isEmpty()"
ng-bind="field.placeholder"
work-package-accessible-attribute="field"></span>
wp-accessible-attribute="field"></span>
<span ng-if="!field.isEmpty()"
ng-bind="field.text"
work-package-accessible-attribute="field"></span>
wp-accessible-attribute="field"></span>

@ -1,2 +1,2 @@
<span ng-bind-html="field.text.html || field.placeholder"
work-package-accessible-attribute="field"></span>
wp-accessible-attribute="field"></span>

Loading…
Cancel
Save