diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-07-10 18:40:59 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-07-11 15:31:29 +0200 |
commit | 75f0d3c093de01365f85e8e3035291d9a9a8c889 (patch) | |
tree | b84b25a2e6eb16c00a74fd6db8b0f446ef661a03 /js/components/focus_directive.js | |
parent | 3f3ad0eeb8e01fe725a89ad196d23f22ad33de41 (diff) |
Vue cleanup and init
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'js/components/focus_directive.js')
-rw-r--r-- | js/components/focus_directive.js | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/js/components/focus_directive.js b/js/components/focus_directive.js deleted file mode 100644 index d82665ce..00000000 --- a/js/components/focus_directive.js +++ /dev/null @@ -1,23 +0,0 @@ -angular.module('contactsApp') -.directive('focusExpression', function ($timeout) { - return { - restrict: 'A', - link: { - post: function postLink(scope, element, attrs) { - scope.$watch(attrs.focusExpression, function () { - if (attrs.focusExpression) { - if (scope.$eval(attrs.focusExpression)) { - $timeout(function () { - if (element.is('input')) { - element.focus(); - } else { - element.find('input').focus(); - } - }, 100); //need some delay to work with ng-disabled - } - } - }); - } - } - }; -}); |