Open file menu via hot keys in view/comment mode

This commit is contained in:
Julia Radzhabova
2024-01-18 13:26:28 +03:00
parent 98ecbbd33c
commit 530ff8d46b
4 changed files with 4 additions and 44 deletions

View File

@ -191,16 +191,6 @@ define([
this.mode = mode;
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'),
'ctrl+alt+f': _.bind(this.onShortcut, this, 'file')
}
});
return this;
},
@ -827,7 +817,7 @@ define([
}
return false;
case 'help':
if ( this.mode.isEdit && this.mode.canHelp ) { // TODO: unlock 'help' for 'view' mode
if ( this.mode.canHelp ) { // TODO: unlock 'help' for 'view' mode
Common.UI.Menu.Manager.hideAll();
this.showHelp();
}

View File

@ -172,16 +172,6 @@ define([
this.mode = mode;
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'),
'ctrl+alt+f': _.bind(this.onShortcut, this, 'file')
}
});
return this;
},
@ -744,7 +734,7 @@ define([
}
return false;
case 'help':
if ( this.mode.isEdit && this.mode.canHelp ) { // TODO: unlock 'help' for 'view' mode
if ( this.mode.canHelp ) { // TODO: unlock 'help' for 'view' mode
Common.UI.Menu.Manager.hideAll();
this.leftMenu.showMenu('file:help');
}

View File

@ -184,16 +184,6 @@ define([
this.mode = mode;
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'),
'ctrl+alt+f': _.bind(this.onShortcut, this, 'file')
}
});
return this;
},
@ -642,7 +632,7 @@ define([
}
return false;
case 'help':
if ( this.mode.isEdit && this.mode.canHelp ) { // TODO: unlock 'help' panel for 'view' mode
if ( this.mode.canHelp ) { // TODO: unlock 'help' panel for 'view' mode
if (!previewPanel || !previewPanel.isVisible()){
Common.UI.Menu.Manager.hideAll();

View File

@ -191,16 +191,6 @@ define([
this.mode = mode;
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'),
'ctrl+alt+f': _.bind(this.onShortcut, this, 'file')
}
});
return this;
},
@ -805,7 +795,7 @@ define([
}
return false;
case 'help':
if ( this.mode.isEdit && this.mode.canHelp ) { // TODO: unlock 'help' panel for 'view' mode
if ( this.mode.canHelp ) { // TODO: unlock 'help' panel for 'view' mode
Common.UI.Menu.Manager.hideAll();
this.api.asc_closeCellEditor();
this.leftMenu.showMenu('file:help');