summaryrefslogtreecommitdiffstats
path: root/js/directive/NewsFocus.js
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-09-11 03:55:52 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-09-11 03:55:52 +0200
commitea9ebd4826fe9807af5bc17e786b3dc58f163970 (patch)
tree2894b40614ebe977797cea5745b215e2a2851f61 /js/directive/NewsFocus.js
parent594b92f649d8ed8a705f1af23639463078170d46 (diff)
port to es5 and add es6 shims for object prototypes instead
Diffstat (limited to 'js/directive/NewsFocus.js')
-rw-r--r--js/directive/NewsFocus.js10
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);
});