Lock hotkeys for view mode (Ctrs+Shift+S, Alt+F).

This commit is contained in:
Julia Radzhabova 2017-08-14 14:24:00 +03:00
parent 6e003751ab
commit 3c769f883e
3 changed files with 24 additions and 0 deletions

View file

@ -161,6 +161,14 @@ define([
this.leftMenu.setMode(mode);
this.leftMenu.getMenu('file').setMode(mode);
if (!mode.isEdit) // TODO: unlock 'save as', 'open file menu' for 'view' mode
Common.util.Shortcuts.removeShortcuts({
shortcuts: {
'command+shift+s,ctrl+shift+s': _.bind(this.onShortcut, this, 'save'),
'alt+f': _.bind(this.onShortcut, this, 'file')
}
});
return this;
},

View file

@ -154,6 +154,14 @@ define([
this.leftMenu.setMode(mode);
this.leftMenu.getMenu('file').setMode(mode);
if (!mode.isEdit) // TODO: unlock 'save as', 'open file menu' for 'view' mode
Common.util.Shortcuts.removeShortcuts({
shortcuts: {
'command+shift+s,ctrl+shift+s': _.bind(this.onShortcut, this, 'save'),
'alt+f': _.bind(this.onShortcut, this, 'file')
}
});
return this;
},

View file

@ -162,6 +162,14 @@ define([
this.leftMenu.setMode(mode);
this.leftMenu.getMenu('file').setMode(mode);
if (!mode.isEdit) // TODO: unlock 'save as', 'open file menu' for 'view' mode
Common.util.Shortcuts.removeShortcuts({
shortcuts: {
'command+shift+s,ctrl+shift+s': _.bind(this.onShortcut, this, 'save'),
'alt+f': _.bind(this.onShortcut, this, 'file')
}
});
return this;
},