hide some buttons for desktop mode
This commit is contained in:
parent
472e5edcb7
commit
b5a5c97735
|
@ -2768,12 +2768,23 @@ define([
|
|||
if ( $panel )
|
||||
me.toolbar.addTab(tab, $panel, 4);
|
||||
|
||||
if (config.isDesktopApp && config.isOffline) {
|
||||
if ( config.isDesktopApp ) {
|
||||
// hide 'print' and 'save' buttons group and next separator
|
||||
me.toolbar.btnPrint.$el.parents('.group').hide().next().hide();
|
||||
|
||||
// hide 'undo' and 'redo' buttons and get container
|
||||
var $box = me.toolbar.btnUndo.$el.hide().next().hide().parent();
|
||||
|
||||
// move 'paste' button to the container instead of 'undo' and 'redo'
|
||||
me.toolbar.btnPaste.$el.detach().appendTo($box);
|
||||
me.toolbar.btnCopy.$el.removeClass('split');
|
||||
|
||||
if ( config.isOffline ) {
|
||||
tab = {action: 'protect', caption: me.toolbar.textTabProtect};
|
||||
$panel = me.getApplication().getController('Common.Controllers.Protection').createToolbarPanel();
|
||||
|
||||
if ( $panel )
|
||||
me.toolbar.addTab(tab, $panel, 5);
|
||||
if ($panel) me.toolbar.addTab(tab, $panel, 5);
|
||||
}
|
||||
}
|
||||
|
||||
var links = me.getApplication().getController('Links');
|
||||
|
|
|
@ -2091,13 +2091,25 @@ define([
|
|||
if ( $panel )
|
||||
me.toolbar.addTab(tab, $panel, 3);
|
||||
|
||||
if (config.isDesktopApp && config.isOffline) {
|
||||
if ( config.isDesktopApp ) {
|
||||
// hide 'print' and 'save' buttons group and next separator
|
||||
me.toolbar.btnPrint.$el.parents('.group').hide().next().hide();
|
||||
|
||||
// hide 'undo' and 'redo' buttons and get container
|
||||
var $box = me.toolbar.btnUndo.$el.hide().next().hide().parent();
|
||||
|
||||
// move 'paste' button to the container instead of 'undo' and 'redo'
|
||||
me.toolbar.btnPaste.$el.detach().appendTo($box);
|
||||
me.toolbar.btnCopy.$el.removeClass('split');
|
||||
|
||||
if ( config.isOffline ) {
|
||||
tab = {action: 'protect', caption: me.toolbar.textTabProtect};
|
||||
$panel = me.getApplication().getController('Common.Controllers.Protection').createToolbarPanel();
|
||||
if ($panel)
|
||||
me.toolbar.addTab(tab, $panel, 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onAppReady: function (config) {
|
||||
|
|
|
@ -3054,7 +3054,18 @@ define([
|
|||
if ( $panel )
|
||||
me.toolbar.addTab(tab, $panel, 4);
|
||||
|
||||
if (config.isDesktopApp && config.isOffline) {
|
||||
if ( config.isDesktopApp ) {
|
||||
// hide 'print' and 'save' buttons group and next separator
|
||||
me.toolbar.btnPrint.$el.parents('.group').hide().next().hide();
|
||||
|
||||
// hide 'undo' and 'redo' buttons and get container
|
||||
var $box = me.toolbar.btnUndo.$el.hide().next().hide().parent();
|
||||
|
||||
// move 'paste' button to the container instead of 'undo' and 'redo'
|
||||
me.toolbar.btnPaste.$el.detach().appendTo($box);
|
||||
me.toolbar.btnCopy.$el.removeClass('split');
|
||||
|
||||
if ( config.isOffline ) {
|
||||
tab = {action: 'protect', caption: me.toolbar.textTabProtect};
|
||||
var $panel = me.getApplication().getController('Common.Controllers.Protection').createToolbarPanel();
|
||||
if ($panel)
|
||||
|
@ -3062,6 +3073,7 @@ define([
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue