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:
parent
10c54bab47
commit
c72ebca94f
@ -482,6 +482,7 @@
|
|||||||
empty-disabled-prompt="Not assigned."
|
empty-disabled-prompt="Not assigned."
|
||||||
maxlength="255"
|
maxlength="255"
|
||||||
as-inline="false"
|
as-inline="false"
|
||||||
|
placeholder="Enter task name"
|
||||||
/>
|
/>
|
||||||
</td>
|
</td>
|
||||||
<td class="col-xs-1">
|
<td class="col-xs-1">
|
||||||
@ -496,6 +497,7 @@
|
|||||||
empty-prompt="Click to assign."
|
empty-prompt="Click to assign."
|
||||||
empty-disabled-prompt="Not assigned."
|
empty-disabled-prompt="Not assigned."
|
||||||
as-inline="false"
|
as-inline="false"
|
||||||
|
placeholder="Enter project name"
|
||||||
/>
|
/>
|
||||||
</td>
|
</td>
|
||||||
<td class="col-xs-2">
|
<td class="col-xs-2">
|
||||||
@ -507,6 +509,7 @@
|
|||||||
empty-prompt="Click to assign."
|
empty-prompt="Click to assign."
|
||||||
empty-disabled-prompt="Not assigned."
|
empty-disabled-prompt="Not assigned."
|
||||||
as-inline="false"
|
as-inline="false"
|
||||||
|
placeholder="Assign user to task"
|
||||||
/>
|
/>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-center col-xs-1">
|
<td class="text-center col-xs-1">
|
||||||
|
@ -32,7 +32,8 @@ angular.module('sb.util').directive('inputInline',
|
|||||||
onChange: '&',
|
onChange: '&',
|
||||||
emptyPrompt: '@',
|
emptyPrompt: '@',
|
||||||
emptyDisabledPrompt: '@',
|
emptyDisabledPrompt: '@',
|
||||||
maxLength: '='
|
maxLength: '=',
|
||||||
|
placeholder: '@placeholder'
|
||||||
},
|
},
|
||||||
link: function ($scope, element, attrs, ngModel) {
|
link: function ($scope, element, attrs, ngModel) {
|
||||||
/**
|
/**
|
||||||
|
@ -31,7 +31,8 @@ angular.module('sb.util').directive('projectTypeahead',
|
|||||||
autoFocus: '=',
|
autoFocus: '=',
|
||||||
onChange: '&',
|
onChange: '&',
|
||||||
emptyPrompt: '@',
|
emptyPrompt: '@',
|
||||||
emptyDisabledPrompt: '@'
|
emptyDisabledPrompt: '@',
|
||||||
|
placeholder: '@placeholder'
|
||||||
},
|
},
|
||||||
link: function ($scope, element, attrs, ngModel) {
|
link: function ($scope, element, attrs, ngModel) {
|
||||||
/**
|
/**
|
||||||
|
@ -33,7 +33,8 @@ angular.module('sb.util').directive('userTypeahead',
|
|||||||
onBlur: '&',
|
onBlur: '&',
|
||||||
onFocus: '&',
|
onFocus: '&',
|
||||||
emptyPrompt: '@',
|
emptyPrompt: '@',
|
||||||
emptyDisabledPrompt: '@'
|
emptyDisabledPrompt: '@',
|
||||||
|
placeholder: '@placeholder'
|
||||||
},
|
},
|
||||||
link: function ($scope, element, attrs, ngModel) {
|
link: function ($scope, element, attrs, ngModel) {
|
||||||
/**
|
/**
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
|
|
||||||
<div class="form-group"
|
<div class="form-group"
|
||||||
ng-if="!enabled || !showForm">
|
ng-if="!enabled || !showForm">
|
||||||
|
|
||||||
<p class="form-control-static">
|
<p class="form-control-static">
|
||||||
<a href=""
|
<a href=""
|
||||||
ng-focus="toggleForm()"
|
ng-focus="toggleForm()"
|
||||||
@ -36,4 +35,5 @@
|
|||||||
focus="autoFocus"
|
focus="autoFocus"
|
||||||
ng-blur="onInputBlur(inputText)"
|
ng-blur="onInputBlur(inputText)"
|
||||||
ng-model="inputText"
|
ng-model="inputText"
|
||||||
|
placeholder="{{placeholder}}"
|
||||||
maxlength="{{maxLength}}"/>
|
maxlength="{{maxLength}}"/>
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
typeahead-loading="loadingProjects"
|
typeahead-loading="loadingProjects"
|
||||||
typeahead-input-formatter="formatProjectName($model)"
|
typeahead-input-formatter="formatProjectName($model)"
|
||||||
typeahead-on-select="updateViewValue($model.id);"
|
typeahead-on-select="updateViewValue($model.id);"
|
||||||
|
placeholder="{{placeholder}}"
|
||||||
ng-model="selectedProject"/>
|
ng-model="selectedProject"/>
|
||||||
|
|
||||||
<span class="form-control-feedback text-muted">
|
<span class="form-control-feedback text-muted">
|
||||||
|
@ -50,6 +50,7 @@
|
|||||||
typeahead-loading="loadingUsers"
|
typeahead-loading="loadingUsers"
|
||||||
typeahead-input-formatter="formatUserName($model)"
|
typeahead-input-formatter="formatUserName($model)"
|
||||||
typeahead-on-select="updateViewValue($model.id);"
|
typeahead-on-select="updateViewValue($model.id);"
|
||||||
|
placeholder="{{placeholder}}"
|
||||||
ng-model="selectedUser"/>
|
ng-model="selectedUser"/>
|
||||||
|
|
||||||
<span class="form-control-feedback text-muted">
|
<span class="form-control-feedback text-muted">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user