diff --git a/web-ui/src/main/resources/catalog/js/edit/EditorBoardController.js b/web-ui/src/main/resources/catalog/js/edit/EditorBoardController.js index 4f21dd604e9..398fa048221 100644 --- a/web-ui/src/main/resources/catalog/js/edit/EditorBoardController.js +++ b/web-ui/src/main/resources/catalog/js/edit/EditorBoardController.js @@ -219,42 +219,54 @@ combo: 'd', description: $translate.instant('hotkeyDirectory'), callback: function(event) { - $location.path('/directory'); + if ($location.path().indexOf("/metadata/") !== 0) { + $location.path('/directory'); + } } }).add({ combo: 'i', description: $translate.instant('hotkeyImportRecord'), callback: function(event) { - $location.path('/import'); + if ($location.path().indexOf("/metadata/") !== 0) { + $location.path('/import'); + } } }).add({ combo: 'r', description: $translate.instant('hotkeyAccessManager'), callback: function(event) { - $location.path('/accessManager'); + if ($location.path().indexOf("/metadata/") !== 0) { + $location.path('/accessManager'); + } } }).add({ combo: 'h', description: $translate.instant('hotkeyEditorBoard'), callback: function(event) { - $location.path('/board'); + if ($location.path().indexOf("/metadata/") !== 0) { + $location.path('/board'); + } } }).add({ combo: '+', description: $translate.instant('hotkeyAddRecord'), callback: function(event) { - $location.path('/create'); + if ($location.path().indexOf("/metadata/") !== 0) { + $location.path('/create'); + } } }).add({ combo: 't', description: $translate.instant('hotkeyFocusToSearch'), callback: function(event) { - event.preventDefault(); - var anyField = $('#gn-any-field'); - if (anyField) { - gnUtilityService.scrollTo(); - $location.path('/board'); - anyField.focus(); + if ($location.path().indexOf("/metadata/") !== 0) { + event.preventDefault(); + var anyField = $('#gn-any-field'); + if (anyField) { + gnUtilityService.scrollTo(); + $location.path('/board'); + anyField.focus(); + } } } }).add({ @@ -262,14 +274,18 @@ description: $translate.instant('hotkeySearchTheCatalog'), allowIn: ['INPUT'], callback: function() { - angular.element($('#gn-any-field')) - .scope().triggerSearch() + if ($location.path().indexOf("/metadata/") !== 0) { + angular.element($('#gn-any-field')) + .scope().triggerSearch() + } } }).add({ combo: 'b', description: $translate.instant('hotkeyBatchEdit'), callback: function(event) { - $location.path('/batchedit'); + if ($location.path().indexOf("/metadata/") !== 0) { + $location.path('/batchedit'); + } } }); }, 500);