From fe44adc9a0066882263028e9777887eec439f0f8 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 20 Jul 2020 14:30:14 +0300 Subject: [PATCH 01/13] [SSE] Hide option for slicer from pivot table --- .../main/app/template/SlicerSettings.template | 10 +++++----- .../main/app/template/SlicerSettingsAdvanced.template | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/template/SlicerSettings.template b/apps/spreadsheeteditor/main/app/template/SlicerSettings.template index db9953804..b3f78bdc8 100644 --- a/apps/spreadsheeteditor/main/app/template/SlicerSettings.template +++ b/apps/spreadsheeteditor/main/app/template/SlicerSettings.template @@ -110,11 +110,11 @@
- - -
- - + + + + +
diff --git a/apps/spreadsheeteditor/main/app/template/SlicerSettingsAdvanced.template b/apps/spreadsheeteditor/main/app/template/SlicerSettingsAdvanced.template index d61f2be90..1ebab4738 100644 --- a/apps/spreadsheeteditor/main/app/template/SlicerSettingsAdvanced.template +++ b/apps/spreadsheeteditor/main/app/template/SlicerSettingsAdvanced.template @@ -52,7 +52,7 @@
-
+ From 79e6a3fd7176ac6f4e4e877ff801a96ab7d16314 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 20 Jul 2020 17:33:32 +0300 Subject: [PATCH 02/13] [DE] Hide new content controls --- .../main/app/controller/Toolbar.js | 6 +-- apps/documenteditor/main/app/view/Toolbar.js | 52 +++++++++---------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index 8be4f6935..22faa2d25 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -783,10 +783,10 @@ define([ toolbar.btnContentControls.setDisabled(paragraph_locked || header_locked); if (!(paragraph_locked || header_locked)) { var control_disable = control_plain || content_locked; - for (var i=0; i<14; i++) + for (var i=0; i<7; i++) toolbar.btnContentControls.menu.items[i].setDisabled(control_disable); - toolbar.btnContentControls.menu.items[15].setDisabled(!in_control || lock_type==Asc.c_oAscSdtLockType.SdtContentLocked || lock_type==Asc.c_oAscSdtLockType.SdtLocked); - toolbar.btnContentControls.menu.items[17].setDisabled(!in_control); + toolbar.btnContentControls.menu.items[8].setDisabled(!in_control || lock_type==Asc.c_oAscSdtLockType.SdtContentLocked || lock_type==Asc.c_oAscSdtLockType.SdtLocked); + toolbar.btnContentControls.menu.items[10].setDisabled(!in_control); } var need_text_disable = paragraph_locked || header_locked || in_chart || rich_edit_lock || plain_edit_lock; diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js index b740bd2d8..ab0b1862f 100644 --- a/apps/documenteditor/main/app/view/Toolbar.js +++ b/apps/documenteditor/main/app/view/Toolbar.js @@ -643,31 +643,31 @@ define([ value: 'checkbox' }, {caption: '--'}, - { - caption: this.textNewFieldControl, - value: 'new-field' - }, - { - caption: this.textNewPictureControl, - value: 'new-picture' - }, - { - caption: this.textNewComboboxControl, - value: 'new-combobox' - }, - { - caption: this.textNewDropdownControl, - value: 'new-dropdown' - }, - { - caption: this.textNewCheckboxControl, - value: 'new-checkbox' - }, - { - caption: this.textNewRadioboxControl, - value: 'new-radiobox' - }, - {caption: '--'}, + // { + // caption: this.textNewFieldControl, + // value: 'new-field' + // }, + // { + // caption: this.textNewPictureControl, + // value: 'new-picture' + // }, + // { + // caption: this.textNewComboboxControl, + // value: 'new-combobox' + // }, + // { + // caption: this.textNewDropdownControl, + // value: 'new-dropdown' + // }, + // { + // caption: this.textNewCheckboxControl, + // value: 'new-checkbox' + // }, + // { + // caption: this.textNewRadioboxControl, + // value: 'new-radiobox' + // }, + // {caption: '--'}, { caption: this.textRemoveControl, // iconCls: 'menu__icon cc-remove', @@ -1982,7 +1982,7 @@ define([ this.btnMailRecepients.setVisible(mode.canCoAuthoring == true && mode.canUseMailMerge); this.listStylesAdditionalMenuItem.setVisible(mode.canEditStyles); - this.btnContentControls.menu.items[17].setVisible(mode.canEditContentControl); + this.btnContentControls.menu.items[10].setVisible(mode.canEditContentControl); this.mnuInsertImage.items[2].setVisible(this.mode.canRequestInsertImage || this.mode.fileChoiceUrl && this.mode.fileChoiceUrl.indexOf("{documentType}")>-1); }, From 72a871d84b122b9440489b4c981a907d03d30eff Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 20 Jul 2020 19:33:37 +0300 Subject: [PATCH 03/13] [SSE] Fix Bug 45830 --- apps/spreadsheeteditor/main/app/view/PivotTable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/spreadsheeteditor/main/app/view/PivotTable.js b/apps/spreadsheeteditor/main/app/view/PivotTable.js index 34e292abd..023e61e7a 100644 --- a/apps/spreadsheeteditor/main/app/view/PivotTable.js +++ b/apps/spreadsheeteditor/main/app/view/PivotTable.js @@ -183,7 +183,7 @@ define([ iconCls: 'toolbar__icon btn-pivot-sum', caption: this.txtCreate, disabled : false, - lock : [_set.lostConnect, _set.coAuth, _set.editPivot, _set.selRangeEdit, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer] + lock : [_set.lostConnect, _set.coAuth, _set.editPivot, _set.selRangeEdit, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.editCell] }); this.btnPivotLayout = new Common.UI.Button({ From 98c9912353fd51ec7b75e86a8bb4f44f93af7a7f Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 21 Jul 2020 12:03:44 +0300 Subject: [PATCH 04/13] [SSE] Fix Bug 45589 --- .../main/app/view/PivotSettings.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/PivotSettings.js b/apps/spreadsheeteditor/main/app/view/PivotSettings.js index 5c6a8ee26..b6738db20 100644 --- a/apps/spreadsheeteditor/main/app/view/PivotSettings.js +++ b/apps/spreadsheeteditor/main/app/view/PivotSettings.js @@ -371,6 +371,7 @@ define([ handler: function(result, value) { if (result == 'ok' && me.api && value) { me._originalProps.asc_set(me.api, value); + Common.NotificationCenter.trigger('edit:complete', me); } Common.NotificationCenter.trigger('edit:complete', me); @@ -646,10 +647,6 @@ define([ if (isLabel || event.target.className.match('checkbox')) { this.updateFieldCheck(listView, record); - - _.delay(function () { - listView.$el.find('.listview').focus(); - }, 100, this); } } }, @@ -665,6 +662,7 @@ define([ } else { this._originalProps.asc_removeField(this.api, record.get('index')); } + Common.NotificationCenter.trigger('edit:complete', this); } // listView.isSuspendEvents = false; @@ -830,6 +828,7 @@ define([ handler: function(result, value) { if (result == 'ok' && me.api && value) { field.asc_set(me.api, me._originalProps, dataIndex, value); + Common.NotificationCenter.trigger('edit:complete', me); } Common.NotificationCenter.trigger('edit:complete', me); @@ -848,6 +847,7 @@ define([ handler: function(result, value) { if (result == 'ok' && me.api && value) { pivotField.asc_set(me.api, me._originalProps, pivotIndex, value); + Common.NotificationCenter.trigger('edit:complete', me); } Common.NotificationCenter.trigger('edit:complete', me); @@ -860,24 +860,28 @@ define([ onAddFilter: function(index, moveTo) { if (this.api && !this._locked && this._state.field){ this._originalProps.asc_addPageField(this.api, _.isNumber(index) ? index : this._state.field.record.get('index'), _.isNumber(moveTo) ? moveTo : undefined); + Common.NotificationCenter.trigger('edit:complete', this); } }, onAddRow: function(index, moveTo) { if (this.api && !this._locked && this._state.field){ this._originalProps.asc_addRowField(this.api, _.isNumber(index) ? index : this._state.field.record.get('index'), _.isNumber(moveTo) ? moveTo : undefined); + Common.NotificationCenter.trigger('edit:complete', this); } }, onAddColumn: function(index, moveTo) { if (this.api && !this._locked && this._state.field){ this._originalProps.asc_addColField(this.api, _.isNumber(index) ? index : this._state.field.record.get('index'), _.isNumber(moveTo) ? moveTo : undefined); + Common.NotificationCenter.trigger('edit:complete', this); } }, onAddValues: function(index, moveTo) { if (this.api && !this._locked && this._state.field){ this._originalProps.asc_addDataField(this.api, _.isNumber(index) ? index : this._state.field.record.get('index'), _.isNumber(moveTo) ? moveTo : undefined); + Common.NotificationCenter.trigger('edit:complete', this); } }, @@ -887,6 +891,7 @@ define([ this._originalProps.asc_removeDataField(this.api, _.isNumber(pivotindex) ? pivotindex : this._state.field.record.get('pivotIndex'), _.isNumber(index) ? index : this._state.field.record.get('index')); else this._originalProps.asc_removeNoDataField(this.api, _.isNumber(pivotindex) ? pivotindex : this._state.field.record.get('pivotIndex')); + Common.NotificationCenter.trigger('edit:complete', this); } }, @@ -933,6 +938,7 @@ define([ this._originalProps.asc_movePageField(this.api, from, to); break; } + Common.NotificationCenter.trigger('edit:complete', this); }, onMoveTo: function(type, pivotindex, to) { @@ -953,6 +959,7 @@ define([ this._originalProps.asc_moveToPageField(this.api, pivotIndex, index); break; } + Common.NotificationCenter.trigger('edit:complete', this); } }, From c46b885148b04299e65484eaf0f298927bf8c748 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 22 Jul 2020 15:25:07 +0300 Subject: [PATCH 05/13] [SSE] For bug 45923 --- apps/spreadsheeteditor/main/app/controller/Toolbar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index a75270b3a..a10a6859d 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -2378,7 +2378,7 @@ define([ this._state.inpivot = !!info.asc_getPivotTableInfo(); toolbar.lockToolbar(SSE.enumLock.editPivot, this._state.inpivot, { array: toolbar.btnsSetAutofilter.concat(toolbar.btnCustomSort, toolbar.btnMerge, toolbar.btnInsertHyperlink, toolbar.btnInsertTable, toolbar.btnRemoveDuplicates)}); - toolbar.lockToolbar(SSE.enumLock.noSlicerSource, !(this._state.inpivot || formatTableInfo), { array: [toolbar.btnInsertSlicer]}); + toolbar.lockToolbar(SSE.enumLock.noSlicerSource, !(formatTableInfo), { array: [toolbar.btnInsertSlicer]}); need_disable = !this.appConfig.canModifyFilter; toolbar.lockToolbar(SSE.enumLock.cantModifyFilter, need_disable, { array: toolbar.btnsSetAutofilter.concat(toolbar.btnsSortDown, toolbar.btnsSortUp, toolbar.btnCustomSort, toolbar.btnTableTemplate, From 644c6ba6779c03754751aefd6314aed881af3f0c Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 22 Jul 2020 16:02:55 +0300 Subject: [PATCH 06/13] Optimize autocorrect dialog --- apps/common/main/lib/view/AutoCorrectDialog.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/common/main/lib/view/AutoCorrectDialog.js b/apps/common/main/lib/view/AutoCorrectDialog.js index f7d348a95..9f76d8069 100644 --- a/apps/common/main/lib/view/AutoCorrectDialog.js +++ b/apps/common/main/lib/view/AutoCorrectDialog.js @@ -106,7 +106,7 @@ define([ // special this.mathList = new Common.UI.ListView({ el: $window.find('#auto-correct-math-list'), - store: new Common.UI.DataViewStore(this.props), + store: new Common.UI.DataViewStore(this.props.slice(0, 11)), simpleAddMode: true, template: _.template(['
'].join('')), itemTemplate: _.template([ @@ -180,6 +180,10 @@ define([ _.delay(function(){ $('input', me.inputReplace.cmpEl).select().focus(); },100); + + _.delay(function(){ + me.mathList.store.reset(me.props); + },100); }, onBtnClick: function(event) { From 10c4de8eddb002e631e84b15dd99ac1212437eaa Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 22 Jul 2020 16:03:12 +0300 Subject: [PATCH 07/13] Fix styles --- apps/common/main/resources/less/buttons.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/common/main/resources/less/buttons.less b/apps/common/main/resources/less/buttons.less index 8e3386b15..c937d79d4 100644 --- a/apps/common/main/resources/less/buttons.less +++ b/apps/common/main/resources/less/buttons.less @@ -309,7 +309,7 @@ &:not(.icon-top) .caption:not(:empty) { - padding: 0 5px; + padding: 0 4px; } .icon { From a1c5daff2d77e1599e100e7f96b62b4b844a6a09 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 27 Jul 2020 10:38:54 +0300 Subject: [PATCH 08/13] [PE][SSE] Fix creating bulleted list --- .../main/lib/view/ListSettingsDialog.js | 81 +++++++++---------- 1 file changed, 40 insertions(+), 41 deletions(-) diff --git a/apps/common/main/lib/view/ListSettingsDialog.js b/apps/common/main/lib/view/ListSettingsDialog.js index cf529bc62..e5388c8bc 100644 --- a/apps/common/main/lib/view/ListSettingsDialog.js +++ b/apps/common/main/lib/view/ListSettingsDialog.js @@ -225,49 +225,48 @@ define([ this.cmbBulletFormat.selectRecord(rec); this.bulletProps = {symbol: rec.get('symbol'), font: rec.get('font')}; this.cmbBulletFormat.on('selected', _.bind(function (combo, record) { - if (this._changedProps) { - if (record.value === 1) { - var me = this, - props = me.bulletProps, - handler = function(dlg, result, settings) { - if (result == 'ok') { - props.changed = true; - props.code = settings.code; - props.font = settings.font; - props.symbol = settings.symbol; - if (me._changedProps) { - me._changedProps.asc_putFont(props.font); - me._changedProps.asc_putSymbol(props.symbol); - } + if (record.value === 1) { + var me = this, + props = me.bulletProps, + handler = function(dlg, result, settings) { + if (result == 'ok') { + props.changed = true; + props.code = settings.code; + props.font = settings.font; + props.symbol = settings.symbol; + if (me._changedProps) { + me._changedProps.asc_putFont(props.font); + me._changedProps.asc_putSymbol(props.symbol); } - var store = combo.store; - if (!store.findWhere({value: 0, symbol: props.symbol, font: props.font})) - store.add({ displayValue: me.txtSymbol + ': ', value: 0, symbol: props.symbol, font: props.font }, {at: store.length-1}); - combo.setData(store.models); - combo.selectRecord(combo.store.findWhere({value: 0, symbol: props.symbol, font: props.font})); - }, - win = new Common.Views.SymbolTableDialog({ - api: me.options.api, - lang: me.options.interfaceLang, - modal: true, - type: 0, - font: props.font, - symbol: props.symbol, - handler: handler - }); - win.show(); - win.on('symbol:dblclick', handler); - } else if (record.value == -1) { + } + var store = combo.store; + if (!store.findWhere({value: 0, symbol: props.symbol, font: props.font})) + store.add({ displayValue: me.txtSymbol + ': ', value: 0, symbol: props.symbol, font: props.font }, {at: store.length-1}); + combo.setData(store.models); + combo.selectRecord(combo.store.findWhere({value: 0, symbol: props.symbol, font: props.font})); + }, + win = new Common.Views.SymbolTableDialog({ + api: me.options.api, + lang: me.options.interfaceLang, + modal: true, + type: 0, + font: props.font, + symbol: props.symbol, + handler: handler + }); + win.show(); + win.on('symbol:dblclick', handler); + } else if (record.value == -1) { + if (this._changedProps) this._changedProps.asc_putListType(0, record.value); - } else { - this.bulletProps.changed = true; - this.bulletProps.code = record.code; - this.bulletProps.font = record.font; - this.bulletProps.symbol = record.symbol; - if (this._changedProps) { - this._changedProps.asc_putFont(this.bulletProps.font); - this._changedProps.asc_putSymbol(this.bulletProps.symbol); - } + } else { + this.bulletProps.changed = true; + this.bulletProps.code = record.code; + this.bulletProps.font = record.font; + this.bulletProps.symbol = record.symbol; + if (this._changedProps) { + this._changedProps.asc_putFont(this.bulletProps.font); + this._changedProps.asc_putSymbol(this.bulletProps.symbol); } } }, this)); From ec887092effe3d4c7b7a909e0e555466ccb709ad Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Mon, 27 Jul 2020 18:31:29 +0300 Subject: [PATCH 09/13] [SSE] Fix bug 45952 --- apps/common/main/lib/component/TabBar.js | 2 +- apps/spreadsheeteditor/main/app/controller/Statusbar.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/common/main/lib/component/TabBar.js b/apps/common/main/lib/component/TabBar.js index 8a0a84a0f..19ac737ee 100644 --- a/apps/common/main/lib/component/TabBar.js +++ b/apps/common/main/lib/component/TabBar.js @@ -241,7 +241,7 @@ define([ lockDrag = true; } }); - if (this.bar.selectTabs.length === this.bar.tabs.length || this.bar.tabs.length === 1) { + if (this.bar.selectTabs.length === this.bar.tabs.length || this.bar.tabs.length === 1 || this.bar.isEditFormula) { lockDrag = true; } this.bar.$el.find('ul > li > span').attr('draggable', !lockDrag); diff --git a/apps/spreadsheeteditor/main/app/controller/Statusbar.js b/apps/spreadsheeteditor/main/app/controller/Statusbar.js index 467c902b8..97a3d5a28 100644 --- a/apps/spreadsheeteditor/main/app/controller/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Statusbar.js @@ -208,6 +208,7 @@ define([ statusbar = this.statusbar; statusbar.isEditFormula = disableAdd; + statusbar.tabbar && (statusbar.tabbar.isEditFormula = disableAdd); statusbar.btnZoomUp.setDisabled(disable); statusbar.btnZoomDown.setDisabled(disable); statusbar.labelZoom[disable?'addClass':'removeClass']('disabled'); From 74774555d7ef778ccccad40c7e6592366fd341d7 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Mon, 27 Jul 2020 18:32:41 +0300 Subject: [PATCH 10/13] [SSE] Fix bug 43570 --- apps/spreadsheeteditor/main/app/controller/Statusbar.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/spreadsheeteditor/main/app/controller/Statusbar.js b/apps/spreadsheeteditor/main/app/controller/Statusbar.js index 97a3d5a28..779b1c9d0 100644 --- a/apps/spreadsheeteditor/main/app/controller/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Statusbar.js @@ -214,6 +214,8 @@ define([ statusbar.labelZoom[disable?'addClass':'removeClass']('disabled'); statusbar.btnAddWorksheet.setDisabled(disable || this.api.asc_isWorkbookLocked() || statusbar.rangeSelectionMode!=Asc.c_oAscSelectionDialogType.None); + statusbar.$el.find('#statusbar_bottom li span').attr('oo_editor_input', !disableAdd); + if (disableAdd && mask.length>0 || !disableAdd && mask.length==0) return; statusbar.$el.find('.statusbar').toggleClass('masked', disableAdd); if(disableAdd) { From a1d7986157974b8e496e766709baebf134835cf3 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Mon, 27 Jul 2020 18:36:41 +0300 Subject: [PATCH 11/13] [SSE] Fix change width of first tab in statusbar when moving sheet --- apps/spreadsheeteditor/main/resources/less/statusbar.less | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/spreadsheeteditor/main/resources/less/statusbar.less b/apps/spreadsheeteditor/main/resources/less/statusbar.less index 3d03bc64e..650e1cf2c 100644 --- a/apps/spreadsheeteditor/main/resources/less/statusbar.less +++ b/apps/spreadsheeteditor/main/resources/less/statusbar.less @@ -246,10 +246,17 @@ &.mousemove { + &:first-child { + > span { + padding-left: 8px; + } + } + > span { border-left: 2px solid @gray-deep; padding-left: 9px; } + &.right { > span { border-left: 1px solid @gray-dark; From becb24995974a300a53325f2965357023ec2f497 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 28 Jul 2020 12:42:59 +0300 Subject: [PATCH 12/13] Fix Bug 45965 --- .../main/app/controller/FormulaDialog.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/FormulaDialog.js b/apps/spreadsheeteditor/main/app/controller/FormulaDialog.js index d1e0cc5f8..49115ccc7 100644 --- a/apps/spreadsheeteditor/main/app/controller/FormulaDialog.js +++ b/apps/spreadsheeteditor/main/app/controller/FormulaDialog.js @@ -233,12 +233,13 @@ define([ // show formula settings var me = this; var name = props.asc_getName(), + origin = this.api.asc_getFormulaNameByLocale(name), descrarr = this.getDescription(Common.Utils.InternalSettings.get("sse-settings-func-locale")), funcprops = { - name: this.api.asc_getFormulaLocaleName(name), - origin: name, - args: ((descrarr && descrarr[name]) ? descrarr[name].a : '').replace(/[,;]/g, this.api.asc_getFunctionArgumentSeparator()), - desc: (descrarr && descrarr[name]) ? descrarr[name].d : '' + name: name, + origin: origin, + args: ((descrarr && descrarr[origin]) ? descrarr[origin].a : '').replace(/[,;]/g, this.api.asc_getFunctionArgumentSeparator()), + desc: (descrarr && descrarr[origin]) ? descrarr[origin].d : '' }; (new SSE.Views.FormulaWizard({ From cc0a57f60aa8049da7ea55cf571a9391db0408a8 Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Tue, 28 Jul 2020 23:24:51 +0300 Subject: [PATCH 13/13] [all] centered doc title depending editor width --- apps/common/main/lib/view/Header.js | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/apps/common/main/lib/view/Header.js b/apps/common/main/lib/view/Header.js index 99d14aced..5ce8af24e 100644 --- a/apps/common/main/lib/view/Header.js +++ b/apps/common/main/lib/view/Header.js @@ -117,7 +117,6 @@ define([ '
' + '' + '
' + - // '' + '
' + '' + @@ -206,11 +205,21 @@ define([ } function onAppShowed(config) { - if ( config.isCrypted && this.labelDocName ) { - this.labelDocName.before( - '
' + - '' + - '
'); + if ( this.labelDocName ) { + if ( config.isCrypted ) { + this.labelDocName.before( + '
' + + '' + + '
'); + } + + var $tools = this.btnSave.$el.parent('#header-tools'); + var _left_width = $tools.prev().outerWidth() + $tools.outerWidth(), + _right_width = this.labelUserName.outerWidth(); + + if ( _left_width < _right_width ) + this.labelDocName.parent().css('padding-left', _right_width - _left_width); + else this.labelDocName.parent().css('padding-right', _left_width - _right_width); } }