Merge pull request #1461 from ONLYOFFICE/fix/layout-manager
Use customization.layout section for hide statusBar, toolbar (instead…
This commit is contained in:
commit
47b5e9d322
|
@ -165,7 +165,7 @@
|
|||
navigation: false/true // navigation button in de
|
||||
} / false / true, // view tab
|
||||
save: false/true // save button on toolbar in
|
||||
},
|
||||
} / false / true, // use instead of customization.toolbar,
|
||||
header: {
|
||||
users: false/true // users list button
|
||||
save: false/true // save button
|
||||
|
@ -179,7 +179,7 @@
|
|||
textLang: false/true // text language button in de/pe
|
||||
docLang: false/true // document language button in de/pe
|
||||
actionStatus: false/true // status of operation
|
||||
}
|
||||
} / false / true, // use instead of customization.statusBar
|
||||
},
|
||||
features: { // disable feature
|
||||
spellcheck: {
|
||||
|
@ -194,8 +194,8 @@
|
|||
leftMenu: true, // must be deprecated. use layout.leftMenu instead
|
||||
rightMenu: true, // must be deprecated. use layout.rightMenu instead
|
||||
hideRightMenu: false, // hide or show right panel on first loading
|
||||
toolbar: true,
|
||||
statusBar: true,
|
||||
toolbar: true, // must be deprecated. use layout.toolbar instead
|
||||
statusBar: true, // must be deprecated. use layout.statusBar instead
|
||||
autosave: true,
|
||||
forcesave: false,
|
||||
commentAuthorOnly: false, // must be deprecated. use permissions.editCommentAuthorOnly and permissions.deleteCommentAuthorOnly instead
|
||||
|
|
|
@ -2084,6 +2084,10 @@ define([
|
|||
console.log("Obsolete: The 'leftMenu' parameter of the 'customization' section is deprecated. Please use 'leftMenu' parameter in the 'customization.layout' section instead.");
|
||||
if (this.appOptions.customization.rightMenu!==undefined)
|
||||
console.log("Obsolete: The 'rightMenu' parameter of the 'customization' section is deprecated. Please use 'rightMenu' parameter in the 'customization.layout' section instead.");
|
||||
if (this.appOptions.customization.statusBar!==undefined)
|
||||
console.log("Obsolete: The 'statusBar' parameter of the 'customization' section is deprecated. Please use 'statusBar' parameter in the 'customization.layout' section instead.");
|
||||
if (this.appOptions.customization.toolbar!==undefined)
|
||||
console.log("Obsolete: The 'toolbar' parameter of the 'customization' section is deprecated. Please use 'toolbar' parameter in the 'customization.layout' section instead.");
|
||||
}
|
||||
promise = this.getApplication().getController('Common.Controllers.Plugins').applyUICustomization();
|
||||
}
|
||||
|
|
|
@ -171,7 +171,7 @@ define([
|
|||
|
||||
var _intvars = Common.Utils.InternalSettings;
|
||||
var $filemenu = $('.toolbar-fullview-panel');
|
||||
$filemenu.css('top', _intvars.get('toolbar-height-tabs'));
|
||||
$filemenu.css('top', Common.UI.LayoutManager.isElementVisible('toolbar') ? _intvars.get('toolbar-height-tabs') : 0);
|
||||
|
||||
me.viewport.$el.attr('applang', me.appConfig.lang.split(/[\-_]/)[0]);
|
||||
|
||||
|
@ -205,7 +205,7 @@ define([
|
|||
_intvars.set('toolbar-height-compact', _tabs_new_height);
|
||||
_intvars.set('toolbar-height-normal', _tabs_new_height + _intvars.get('toolbar-height-controls'));
|
||||
|
||||
$filemenu.css('top', _tabs_new_height + _intvars.get('document-title-height'));
|
||||
$filemenu.css('top', (Common.UI.LayoutManager.isElementVisible('toolbar') ? _tabs_new_height : 0) + _intvars.get('document-title-height'));
|
||||
|
||||
toolbar = me.getApplication().getController('Toolbar').getView();
|
||||
toolbar.btnCollabChanges = me.header.btnSave;
|
||||
|
@ -246,7 +246,7 @@ define([
|
|||
value: 'statusbar'
|
||||
});
|
||||
|
||||
if ( config.canBrandingExt && config.customization && config.customization.statusBar === false )
|
||||
if ( config.canBrandingExt && config.customization && config.customization.statusBar === false || !Common.UI.LayoutManager.isElementVisible('statusBar'))
|
||||
me.header.mnuitemHideStatusBar.hide();
|
||||
|
||||
me.header.mnuitemHideRulers = new Common.UI.MenuItem({
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<div id="file-menu-panel" class="toolbar-fullview-panel hint-section" style="display:none;"></div>
|
||||
</section>
|
||||
<section id="app-title" class="layout-item"></section>
|
||||
<div id="toolbar" class="layout-item hint-section"></div>
|
||||
<div id="toolbar" class="layout-item hint-section" data-layout-name="toolbar"></div>
|
||||
<div class="layout-item middle">
|
||||
<div id="viewport-hbox-layout" class="layout-ct hbox">
|
||||
<div id="left-menu" class="layout-item hint-section" data-layout-name="leftMenu" style="width: 40px;"></div>
|
||||
|
@ -14,6 +14,6 @@
|
|||
<div id="left-panel-history" class="layout-item"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="statusbar" class="layout-item"></div>
|
||||
<div id="statusbar" class="layout-item" data-layout-name="statusBar"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1720,6 +1720,10 @@ define([
|
|||
console.log("Obsolete: The 'leftMenu' parameter of the 'customization' section is deprecated. Please use 'leftMenu' parameter in the 'customization.layout' section instead.");
|
||||
if (this.appOptions.customization.rightMenu!==undefined)
|
||||
console.log("Obsolete: The 'rightMenu' parameter of the 'customization' section is deprecated. Please use 'rightMenu' parameter in the 'customization.layout' section instead.");
|
||||
if (this.appOptions.customization.statusBar!==undefined)
|
||||
console.log("Obsolete: The 'statusBar' parameter of the 'customization' section is deprecated. Please use 'statusBar' parameter in the 'customization.layout' section instead.");
|
||||
if (this.appOptions.customization.toolbar!==undefined)
|
||||
console.log("Obsolete: The 'toolbar' parameter of the 'customization' section is deprecated. Please use 'toolbar' parameter in the 'customization.layout' section instead.");
|
||||
}
|
||||
promise = this.getApplication().getController('Common.Controllers.Plugins').applyUICustomization();
|
||||
}
|
||||
|
|
|
@ -181,7 +181,7 @@ define([
|
|||
|
||||
var _intvars = Common.Utils.InternalSettings;
|
||||
var $filemenu = $('.toolbar-fullview-panel');
|
||||
$filemenu.css('top', _intvars.get('toolbar-height-tabs'));
|
||||
$filemenu.css('top', Common.UI.LayoutManager.isElementVisible('toolbar') ? _intvars.get('toolbar-height-tabs') : 0);
|
||||
|
||||
me.viewport.$el.attr('applang', me.appConfig.lang.split(/[\-_]/)[0]);
|
||||
|
||||
|
@ -206,7 +206,7 @@ define([
|
|||
_intvars.set('toolbar-height-compact', _tabs_new_height);
|
||||
_intvars.set('toolbar-height-normal', _tabs_new_height + _intvars.get('toolbar-height-controls'));
|
||||
|
||||
$filemenu.css('top', _tabs_new_height + _intvars.get('document-title-height'));
|
||||
$filemenu.css('top', (Common.UI.LayoutManager.isElementVisible('toolbar') ? _tabs_new_height : 0) + _intvars.get('document-title-height'));
|
||||
|
||||
toolbar = me.getApplication().getController('Toolbar').getView('Toolbar');
|
||||
toolbar.btnCollabChanges = me.header.btnSave;
|
||||
|
@ -255,7 +255,7 @@ define([
|
|||
value: 'statusbar'
|
||||
});
|
||||
|
||||
if ( config.canBrandingExt && config.customization && config.customization.statusBar === false )
|
||||
if ( config.canBrandingExt && config.customization && config.customization.statusBar === false || !Common.UI.LayoutManager.isElementVisible('statusBar'))
|
||||
me.header.mnuitemHideStatusBar.hide();
|
||||
|
||||
me.header.mnuitemHideRulers = new Common.UI.MenuItem({
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
</section>
|
||||
<div id="viewport-vbox-layout" class="layout-ct vbox">
|
||||
<section id="app-title" class="layout-item"></section>
|
||||
<div id="toolbar" class="layout-item hint-section"></div>
|
||||
<div id="toolbar" class="layout-item hint-section" data-layout-name="toolbar"></div>
|
||||
<div class="layout-item middle">
|
||||
<div id="viewport-hbox-layout" class="layout-ct hbox">
|
||||
<div id="left-menu" class="layout-item hint-section" data-layout-name="leftMenu" style="width: 40px;"></div>
|
||||
|
@ -15,6 +15,6 @@
|
|||
<div id="left-panel-history" class="layout-item"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="statusbar" class="layout-item"></div>
|
||||
<div id="statusbar" class="layout-item" data-layout-name="statusBar"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -2090,6 +2090,10 @@ define([
|
|||
console.log("Obsolete: The 'leftMenu' parameter of the 'customization' section is deprecated. Please use 'leftMenu' parameter in the 'customization.layout' section instead.");
|
||||
if (this.appOptions.customization.rightMenu!==undefined)
|
||||
console.log("Obsolete: The 'rightMenu' parameter of the 'customization' section is deprecated. Please use 'rightMenu' parameter in the 'customization.layout' section instead.");
|
||||
if (this.appOptions.customization.statusBar!==undefined)
|
||||
console.log("Obsolete: The 'statusBar' parameter of the 'customization' section is deprecated. Please use 'statusBar' parameter in the 'customization.layout' section instead.");
|
||||
if (this.appOptions.customization.toolbar!==undefined)
|
||||
console.log("Obsolete: The 'toolbar' parameter of the 'customization' section is deprecated. Please use 'toolbar' parameter in the 'customization.layout' section instead.");
|
||||
}
|
||||
promise = this.getApplication().getController('Common.Controllers.Plugins').applyUICustomization();
|
||||
}
|
||||
|
|
|
@ -152,7 +152,7 @@ define([
|
|||
|
||||
var _intvars = Common.Utils.InternalSettings;
|
||||
var $filemenu = $('.toolbar-fullview-panel');
|
||||
$filemenu.css('top', _intvars.get('toolbar-height-tabs'));
|
||||
$filemenu.css('top', Common.UI.LayoutManager.isElementVisible('toolbar') ? _intvars.get('toolbar-height-tabs') : 0);
|
||||
|
||||
me.viewport.$el.attr('applang', me.appConfig.lang.split(/[\-_]/)[0]);
|
||||
|
||||
|
@ -180,7 +180,7 @@ define([
|
|||
_intvars.set('toolbar-height-compact', _tabs_new_height);
|
||||
_intvars.set('toolbar-height-normal', _tabs_new_height + _intvars.get('toolbar-height-controls'));
|
||||
|
||||
$filemenu.css('top', _tabs_new_height + _intvars.get('document-title-height'));
|
||||
$filemenu.css('top', (Common.UI.LayoutManager.isElementVisible('toolbar') ? _tabs_new_height : 0) + _intvars.get('document-title-height'));
|
||||
}
|
||||
|
||||
if ( config.customization ) {
|
||||
|
@ -225,6 +225,8 @@ define([
|
|||
checkable: true,
|
||||
value: 'statusbar'
|
||||
});
|
||||
if ( config.canBrandingExt && config.customization && config.customization.statusBar === false || !Common.UI.LayoutManager.isElementVisible('statusBar'))
|
||||
me.header.mnuitemCompactStatusBar.hide();
|
||||
|
||||
me.header.mnuitemHideFormulaBar = new Common.UI.MenuItem({
|
||||
caption : me.textHideFBar,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<div id="file-menu-panel" class="toolbar-fullview-panel hint-section" style="display:none;"></div>
|
||||
</section>
|
||||
<section id="app-title" class="layout-item"></section>
|
||||
<div id="toolbar" class="layout-item hint-section"></div>
|
||||
<div id="toolbar" class="layout-item hint-section" data-layout-name="toolbar"></div>
|
||||
<div class="layout-item">
|
||||
<div id="viewport-hbox-layout" class="layout-ct hbox">
|
||||
<div id="left-menu" class="layout-item hint-section" data-layout-name="leftMenu" style="width: 40px;"></div>
|
||||
|
@ -19,6 +19,6 @@
|
|||
<div id="left-panel-history" class="layout-item hint-section"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="statusbar" class="layout-item"></div>
|
||||
<div id="statusbar" class="layout-item" data-layout-name="statusBar"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue