mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-25 12:18:47 +08:00
Open file menu via hot keys in view/comment mode
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
||||
@ -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');
|
||||
}
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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');
|
||||
|
||||
Reference in New Issue
Block a user