From 69a0de20d7c2ff8bc1f0f2762f86426f689ab2ca Mon Sep 17 00:00:00 2001 From: perploug Date: Wed, 23 Oct 2013 09:20:03 +0200 Subject: [PATCH] Adds global "esc" hotkey to close all open dialogs --- .../src/views/common/navigation.controller.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Umbraco.Web.UI.Client/src/views/common/navigation.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/navigation.controller.js index d9e7a8c97b..8947349f84 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/navigation.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/navigation.controller.js @@ -37,6 +37,12 @@ function NavigationController($scope,$rootScope, $location, $log, $routeParams, $scope.nav.showSearch(); }); + //trigger dialogs closing with a hotkey: + keyboardService.bind("esc", function(){ + $rootScope.$emit("closeDialogs"); + }); + + $scope.selectedId = navigationService.currentId; //This reacts to clicks passed to the body element which emits a global call to close all dialogs