From ff876266cf630e2a981ffe9021aacf5306d51252 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Tue, 19 Jan 2016 13:50:50 +0100 Subject: [PATCH] Fixes: U4-7775 Ctrl + S doesn't work in new document type editor --- .../common/services/contenteditinghelper.service.js | 12 +++--------- .../views/components/buttons/umb-button-group.html | 5 +++-- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/services/contenteditinghelper.service.js b/src/Umbraco.Web.UI.Client/src/common/services/contenteditinghelper.service.js index 4a690bf0c5..7d21ed6351 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/contenteditinghelper.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/contenteditinghelper.service.js @@ -5,7 +5,7 @@ * @description A helper service for most editors, some methods are specific to content/media/member model types but most are used by * all editors to share logic and reduce the amount of replicated code among editors. **/ -function contentEditingHelper(fileManager, $q, $location, $routeParams, notificationsService, serverValidationManager, dialogService, formHelper, appState, keyboardService) { +function contentEditingHelper(fileManager, $q, $location, $routeParams, notificationsService, serverValidationManager, dialogService, formHelper, appState) { function isValidIdentifier(id){ //empty id <= 0 @@ -128,8 +128,6 @@ function contentEditingHelper(fileManager, $q, $location, $routeParams, notifica switch (ch) { case "U": //publish action - keyboardService.bind("ctrl+p", args.methods.saveAndPublish); - return { letter: ch, labelKey: "buttons_saveAndPublish", @@ -138,8 +136,6 @@ function contentEditingHelper(fileManager, $q, $location, $routeParams, notifica }; case "H": //send to publish - keyboardService.bind("ctrl+p", args.methods.sendToPublish); - return { letter: ch, labelKey: "buttons_saveToPublish", @@ -148,7 +144,6 @@ function contentEditingHelper(fileManager, $q, $location, $routeParams, notifica }; case "A": //save - keyboardService.bind("ctrl+s", args.methods.save); return { letter: ch, labelKey: "buttons_save", @@ -157,12 +152,11 @@ function contentEditingHelper(fileManager, $q, $location, $routeParams, notifica }; case "Z": //unpublish - keyboardService.bind("ctrl+u", args.methods.unPublish); - return { letter: ch, labelKey: "content_unPublish", - handler: args.methods.unPublish + handler: args.methods.unPublish, + hotKey: "ctrl+u" }; default: return null; diff --git a/src/Umbraco.Web.UI.Client/src/views/components/buttons/umb-button-group.html b/src/Umbraco.Web.UI.Client/src/views/components/buttons/umb-button-group.html index 087865a501..b6d266e784 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/buttons/umb-button-group.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/buttons/umb-button-group.html @@ -6,7 +6,8 @@ button-style="success" state="state" label="{{defaultButton.labelKey}}" - label-key="{{defaultButton.labelKey}}"> + label-key="{{defaultButton.labelKey}}" + shortcut="{{defaultButton.hotKey}}"> @@ -15,7 +16,7 @@