Fixes: U4-7775 Ctrl + S doesn't work in new document type editor

This commit is contained in:
Mads Rasmussen
2016-01-19 13:50:50 +01:00
parent 9f360c2b9b
commit ff876266cf
2 changed files with 6 additions and 11 deletions

View File

@@ -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;

View File

@@ -6,7 +6,8 @@
button-style="success"
state="state"
label="{{defaultButton.labelKey}}"
label-key="{{defaultButton.labelKey}}">
label-key="{{defaultButton.labelKey}}"
shortcut="{{defaultButton.hotKey}}">
</umb-button>
<a class="btn btn-success dropdown-toggle umb-button-group__toggle" data-toggle="dropdown" ng-if="subButtons.length > 0">
@@ -15,7 +16,7 @@
<ul aria-labelledby="dLabel" class="dropdown-menu bottom-up umb-button-group__sub-buttons" ng-if="subButtons.length > 0" role="menu" ng-class="{'-align-right': float === 'right'}">
<li ng-repeat="subButton in subButtons">
<a href="#" ng-click="subButton.handler()" prevent-default>
<a href="#" ng-click="subButton.handler()" hotkey="{{subButton.hotKey}}" prevent-default>
<localize key="{{subButton.labelKey}}">{{subButton.labelKey}}</localize>
</a>
</li>