diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-09-11 03:55:52 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-09-11 03:55:52 +0200 |
commit | ea9ebd4826fe9807af5bc17e786b3dc58f163970 (patch) | |
tree | 2894b40614ebe977797cea5745b215e2a2851f61 /js/directive/AppNavigationEntryUtils.js | |
parent | 594b92f649d8ed8a705f1af23639463078170d46 (diff) |
port to es5 and add es6 shims for object prototypes instead
Diffstat (limited to 'js/directive/AppNavigationEntryUtils.js')
-rw-r--r-- | js/directive/AppNavigationEntryUtils.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/js/directive/AppNavigationEntryUtils.js b/js/directive/AppNavigationEntryUtils.js index 146d0f22a..c96589a6a 100644 --- a/js/directive/AppNavigationEntryUtils.js +++ b/js/directive/AppNavigationEntryUtils.js @@ -7,27 +7,27 @@ * @author Bernhard Posselt <dev@bernhard-posselt.com> * @copyright Bernhard Posselt 2014 */ -app.run(($document, $rootScope) => { +app.run(function ($document, $rootScope) { 'use strict'; - $document.click((event) => { + $document.click(function (event) { $rootScope.$broadcast('documentClicked', event); }); }); -app.directive('appNavigationEntryUtils', () => { +app.directive('appNavigationEntryUtils', function () { 'use strict'; return { restrict: 'C', - link: (scope, elm) => { - let menu = elm.siblings('.app-navigation-entry-menu'); - let button = $(elm) + link: function (scope, elm) { + var menu = elm.siblings('.app-navigation-entry-menu'); + var button = $(elm) .find('.app-navigation-entry-utils-menu-button button'); - button.click(() => { + button.click(function () { menu.toggleClass('open'); }); - scope.$on('documentClicked', (scope, event) => { + scope.$on('documentClicked', function (scope, event) { if (event.target !== button[0]) { menu.removeClass('open'); } |