Set header layout as in the desktop editors
This commit is contained in:
parent
ccf95bc87a
commit
88998b07aa
|
@ -106,6 +106,7 @@ define([
|
||||||
'</section>';
|
'</section>';
|
||||||
|
|
||||||
var templateTitleBox = '<section id="box-document-title">' +
|
var templateTitleBox = '<section id="box-document-title">' +
|
||||||
|
'<div class="extra"></div>' +
|
||||||
'<div class="hedset">' +
|
'<div class="hedset">' +
|
||||||
'<div class="btn-slot" id="slot-btn-dt-save"></div>' +
|
'<div class="btn-slot" id="slot-btn-dt-save"></div>' +
|
||||||
'<div class="btn-slot" id="slot-btn-dt-print"></div>' +
|
'<div class="btn-slot" id="slot-btn-dt-print"></div>' +
|
||||||
|
|
|
@ -2758,7 +2758,7 @@ define([
|
||||||
me.toolbar.addTab(tab, $panel, 4);
|
me.toolbar.addTab(tab, $panel, 4);
|
||||||
|
|
||||||
me.toolbar.btnSave.on('disabled', _.bind(me.onBtnChangeState, me, 'save:disabled'));
|
me.toolbar.btnSave.on('disabled', _.bind(me.onBtnChangeState, me, 'save:disabled'));
|
||||||
if ( config.isDesktopApp ) {
|
|
||||||
// hide 'print' and 'save' buttons group and next separator
|
// hide 'print' and 'save' buttons group and next separator
|
||||||
me.toolbar.btnPrint.$el.parents('.group').hide().next().hide();
|
me.toolbar.btnPrint.$el.parents('.group').hide().next().hide();
|
||||||
|
|
||||||
|
@ -2769,6 +2769,7 @@ define([
|
||||||
me.toolbar.btnPaste.$el.detach().appendTo($box);
|
me.toolbar.btnPaste.$el.detach().appendTo($box);
|
||||||
me.toolbar.btnCopy.$el.removeClass('split');
|
me.toolbar.btnCopy.$el.removeClass('split');
|
||||||
|
|
||||||
|
if ( config.isDesktopApp ) {
|
||||||
if ( config.canProtect ) {
|
if ( config.canProtect ) {
|
||||||
tab = {action: 'protect', caption: me.toolbar.textTabProtect};
|
tab = {action: 'protect', caption: me.toolbar.textTabProtect};
|
||||||
$panel = me.getApplication().getController('Common.Controllers.Protection').createToolbarPanel();
|
$panel = me.getApplication().getController('Common.Controllers.Protection').createToolbarPanel();
|
||||||
|
|
|
@ -76,6 +76,7 @@ define([
|
||||||
'render:before' : function (toolbar) {
|
'render:before' : function (toolbar) {
|
||||||
var config = DE.getController('Main').appOptions;
|
var config = DE.getController('Main').appOptions;
|
||||||
toolbar.setExtra('right', me.header.getPanel('right', config));
|
toolbar.setExtra('right', me.header.getPanel('right', config));
|
||||||
|
if (!config.isEdit)
|
||||||
toolbar.setExtra('left', me.header.getPanel('left', config));
|
toolbar.setExtra('left', me.header.getPanel('left', config));
|
||||||
},
|
},
|
||||||
'view:compact' : function (toolbar, state) {
|
'view:compact' : function (toolbar, state) {
|
||||||
|
@ -157,9 +158,10 @@ define([
|
||||||
if ( panel ) panel.height = _intvars.get('toolbar-height-tabs');
|
if ( panel ) panel.height = _intvars.get('toolbar-height-tabs');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( config.isDesktopApp && config.isEdit ) {
|
if ( config.isEdit ) {
|
||||||
var $title = me.viewport.vlayout.getItem('title').el;
|
var $title = me.viewport.vlayout.getItem('title').el;
|
||||||
$title.html(me.header.getPanel('title', config)).show();
|
$title.html(me.header.getPanel('title', config)).show();
|
||||||
|
$title.find('.extra').html(me.header.getPanel('left', config));
|
||||||
|
|
||||||
var toolbar = me.viewport.vlayout.getItem('toolbar');
|
var toolbar = me.viewport.vlayout.getItem('toolbar');
|
||||||
toolbar.el.addClass('top-title');
|
toolbar.el.addClass('top-title');
|
||||||
|
|
|
@ -2097,7 +2097,7 @@ define([
|
||||||
|
|
||||||
createSynchTip: function () {
|
createSynchTip: function () {
|
||||||
this.synchTooltip = new Common.UI.SynchronizeTip({
|
this.synchTooltip = new Common.UI.SynchronizeTip({
|
||||||
extCls: this.mode.isDesktopApp ? 'inc-index' : undefined,
|
extCls: 'inc-index',
|
||||||
target: this.btnCollabChanges.$el
|
target: this.btnCollabChanges.$el
|
||||||
});
|
});
|
||||||
this.synchTooltip.on('dontshowclick', function () {
|
this.synchTooltip.on('dontshowclick', function () {
|
||||||
|
|
|
@ -2007,7 +2007,6 @@ define([
|
||||||
if ( $panel )
|
if ( $panel )
|
||||||
me.toolbar.addTab(tab, $panel, 3);
|
me.toolbar.addTab(tab, $panel, 3);
|
||||||
|
|
||||||
if ( config.isDesktopApp ) {
|
|
||||||
// hide 'print' and 'save' buttons group and next separator
|
// hide 'print' and 'save' buttons group and next separator
|
||||||
me.toolbar.btnPrint.$el.parents('.group').hide().next().hide();
|
me.toolbar.btnPrint.$el.parents('.group').hide().next().hide();
|
||||||
|
|
||||||
|
@ -2018,6 +2017,7 @@ define([
|
||||||
me.toolbar.btnPaste.$el.detach().appendTo($box);
|
me.toolbar.btnPaste.$el.detach().appendTo($box);
|
||||||
me.toolbar.btnCopy.$el.removeClass('split');
|
me.toolbar.btnCopy.$el.removeClass('split');
|
||||||
|
|
||||||
|
if ( config.isDesktopApp ) {
|
||||||
if ( config.canProtect ) { // don't add protect panel to toolbar
|
if ( config.canProtect ) { // don't add protect panel to toolbar
|
||||||
tab = {action: 'protect', caption: me.toolbar.textTabProtect};
|
tab = {action: 'protect', caption: me.toolbar.textTabProtect};
|
||||||
$panel = me.getApplication().getController('Common.Controllers.Protection').createToolbarPanel();
|
$panel = me.getApplication().getController('Common.Controllers.Protection').createToolbarPanel();
|
||||||
|
|
|
@ -77,6 +77,7 @@ define([
|
||||||
'render:before' : function (toolbar) {
|
'render:before' : function (toolbar) {
|
||||||
var config = PE.getController('Main').appOptions;
|
var config = PE.getController('Main').appOptions;
|
||||||
toolbar.setExtra('right', me.header.getPanel('right', config));
|
toolbar.setExtra('right', me.header.getPanel('right', config));
|
||||||
|
if (!config.isEdit)
|
||||||
toolbar.setExtra('left', me.header.getPanel('left', config));
|
toolbar.setExtra('left', me.header.getPanel('left', config));
|
||||||
},
|
},
|
||||||
'view:compact' : function (toolbar, state) {
|
'view:compact' : function (toolbar, state) {
|
||||||
|
@ -160,9 +161,10 @@ define([
|
||||||
me.viewport.vlayout.getItem('toolbar').height = _intvars.get('toolbar-height-compact');
|
me.viewport.vlayout.getItem('toolbar').height = _intvars.get('toolbar-height-compact');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( config.isDesktopApp && config.isEdit ) {
|
if ( config.isEdit ) {
|
||||||
var $title = me.viewport.vlayout.getItem('title').el;
|
var $title = me.viewport.vlayout.getItem('title').el;
|
||||||
$title.html(me.header.getPanel('title', config)).show();
|
$title.html(me.header.getPanel('title', config)).show();
|
||||||
|
$title.find('.extra').html(me.header.getPanel('left', config));
|
||||||
|
|
||||||
var toolbar = me.viewport.vlayout.getItem('toolbar');
|
var toolbar = me.viewport.vlayout.getItem('toolbar');
|
||||||
toolbar.el.addClass('top-title');
|
toolbar.el.addClass('top-title');
|
||||||
|
|
|
@ -1425,7 +1425,7 @@ define([
|
||||||
|
|
||||||
createSynchTip: function () {
|
createSynchTip: function () {
|
||||||
this.synchTooltip = new Common.UI.SynchronizeTip({
|
this.synchTooltip = new Common.UI.SynchronizeTip({
|
||||||
extCls: this.mode.isDesktopApp ? 'inc-index' : undefined,
|
extCls: 'inc-index',
|
||||||
target: this.btnCollabChanges.$el
|
target: this.btnCollabChanges.$el
|
||||||
});
|
});
|
||||||
this.synchTooltip.on('dontshowclick', function () {
|
this.synchTooltip.on('dontshowclick', function () {
|
||||||
|
|
|
@ -3096,7 +3096,6 @@ define([
|
||||||
if ( $panel )
|
if ( $panel )
|
||||||
me.toolbar.addTab(tab, $panel, 5);
|
me.toolbar.addTab(tab, $panel, 5);
|
||||||
|
|
||||||
if ( config.isDesktopApp ) {
|
|
||||||
// hide 'print' and 'save' buttons group and next separator
|
// hide 'print' and 'save' buttons group and next separator
|
||||||
me.toolbar.btnPrint.$el.parents('.group').hide().next().hide();
|
me.toolbar.btnPrint.$el.parents('.group').hide().next().hide();
|
||||||
|
|
||||||
|
@ -3107,6 +3106,7 @@ define([
|
||||||
me.toolbar.btnPaste.$el.detach().appendTo($box);
|
me.toolbar.btnPaste.$el.detach().appendTo($box);
|
||||||
me.toolbar.btnCopy.$el.removeClass('split');
|
me.toolbar.btnCopy.$el.removeClass('split');
|
||||||
|
|
||||||
|
if ( config.isDesktopApp ) {
|
||||||
if ( config.canProtect ) {
|
if ( config.canProtect ) {
|
||||||
tab = {action: 'protect', caption: me.toolbar.textTabProtect};
|
tab = {action: 'protect', caption: me.toolbar.textTabProtect};
|
||||||
$panel = me.getApplication().getController('Common.Controllers.Protection').createToolbarPanel();
|
$panel = me.getApplication().getController('Common.Controllers.Protection').createToolbarPanel();
|
||||||
|
|
|
@ -78,10 +78,10 @@ define([
|
||||||
'render:before' : function (toolbar) {
|
'render:before' : function (toolbar) {
|
||||||
var config = SSE.getController('Main').appOptions;
|
var config = SSE.getController('Main').appOptions;
|
||||||
toolbar.setExtra('right', me.header.getPanel('right', config));
|
toolbar.setExtra('right', me.header.getPanel('right', config));
|
||||||
|
if (!config.isEdit)
|
||||||
toolbar.setExtra('left', me.header.getPanel('left', config));
|
toolbar.setExtra('left', me.header.getPanel('left', config));
|
||||||
|
|
||||||
if ( me.appConfig && me.appConfig.isDesktopApp &&
|
if ( me.appConfig && me.appConfig.isEdit && toolbar.btnCollabChanges )
|
||||||
me.appConfig.isEdit && toolbar.btnCollabChanges )
|
|
||||||
toolbar.btnCollabChanges = me.header.btnSave;
|
toolbar.btnCollabChanges = me.header.btnSave;
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -144,9 +144,10 @@ define([
|
||||||
me.viewport.vlayout.getItem('toolbar').height = 41;
|
me.viewport.vlayout.getItem('toolbar').height = 41;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( config.isDesktopApp && config.isEdit && !config.isEditDiagram && !config.isEditMailMerge ) {
|
if ( config.isEdit && !config.isEditDiagram && !config.isEditMailMerge ) {
|
||||||
var $title = me.viewport.vlayout.getItem('title').el;
|
var $title = me.viewport.vlayout.getItem('title').el;
|
||||||
$title.html(me.header.getPanel('title', config)).show();
|
$title.html(me.header.getPanel('title', config)).show();
|
||||||
|
$title.find('.extra').html(me.header.getPanel('left', config));
|
||||||
|
|
||||||
var toolbar = me.viewport.vlayout.getItem('toolbar');
|
var toolbar = me.viewport.vlayout.getItem('toolbar');
|
||||||
toolbar.el.addClass('top-title');
|
toolbar.el.addClass('top-title');
|
||||||
|
|
|
@ -2066,7 +2066,7 @@ define([
|
||||||
|
|
||||||
createSynchTip: function () {
|
createSynchTip: function () {
|
||||||
this.synchTooltip = new Common.UI.SynchronizeTip({
|
this.synchTooltip = new Common.UI.SynchronizeTip({
|
||||||
extCls: this.mode.isDesktopApp ? 'inc-index' : undefined,
|
extCls: 'inc-index',
|
||||||
target: this.btnCollabChanges.$el
|
target: this.btnCollabChanges.$el
|
||||||
});
|
});
|
||||||
this.synchTooltip.on('dontshowclick', function() {
|
this.synchTooltip.on('dontshowclick', function() {
|
||||||
|
|
Loading…
Reference in a new issue