add ng-placeholder directives
This commit is contained in:
parent
4fef60a671
commit
63e87b3f35
|
@ -109,7 +109,7 @@
|
||||||
<div class="navbar-searchbar hidden-xs">
|
<div class="navbar-searchbar hidden-xs">
|
||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nav">
|
||||||
<li>
|
<li>
|
||||||
<input class="form-control" placeholder="{{('Search' | translate)}}" ng-model="searchContext.text" />
|
<input class="form-control" ng-placeholder="('Search' | translate)" ng-model="searchContext.text" />
|
||||||
<div class="form-control-icon">
|
<div class="form-control-icon">
|
||||||
<span class="fa fa-search form-control-feedback"></span>
|
<span class="fa fa-search form-control-feedback"></span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -257,6 +257,7 @@
|
||||||
<script src="scripts/controllers/settings-ariang.js"></script>
|
<script src="scripts/controllers/settings-ariang.js"></script>
|
||||||
<script src="scripts/controllers/status.js"></script>
|
<script src="scripts/controllers/status.js"></script>
|
||||||
<script src="scripts/controllers/task-detail.js"></script>
|
<script src="scripts/controllers/task-detail.js"></script>
|
||||||
|
<script src="scripts/directives/placeholder.js"></script>
|
||||||
<script src="scripts/filters/dateDuration.js"></script>
|
<script src="scripts/filters/dateDuration.js"></script>
|
||||||
<script src="scripts/filters/filename.js"></script>
|
<script src="scripts/filters/filename.js"></script>
|
||||||
<script src="scripts/filters/fileOrderBy.js"></script>
|
<script src="scripts/filters/fileOrderBy.js"></script>
|
||||||
|
|
17
app/scripts/directives/placeholder.js
Normal file
17
app/scripts/directives/placeholder.js
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
(function () {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
angular.module("ariaNg").directive('ngPlaceholder', function () {
|
||||||
|
return {
|
||||||
|
restrict: 'A',
|
||||||
|
scope: {
|
||||||
|
placeholder: '=ngPlaceholder'
|
||||||
|
},
|
||||||
|
link: function (scope, elem, attr) {
|
||||||
|
scope.$watch('placeholder', function () {
|
||||||
|
elem[0].placeholder = scope.placeholder;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})();
|
Reference in a new issue