Enabled placeholders to be used for custom directives

Placeholders will now work for the input-inline, user-typeahead and
project-typeahead directives.

Placeholders have been added for the 'Add task' functionality as found
on individual story pages.

Change-Id: I493950aeab366318c38bc562338ca8e92f2eb7ab
This commit is contained in:
Elizabeth Elwell 2016-05-10 15:56:58 +01:00
parent 10c54bab47
commit c72ebca94f
7 changed files with 12 additions and 4 deletions

View File

@ -482,6 +482,7 @@
empty-disabled-prompt="Not assigned."
maxlength="255"
as-inline="false"
placeholder="Enter task name"
/>
</td>
<td class="col-xs-1">
@ -496,6 +497,7 @@
empty-prompt="Click to assign."
empty-disabled-prompt="Not assigned."
as-inline="false"
placeholder="Enter project name"
/>
</td>
<td class="col-xs-2">
@ -507,6 +509,7 @@
empty-prompt="Click to assign."
empty-disabled-prompt="Not assigned."
as-inline="false"
placeholder="Assign user to task"
/>
</td>
<td class="text-center col-xs-1">

View File

@ -32,7 +32,8 @@ angular.module('sb.util').directive('inputInline',
onChange: '&',
emptyPrompt: '@',
emptyDisabledPrompt: '@',
maxLength: '='
maxLength: '=',
placeholder: '@placeholder'
},
link: function ($scope, element, attrs, ngModel) {
/**

View File

@ -31,7 +31,8 @@ angular.module('sb.util').directive('projectTypeahead',
autoFocus: '=',
onChange: '&',
emptyPrompt: '@',
emptyDisabledPrompt: '@'
emptyDisabledPrompt: '@',
placeholder: '@placeholder'
},
link: function ($scope, element, attrs, ngModel) {
/**

View File

@ -33,7 +33,8 @@ angular.module('sb.util').directive('userTypeahead',
onBlur: '&',
onFocus: '&',
emptyPrompt: '@',
emptyDisabledPrompt: '@'
emptyDisabledPrompt: '@',
placeholder: '@placeholder'
},
link: function ($scope, element, attrs, ngModel) {
/**

View File

@ -1,7 +1,6 @@
<div class="form-group"
ng-if="!enabled || !showForm">
<p class="form-control-static">
<a href=""
ng-focus="toggleForm()"
@ -36,4 +35,5 @@
focus="autoFocus"
ng-blur="onInputBlur(inputText)"
ng-model="inputText"
placeholder="{{placeholder}}"
maxlength="{{maxLength}}"/>

View File

@ -48,6 +48,7 @@
typeahead-loading="loadingProjects"
typeahead-input-formatter="formatProjectName($model)"
typeahead-on-select="updateViewValue($model.id);"
placeholder="{{placeholder}}"
ng-model="selectedProject"/>
<span class="form-control-feedback text-muted">

View File

@ -50,6 +50,7 @@
typeahead-loading="loadingUsers"
typeahead-input-formatter="formatUserName($model)"
typeahead-on-select="updateViewValue($model.id);"
placeholder="{{placeholder}}"
ng-model="selectedUser"/>
<span class="form-control-feedback text-muted">