locked F1 hotkey for 'view' mode

This commit is contained in:
Maxim Kadushkin 2017-08-09 19:59:54 +03:00
parent fb8eb5ddea
commit 134c5c907e
3 changed files with 13 additions and 5 deletions

View file

@ -576,8 +576,10 @@ define([
}
return false;
case 'help':
Common.UI.Menu.Manager.hideAll();
this.leftMenu.showMenu('file:help');
if ( this.mode.isEdit ) { // TODO: unlock 'help' for 'view' mode
Common.UI.Menu.Manager.hideAll();
this.leftMenu.showMenu('file:help');
}
return false;
case 'file':
Common.UI.Menu.Manager.hideAll();

View file

@ -456,10 +456,14 @@ define([
}
return false;
case 'help':
if ( this.mode.isEdit ) { // TODO: unlock 'help' panel for 'view' mode
if (!previewPanel || !previewPanel.isVisible()){
Common.UI.Menu.Manager.hideAll();
this.leftMenu.showMenu('file:help');
}
}
return false;
case 'file':
if (!previewPanel || !previewPanel.isVisible()) {

View file

@ -639,9 +639,11 @@ define([
}
return false;
case 'help':
Common.UI.Menu.Manager.hideAll();
this.api.asc_closeCellEditor();
this.leftMenu.showMenu('file:help');
if ( this.mode.isEdit ) { // TODO: unlock 'help' panel for 'view' mode
Common.UI.Menu.Manager.hideAll();
this.api.asc_closeCellEditor();
this.leftMenu.showMenu('file:help');
}
return false;
case 'file':