Merge branch 'feature/desktop-header-view' into develop
This commit is contained in:
commit
d06e19d543
|
@ -106,6 +106,7 @@ define([
|
|||
'</section>';
|
||||
|
||||
var templateTitleBox = '<section id="box-document-title">' +
|
||||
'<div class="extra"></div>' +
|
||||
'<div class="hedset">' +
|
||||
'<div class="btn-slot" id="slot-btn-dt-save"></div>' +
|
||||
'<div class="btn-slot" id="slot-btn-dt-print"></div>' +
|
||||
|
|
|
@ -2778,17 +2778,18 @@ define([
|
|||
me.toolbar.addTab(tab, $panel, 4);
|
||||
|
||||
me.toolbar.btnSave.on('disabled', _.bind(me.onBtnChangeState, me, 'save:disabled'));
|
||||
|
||||
// hide 'print' and 'save' buttons group and next separator
|
||||
me.toolbar.btnPrint.$el.parents('.group').hide().next().hide();
|
||||
|
||||
// hide 'undo' and 'redo' buttons and retrieve parent 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.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 retrieve parent 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.canProtect ) {
|
||||
tab = {action: 'protect', caption: me.toolbar.textTabProtect};
|
||||
$panel = me.getApplication().getController('Common.Controllers.Protection').createToolbarPanel();
|
||||
|
|
|
@ -76,7 +76,8 @@ define([
|
|||
'render:before' : function (toolbar) {
|
||||
var config = DE.getController('Main').appOptions;
|
||||
toolbar.setExtra('right', me.header.getPanel('right', config));
|
||||
toolbar.setExtra('left', me.header.getPanel('left', config));
|
||||
if (!config.isEdit)
|
||||
toolbar.setExtra('left', me.header.getPanel('left', config));
|
||||
},
|
||||
'view:compact' : function (toolbar, state) {
|
||||
me.header.mnuitemCompactToolbar.setChecked(state, true);
|
||||
|
@ -161,9 +162,10 @@ define([
|
|||
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;
|
||||
$title.html(me.header.getPanel('title', config)).show();
|
||||
$title.find('.extra').html(me.header.getPanel('left', config));
|
||||
|
||||
var toolbar = me.viewport.vlayout.getItem('toolbar');
|
||||
toolbar.el.addClass('top-title');
|
||||
|
|
|
@ -2111,7 +2111,7 @@ define([
|
|||
|
||||
createSynchTip: function () {
|
||||
this.synchTooltip = new Common.UI.SynchronizeTip({
|
||||
extCls: this.mode.isDesktopApp ? 'inc-index' : undefined,
|
||||
extCls: 'inc-index',
|
||||
target: this.btnCollabChanges.$el
|
||||
});
|
||||
this.synchTooltip.on('dontshowclick', function () {
|
||||
|
|
|
@ -2018,17 +2018,17 @@ define([
|
|||
me.toolbar.addTab(tab, $panel, 3);
|
||||
|
||||
me.toolbar.btnSave.on('disabled', _.bind(me.onBtnChangeState, me, 'save:disabled'));
|
||||
// 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.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.canProtect ) { // don't add protect panel to toolbar
|
||||
tab = {action: 'protect', caption: me.toolbar.textTabProtect};
|
||||
$panel = me.getApplication().getController('Common.Controllers.Protection').createToolbarPanel();
|
||||
|
|
|
@ -77,7 +77,8 @@ define([
|
|||
'render:before' : function (toolbar) {
|
||||
var config = PE.getController('Main').appOptions;
|
||||
toolbar.setExtra('right', me.header.getPanel('right', config));
|
||||
toolbar.setExtra('left', me.header.getPanel('left', config));
|
||||
if (!config.isEdit)
|
||||
toolbar.setExtra('left', me.header.getPanel('left', config));
|
||||
},
|
||||
'view:compact' : function (toolbar, state) {
|
||||
me.header.mnuitemCompactToolbar.setChecked(state, true);
|
||||
|
@ -164,9 +165,10 @@ define([
|
|||
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;
|
||||
$title.html(me.header.getPanel('title', config)).show();
|
||||
$title.find('.extra').html(me.header.getPanel('left', config));
|
||||
|
||||
var toolbar = me.viewport.vlayout.getItem('toolbar');
|
||||
toolbar.el.addClass('top-title');
|
||||
|
|
|
@ -1427,7 +1427,7 @@ define([
|
|||
|
||||
createSynchTip: function () {
|
||||
this.synchTooltip = new Common.UI.SynchronizeTip({
|
||||
extCls: this.mode.isDesktopApp ? 'inc-index' : undefined,
|
||||
extCls: 'inc-index',
|
||||
target: this.btnCollabChanges.$el
|
||||
});
|
||||
this.synchTooltip.on('dontshowclick', function () {
|
||||
|
|
|
@ -3111,17 +3111,17 @@ define([
|
|||
if ( $panel )
|
||||
me.toolbar.addTab(tab, $panel, 4);
|
||||
|
||||
// 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.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.canProtect ) {
|
||||
tab = {action: 'protect', caption: me.toolbar.textTabProtect};
|
||||
$panel = me.getApplication().getController('Common.Controllers.Protection').createToolbarPanel();
|
||||
|
|
|
@ -78,10 +78,10 @@ define([
|
|||
'render:before' : function (toolbar) {
|
||||
var config = SSE.getController('Main').appOptions;
|
||||
toolbar.setExtra('right', me.header.getPanel('right', config));
|
||||
toolbar.setExtra('left', me.header.getPanel('left', config));
|
||||
if (!config.isEdit)
|
||||
toolbar.setExtra('left', me.header.getPanel('left', config));
|
||||
|
||||
if ( me.appConfig && me.appConfig.isDesktopApp &&
|
||||
me.appConfig.isEdit && toolbar.btnCollabChanges )
|
||||
if ( me.appConfig && me.appConfig.isEdit && toolbar.btnCollabChanges )
|
||||
toolbar.btnCollabChanges = me.header.btnSave;
|
||||
|
||||
},
|
||||
|
@ -148,9 +148,10 @@ define([
|
|||
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;
|
||||
$title.html(me.header.getPanel('title', config)).show();
|
||||
$title.find('.extra').html(me.header.getPanel('left', config));
|
||||
|
||||
var toolbar = me.viewport.vlayout.getItem('toolbar');
|
||||
toolbar.el.addClass('top-title');
|
||||
|
|
|
@ -2092,7 +2092,7 @@ define([
|
|||
|
||||
createSynchTip: function () {
|
||||
this.synchTooltip = new Common.UI.SynchronizeTip({
|
||||
extCls: this.mode.isDesktopApp ? 'inc-index' : undefined,
|
||||
extCls: 'inc-index',
|
||||
target: this.btnCollabChanges.$el
|
||||
});
|
||||
this.synchTooltip.on('dontshowclick', function() {
|
||||
|
|
Loading…
Reference in a new issue