mapping
7 years ago
angular-chosen.directive.js
7 years ago
attributes.service.js
7 years ago
autodetect.directive.js
7 years ago
cascade.directive.js
7 years ago
contenteditable.directive.js
7 years ago
currency.service.js
7 years ago
droppable.directive.js
7 years ago
export.service.js
7 years ago
focusMeWhenEnabled.directive.js
7 years ago
googleCategoriesService.js
7 years ago
main.controller.js
7 years ago
styledInput.directive.js
7 years ago
template.service.js
7 years ago
tipsy.directive.js
7 years ago
wpHttp.service.js
7 years ago
focusMeWhenEnabled.directive.js
16 lines
| 1 | GoogleMerchants.directive('focusMeWhenEnabled', function($timeout) { |
| 2 | return { |
| 3 | priority: -1, |
| 4 | link: function(scope, element) { |
| 5 | scope.$watch(function() { |
| 6 | return scope.$eval(element.attr('ng-disabled')); //this will evaluate attribute value `{{}}`` |
| 7 | }, function(newValue){ |
| 8 | if(newValue == false) { |
| 9 | $timeout(function(){ |
| 10 | element[0].focus(); |
| 11 | }); |
| 12 | } |
| 13 | }); |
| 14 | } |
| 15 | }; |
| 16 | }); |