From ea9ebd4826fe9807af5bc17e786b3dc58f163970 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Thu, 11 Sep 2014 03:55:52 +0200 Subject: port to es5 and add es6 shims for object prototypes instead --- js/directive/AppNavigationEntryUtils.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'js/directive/AppNavigationEntryUtils.js') 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 * @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'); } -- cgit v1.2.3