diff options
Diffstat (limited to 'js/directive/NewsFocus.js')
-rw-r--r-- | js/directive/NewsFocus.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/js/directive/NewsFocus.js b/js/directive/NewsFocus.js index f5133fd20..5c83db4f5 100644 --- a/js/directive/NewsFocus.js +++ b/js/directive/NewsFocus.js @@ -7,13 +7,13 @@ * @author Bernhard Posselt <dev@bernhard-posselt.com> * @copyright Bernhard Posselt 2014 */ -app.directive('newsFocus', ($timeout, $interpolate) => { +app.directive('newsFocus', function ($timeout, $interpolate) { 'use strict'; - return (scope, elem, attrs) => { - elem.click(() => { - let toReadd = $($interpolate(attrs.newsFocus)(scope)); - $timeout(() => { + return function (scope, elem, attrs) { + elem.click(function () { + var toReadd = $($interpolate(attrs.newsFocus)(scope)); + $timeout(function () { toReadd.focus(); }, 500); }); |