From f217483d9d7037b6e34a0c4239cebedbbcf3e217 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Tue, 20 Jul 2021 12:30:09 +0300 Subject: [PATCH 1/9] [SSE] Add second line in statusbar, add hide statusbar button in options --- .../main/app/controller/Statusbar.js | 10 ++++++++++ .../main/app/controller/Viewport.js | 15 ++++++++++++++- .../main/app/template/StatusBar.template | 4 ++++ apps/spreadsheeteditor/main/app/view/Viewport.js | 3 ++- .../main/resources/less/statusbar.less | 4 ++++ 5 files changed, 34 insertions(+), 2 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/Statusbar.js b/apps/spreadsheeteditor/main/app/controller/Statusbar.js index e7f5e70db..d7590624b 100644 --- a/apps/spreadsheeteditor/main/app/controller/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Statusbar.js @@ -67,6 +67,9 @@ define([ 'sheet:setcolor': _.bind(this.setWorksheetColor, this), 'sheet:updateColors': _.bind(this.updateTabsColors, this), 'sheet:move': _.bind(this.moveWorksheet, this) + }, + 'Common.Views.Header': { + 'statusbar:setcompact': _.bind(this.onChangeViewMode, this) } }); }, @@ -787,6 +790,13 @@ define([ this._sheetViewTip.hide(); }, + onChangeViewMode: function(item, compact) { + this.statusbar.fireEvent('view:compact', [this.statusbar, compact]); + Common.localStorage.setBool('sse-compact-statusbar', compact); + Common.NotificationCenter.trigger('layout:changed', 'status'); + Common.NotificationCenter.trigger('edit:complete', this.statusbar); + }, + zoomText : 'Zoom {0}%', errorLastSheet : 'Workbook must have at least one visible worksheet.', errorRemoveSheet: 'Can\'t delete the worksheet.', diff --git a/apps/spreadsheeteditor/main/app/controller/Viewport.js b/apps/spreadsheeteditor/main/app/controller/Viewport.js index 525c719ab..c4267709f 100644 --- a/apps/spreadsheeteditor/main/app/controller/Viewport.js +++ b/apps/spreadsheeteditor/main/app/controller/Viewport.js @@ -72,7 +72,11 @@ define([ 'menu:show': me.onFileMenu.bind(me, 'show') }, 'Statusbar': { - 'sheet:changed': me.onApiSheetChanged.bind(me) + 'sheet:changed': me.onApiSheetChanged.bind(me), + 'view:compact': function (statusbar, state) { + me.header.mnuitemCompactStatusBar.setChecked(state, true); + me.viewport.vlayout.getItem('statusbar').height = state ? 25 : 50; + } }, 'Toolbar': { 'render:before' : function (toolbar) { @@ -210,6 +214,13 @@ define([ }, this)); } + me.header.mnuitemCompactStatusBar = new Common.UI.MenuItem({ + caption: me.header.textHideStatusBar, + checked: Common.localStorage.getBool("sse-compact-statusbar"), + checkable: true, + value: 'statusbar' + }); + me.header.mnuitemHideFormulaBar = new Common.UI.MenuItem({ caption : me.textHideFBar, checked : Common.localStorage.getBool('sse-hidden-formula'), @@ -274,6 +285,7 @@ define([ style: 'min-width: 180px;', items: [ me.header.mnuitemCompactToolbar, + me.header.mnuitemCompactStatusBar, me.header.mnuitemHideFormulaBar, {caption:'--'}, me.header.mnuitemHideHeadings, @@ -482,6 +494,7 @@ define([ switch ( item.value ) { case 'toolbar': me.header.fireEvent('toolbar:setcompact', [menu, item.isChecked()]); break; + case 'statusbar': me.header.fireEvent('statusbar:setcompact', [menu, item.isChecked()]); break; case 'formula': me.header.fireEvent('formulabar:hide', [item.isChecked()]); break; case 'headings': me.api.asc_setDisplayHeadings(!item.isChecked()); break; case 'gridlines': me.api.asc_setDisplayGridlines(!item.isChecked()); break; diff --git a/apps/spreadsheeteditor/main/app/template/StatusBar.template b/apps/spreadsheeteditor/main/app/template/StatusBar.template index 8635ded3e..45c720cbf 100644 --- a/apps/spreadsheeteditor/main/app/template/StatusBar.template +++ b/apps/spreadsheeteditor/main/app/template/StatusBar.template @@ -1,5 +1,6 @@
+
@@ -38,4 +39,7 @@
+
+
+
diff --git a/apps/spreadsheeteditor/main/app/view/Viewport.js b/apps/spreadsheeteditor/main/app/view/Viewport.js index d866e501a..2cf849233 100644 --- a/apps/spreadsheeteditor/main/app/view/Viewport.js +++ b/apps/spreadsheeteditor/main/app/view/Viewport.js @@ -99,7 +99,8 @@ define([ stretch: true }, { el: items[3], - height: 25 + alias: 'statusbar', + height: Common.localStorage.getBool('sse-compact-statusbar') ? 25 : 50 }] }); diff --git a/apps/spreadsheeteditor/main/resources/less/statusbar.less b/apps/spreadsheeteditor/main/resources/less/statusbar.less index d0ea085d6..0c709d596 100644 --- a/apps/spreadsheeteditor/main/resources/less/statusbar.less +++ b/apps/spreadsheeteditor/main/resources/less/statusbar.less @@ -426,6 +426,10 @@ height: 25px; } } + + .statusbar-top, .statusbar-bottom { + height: 25px; + } } .statusbar-mask { From e5676c4c7c284c17a274579e4967eb1193759558 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Mon, 26 Jul 2021 16:54:28 +0300 Subject: [PATCH 2/9] [SSE] Remove unused code --- .../main/app/controller/Statusbar.js | 35 ------------------- 1 file changed, 35 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/Statusbar.js b/apps/spreadsheeteditor/main/app/controller/Statusbar.js index d7590624b..c45c94cc0 100644 --- a/apps/spreadsheeteditor/main/app/controller/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Statusbar.js @@ -528,41 +528,6 @@ define([ } }, - moveCurrentTab: function (direction) { - if (this.api) { - var indTab = 0, - tabBar = this.statusbar.tabbar, - index = this.api.asc_getActiveWorksheetIndex(), - length = tabBar.tabs.length; - - this.statusbar.tabMenu.hide(); - this.api.asc_closeCellEditor(); - - for (var i = 0; i < length; ++i) { - if (tabBar.tabs[i].sheetindex === index) { - indTab = i; - - if (direction > 0) { - indTab++; - if (indTab >= length) { - indTab = 0; - } - } else { - indTab--; - if (indTab < 0) { - indTab = length - 1; - } - } - - tabBar.setActive(indTab); - this.api.asc_showWorksheet(tabBar.getAt(indTab).sheetindex); - - break; - } - } - } - }, - // colors onApiUpdateTabColor: function (index) { From eda6510de07df8b5c3126e5c86345e3734205ddb Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Mon, 26 Jul 2021 16:57:01 +0300 Subject: [PATCH 3/9] [SSE] Add methods and styles to change compact mode of statusbar --- .../main/app/controller/Statusbar.js | 2 + .../main/app/template/StatusBar.template | 10 ++-- .../main/app/view/Statusbar.js | 52 +++++++++++++++-- .../main/resources/less/statusbar.less | 58 ++++++++++++++++--- 4 files changed, 103 insertions(+), 19 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/Statusbar.js b/apps/spreadsheeteditor/main/app/controller/Statusbar.js index c45c94cc0..90eac1398 100644 --- a/apps/spreadsheeteditor/main/app/controller/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Statusbar.js @@ -759,6 +759,8 @@ define([ this.statusbar.fireEvent('view:compact', [this.statusbar, compact]); Common.localStorage.setBool('sse-compact-statusbar', compact); Common.NotificationCenter.trigger('layout:changed', 'status'); + this.statusbar.onChangeCompact(compact); + Common.NotificationCenter.trigger('edit:complete', this.statusbar); }, diff --git a/apps/spreadsheeteditor/main/app/template/StatusBar.template b/apps/spreadsheeteditor/main/app/template/StatusBar.template index 45c720cbf..5102ba865 100644 --- a/apps/spreadsheeteditor/main/app/template/StatusBar.template +++ b/apps/spreadsheeteditor/main/app/template/StatusBar.template @@ -1,6 +1,5 @@
-
@@ -24,7 +23,7 @@
-
+
@@ -32,14 +31,17 @@
-
+
+
+
-
+
+
diff --git a/apps/spreadsheeteditor/main/app/view/Statusbar.js b/apps/spreadsheeteditor/main/app/view/Statusbar.js index 17a4ac20f..ad85a36de 100644 --- a/apps/spreadsheeteditor/main/app/view/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/view/Statusbar.js @@ -79,6 +79,12 @@ define([ scope: this })); + this.cntStatusbar = $('.statusbar', this.el); + this.isCompact = Common.localStorage.getBool('sse-compact-statusbar', false); + if (!this.isCompact) { + this.cntStatusbar.addClass('no-compact'); + } + this.editMode = false; this.rangeSelectionMode = Asc.c_oAscSelectionDialogType.None; @@ -472,6 +478,12 @@ define([ this.boxZoom = $('#status-zoom-box', this.el); this.boxZoom.find('.separator').css('border-left-color','transparent'); + this.boxNumberSheets = $('#status-number-of-sheet', this.el); + this.isCompact && this.boxNumberSheets.hide(); + + this.boxAction = $('#status-action', this.el); + this.isCompact && this.boxAction.hide(); + this.$el.append('
'); this.$customizeStatusBarMenu = this.$el.find('#statusbar-menu'); this.$customizeStatusBarMenu.on({ @@ -789,19 +801,32 @@ define([ }, updateTabbarBorders: function() { - var right = parseInt(this.boxZoom.css('width')), visible = false; + var visible = false; + var right = parseInt(this.boxZoom.css('width')); if (this.boxMath.is(':visible')) { - right += parseInt(this.boxMath.css('width')); + this.boxMath.css({'right': right + 'px'}); + right += parseInt(this.boxMath.css('width')); visible = true; } - if (this.boxFiltered.is(':visible')) { - right += parseInt(this.boxFiltered.css('width')); + this.boxFiltered.css({'right': right + 'px'}); + right += parseInt(this.boxFiltered.css('width')); visible = true; } + this.boxZoom.find('.separator').css('border-left-color', visible ? '' : 'transparent'); - this.boxZoom.find('.separator').css('border-left-color',visible?'':'transparent'); - this.tabBarBox.css('right', right + 'px'); + if (this.isCompact) { + this.boxMath.is(':visible') && this.boxMath.css({'top': '0px', 'bottom': 'auto'}); + this.boxFiltered.is(':visible') && this.boxFiltered.css({'top': '0px', 'bottom': 'auto'}); + this.boxZoom.css({'top': '0px', 'bottom': 'auto'}); + this.tabBarBox.css('right', right + 'px'); + } else { + this.boxAction.css({'right': right + 'px'}) + this.boxMath.is(':visible') && this.boxMath.css({'top': 'auto', 'bottom': '0px'}); + this.boxFiltered.is(':visible') && this.boxFiltered.css({'top': 'auto', 'bottom': '0px'}); + this.boxZoom.css({'top': 'auto', 'bottom': '0px'}); + this.tabBarBox.css('right', '0px'); + } }, updateVisibleItemsBoxMath: function () { @@ -879,6 +904,21 @@ define([ item.$el.find('a').blur(); }, + onChangeCompact: function (compact) { + this.isCompact = compact; + if (compact) { + this.cntStatusbar.removeClass('no-compact'); + this.boxNumberSheets.hide(); + this.boxAction.hide(); + } else { + this.cntStatusbar.addClass('no-compact'); + this.boxNumberSheets.show(); + this.boxAction.show(); + } + this.updateTabbarBorders(); + this.onTabInvisible(undefined, this.tabbar.checkInvisible(true)); + }, + tipZoomIn : 'Zoom In', tipZoomOut : 'Zoom Out', tipZoomFactor : 'Magnification', diff --git a/apps/spreadsheeteditor/main/resources/less/statusbar.less b/apps/spreadsheeteditor/main/resources/less/statusbar.less index 0c709d596..86008040f 100644 --- a/apps/spreadsheeteditor/main/resources/less/statusbar.less +++ b/apps/spreadsheeteditor/main/resources/less/statusbar.less @@ -6,18 +6,26 @@ width: 112px; float: left; padding: 3px 12px 0 10px; + height: 25px; } #status-zoom-box { width: 160px; - float: right; + //float: right; padding-top: 3px; + position: absolute; + right: 0; + height: 25px; + .separator { - margin-right: 10px; margin-top: -3px; } + #status-btn-zoomdown { + margin-left: 10px; + } + #status-label-zoom { cursor: pointer; text-align: center; @@ -120,11 +128,17 @@ #status-math-box, #status-filtered-box { - float: right; + //float: right; padding-top: 6px; padding-right: 14px; + position: absolute; + height: 25px; + label { + &:first-of-type { + padding-left: 14px; + } &:not(:last-child) { padding-right: 10px; } @@ -138,10 +152,10 @@ #status-sheets-bar-box { position: absolute; overflow: hidden; - height: 32px; + height: 25px; left: 112px; right: 160px; - margin-right: 3px; + //margin-right: 3px; } #status-sheets-bar { @@ -337,6 +351,36 @@ } } + #status-number-of-sheet , #status-action { + position: absolute; + height: 25px; + bottom: 0; + display: flex; + justify-content: space-around; + .status-label { + font-weight: bold; + color: @text-normal; + margin-top: 5px; + width: 100%; + text-align: center; + } + } + + #status-number-of-sheet { + width: 135px; + } + + #status-action { + left: 135px; + } + + &.no-compact { + #status-tabs-scroll, #status-sheets-bar-box, #status-addtabs-box { + border-bottom: @scaled-one-px-value-ie solid @border-toolbar-ie; + border-bottom: @scaled-one-px-value solid @border-toolbar; + } + } + .btn-tpl(@top-position) { .btn-icon { background-position: 0 @top-position; @@ -426,10 +470,6 @@ height: 25px; } } - - .statusbar-top, .statusbar-bottom { - height: 25px; - } } .statusbar-mask { From 3f0cc170394df9abd29ee3da311de9b30ef71b3b Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Wed, 28 Jul 2021 19:49:34 +0300 Subject: [PATCH 4/9] [SSE] Made changing of status items in statusbar --- .../main/app/controller/LeftMenu.js | 2 +- .../main/app/controller/Main.js | 72 +++++++++++++++---- .../main/app/controller/Statusbar.js | 13 ++++ .../main/app/template/StatusBar.template | 4 +- .../main/app/view/Statusbar.js | 21 ++++++ apps/spreadsheeteditor/main/locale/en.json | 3 + 6 files changed, 100 insertions(+), 15 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js index ea2bb5554..b0b515451 100644 --- a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js +++ b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js @@ -259,7 +259,7 @@ define([ case 'print': Common.NotificationCenter.trigger('print', this.leftMenu); break; case 'exit': Common.NotificationCenter.trigger('goback'); break; case 'edit': -// this.getApplication().getController('Statusbar').setStatusCaption(this.requestEditRightsText); + this.getApplication().getController('Statusbar').setStatusCaption(this.requestEditRightsText); Common.Gateway.requestEditRights(); break; case 'new': diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 539f90883..540104bc0 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -661,10 +661,23 @@ define([ } action = this.stackLongActions.get({type: Asc.c_oAscAsyncActionType.Information}); - action && this.setLongActionView(action); + if (action) { + this.setLongActionView(action); + } else { + var me = this; + if ((id == Asc.c_oAscAsyncAction['Save'] || id == Asc.c_oAscAsyncAction['ForceSaveButton']) && !this.appOptions.isOffline) { + if (this._state.fastCoauth && this._state.usersCount > 1) { + me._state.timerSave = setTimeout(function () { + me.getApplication().getController('Statusbar').setStatusCaption(me.textChangesSaved, false, 3000); + }, 500); + } else + me.getApplication().getController('Statusbar').setStatusCaption(me.textChangesSaved, false, 3000); + } else + this.getApplication().getController('Statusbar').setStatusCaption(''); + } if (id == Asc.c_oAscAsyncAction.Save) { - this.toolbarView && this.toolbarView.synchronizeChanges(); + this.synchronizeChanges(); } action = this.stackLongActions.get({type: Asc.c_oAscAsyncActionType.BlockInteraction}); @@ -686,83 +699,97 @@ define([ }, setLongActionView: function(action) { - var title = ''; + var title = '', text = '', force = false; switch (action.id) { case Asc.c_oAscAsyncAction.Open: title = this.openTitleText; + text = this.openTextText; break; - case Asc.c_oAscAsyncAction.Save: - title = this.saveTitleText; - break; - + case Asc.c_oAscAsyncAction['Save']: + case Asc.c_oAscAsyncAction['ForceSaveButton']: case Asc.c_oAscAsyncAction.ForceSaveTimeout: - break; - - case Asc.c_oAscAsyncAction.ForceSaveButton: + clearTimeout(this._state.timerSave); + force = true; + text = (!this.appOptions.isOffline) ? this.saveTextText : ''; break; case Asc.c_oAscAsyncAction.LoadDocumentFonts: title = this.loadFontsTitleText; + text = this.loadFontsTextText; break; case Asc.c_oAscAsyncAction.LoadDocumentImages: title = this.loadImagesTitleText; + text = this.loadImagesTextText; break; case Asc.c_oAscAsyncAction.LoadFont: title = this.loadFontTitleText; + text = this.loadFontTextText; break; case Asc.c_oAscAsyncAction.LoadImage: title = this.loadImageTitleText; + text = this.loadImageTextText; break; case Asc.c_oAscAsyncAction.DownloadAs: title = this.downloadTitleText; + text = this.downloadTextText; break; case Asc.c_oAscAsyncAction.Print: title = this.printTitleText; + text = this.printTextText; break; case Asc.c_oAscAsyncAction.UploadImage: title = this.uploadImageTitleText; + text = this.uploadImageTextText; break; case Asc.c_oAscAsyncAction.Recalc: title = this.titleRecalcFormulas; + text = this.textRecalcFormulas; break; case Asc.c_oAscAsyncAction.SlowOperation: title = this.textPleaseWait; + text = this.textPleaseWait; break; case Asc.c_oAscAsyncAction['PrepareToSave']: title = this.savePreparingText; + text = this.savePreparingTitle; break; case Asc.c_oAscAsyncAction['Waiting']: title = this.waitText; + text = this.waitText; break; case ApplyEditRights: title = this.txtEditingMode; + text = this.waitText; break; case LoadingDocument: title = this.loadingDocumentTitleText + ' '; + text = this.loadingDocumentTitleText; break; case Asc.c_oAscAsyncAction['Disconnect']: title = this.textDisconnect; + text = this.textDisconnect; this.disableEditing(true, true); break; default: if (typeof action.id == 'string'){ title = action.id; + text = action.id; } break; } @@ -775,10 +802,14 @@ define([ this.api.asc_enableKeyEvents(false); this.loadMask.show(); } + } else { + this.getApplication().getController('Statusbar').setStatusCaption(text, force); } }, onApplyEditRights: function(data) { + this.getApplication().getController('Statusbar').setStatusCaption(''); + if (data && !data.allowed) { Common.UI.info({ title: this.requestEditFailedTitleText, @@ -1383,6 +1414,7 @@ define([ rightmenuController.getView('RightMenu').hide(); /** coauthoring begin **/ + me.api.asc_registerCallback('asc_onCollaborativeChanges', _.bind(me.onCollaborativeChanges, me)); me.api.asc_registerCallback('asc_onAuthParticipantsChanged', _.bind(me.onAuthParticipantsChanged, me)); me.api.asc_registerCallback('asc_onParticipantsChanged', _.bind(me.onAuthParticipantsChanged, me)); me.api.asc_registerCallback('asc_onConnectionStateChanged', _.bind(me.onUserConnection, me)); @@ -1894,6 +1926,8 @@ define([ } this._isDocReady && (this._state.isDocModified !== change) && Common.Gateway.setDocumentModified(change); + if (change && (!this._state.fastCoauth || this._state.usersCount<2)) + this.getApplication().getController('Statusbar').setStatusCaption('', true); this._state.isDocModified = change; } @@ -2449,7 +2483,7 @@ define([ oldval = this._state.fastCoauth; this._state.fastCoauth = (value===null || parseInt(value) == 1); if (this._state.fastCoauth && !oldval) - this.toolbarView.synchronizeChanges(); + this.synchronizeChanges(); } if (this.appOptions.canForcesave) { this.appOptions.forcesave = Common.localStorage.getBool("sse-settings-forcesave", this.appOptions.canForcesave); @@ -2634,6 +2668,18 @@ define([ return true; }, + onCollaborativeChanges: function() { + if (this._state.hasCollaborativeChanges) return; + this._state.hasCollaborativeChanges = true; + if (this.appOptions.isEdit) + this.getApplication().getController('Statusbar').setStatusCaption(this.textNeedSynchronize, true); + }, + + synchronizeChanges: function() { + this.toolbarView && this.toolbarView.synchronizeChanges(); + this._state.hasCollaborativeChanges = false; + }, + leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' then \'Save\' to save them. Click \'Leave this Page\' to discard all the unsaved changes.', criticalErrorTitle: 'Error', notcriticalErrorTitle: 'Warning', @@ -3036,7 +3082,9 @@ define([ txtOr: '%1 or %2', errorLang: 'The interface language is not loaded.
Please contact your Document Server administrator.', confirmReplaceFormulaInTable: 'Formulas in the header row will be removed and converted to static text.
Do you want to continue?', - textDisconnect: 'Connection is lost' + textDisconnect: 'Connection is lost', + textNeedSynchronize: 'You have an updates', + textChangesSaved: 'All changes saved' } })(), SSE.Controllers.Main || {})) }); diff --git a/apps/spreadsheeteditor/main/app/controller/Statusbar.js b/apps/spreadsheeteditor/main/app/controller/Statusbar.js index 90eac1398..fbb7b28cf 100644 --- a/apps/spreadsheeteditor/main/app/controller/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Statusbar.js @@ -764,6 +764,19 @@ define([ Common.NotificationCenter.trigger('edit:complete', this.statusbar); }, + setStatusCaption: function(text, force, delay) { + if (this.timerCaption && ( ((new Date()) < this.timerCaption) || text.length==0 ) && !force ) + return; + + this.timerCaption = undefined; + if (text.length) { + this.statusbar.showStatusMessage(text); + if (delay>0) + this.timerCaption = (new Date()).getTime() + delay; + } else + this.statusbar.clearStatusMessage(); + }, + zoomText : 'Zoom {0}%', errorLastSheet : 'Workbook must have at least one visible worksheet.', errorRemoveSheet: 'Can\'t delete the worksheet.', diff --git a/apps/spreadsheeteditor/main/app/template/StatusBar.template b/apps/spreadsheeteditor/main/app/template/StatusBar.template index 5102ba865..ce3361bdc 100644 --- a/apps/spreadsheeteditor/main/app/template/StatusBar.template +++ b/apps/spreadsheeteditor/main/app/template/StatusBar.template @@ -39,9 +39,9 @@
- +
- +
diff --git a/apps/spreadsheeteditor/main/app/view/Statusbar.js b/apps/spreadsheeteditor/main/app/view/Statusbar.js index ad85a36de..31af9100f 100644 --- a/apps/spreadsheeteditor/main/app/view/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/view/Statusbar.js @@ -480,9 +480,11 @@ define([ this.boxNumberSheets = $('#status-number-of-sheet', this.el); this.isCompact && this.boxNumberSheets.hide(); + this.labelNumberSheets = $('#label-sheets', this.boxNumberSheets); this.boxAction = $('#status-action', this.el); this.isCompact && this.boxAction.hide(); + this.labelAction = $('#label-action', this.boxAction); this.$el.append('
'); this.$customizeStatusBarMenu = this.$el.find('#statusbar-menu'); @@ -608,6 +610,8 @@ define([ this.btnAddWorksheet.setDisabled(me.mode.isDisconnected || me.api.asc_isWorkbookLocked() || me.api.isCellEdited); $('#status-label-zoom').text(Common.Utils.String.format(this.zoomText, Math.floor((this.api.asc_getZoom() +.005)*100))); + this.updateNumberOfSheet(sindex, wc); + me.fireEvent('sheet:changed', [me, sindex]); me.fireEvent('sheet:updateColors', [true]); Common.NotificationCenter.trigger('comments:updatefilter', ['doc', 'sheet' + me.api.asc_getActiveWorksheetId()], false); @@ -679,6 +683,8 @@ define([ onSheetChanged: function(o, index, tab) { this.api.asc_showWorksheet(tab.sheetindex); + this.updateNumberOfSheet(tab.sheetindex, this.api.asc_getWorksheetsCount()); + if (this.hasTabInvisible && !this.tabbar.isTabVisible(index)) { this.tabbar.setTabVisible(index); } @@ -919,6 +925,21 @@ define([ this.onTabInvisible(undefined, this.tabbar.checkInvisible(true)); }, + updateNumberOfSheet: function (active, count) { + this.labelNumberSheets.text( + Common.Utils.String.format(this.sheetIndexText, active + 1, count) + ); + }, + + showStatusMessage: function(message) { + this.labelAction.text(message); + }, + + clearStatusMessage: function() { + this.labelAction.text(''); + }, + + sheetIndexText : 'Sheet {0} of {1}', tipZoomIn : 'Zoom In', tipZoomOut : 'Zoom Out', tipZoomFactor : 'Magnification', diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 86156586d..29499b4e1 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -1009,6 +1009,8 @@ "SSE.Controllers.Main.warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.
Contact %1 sales team for personal upgrade terms.", "SSE.Controllers.Main.warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.", "SSE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.", + "SSE.Controllers.Main.textNeedSynchronize": "You have an updates", + "SSE.Controllers.Main.textChangesSaved": "All changes saved", "SSE.Controllers.Print.strAllSheets": "All Sheets", "SSE.Controllers.Print.textFirstCol": "First column", "SSE.Controllers.Print.textFirstRow": "First row", @@ -3012,6 +3014,7 @@ "SSE.Views.Statusbar.tipZoomOut": "Zoom out", "SSE.Views.Statusbar.ungroupSheets": "Ungroup Sheets", "SSE.Views.Statusbar.zoomText": "Zoom {0}%", + "SSE.Views.Statusbar.sheetIndexText": "Sheet {0} of {1}", "SSE.Views.TableOptionsDialog.errorAutoFilterDataRange": "The operation could not be done for the selected range of cells.
Select a uniform data range different from the existing one and try again.", "SSE.Views.TableOptionsDialog.errorFTChangeTableRangeError": "Operation could not be completed for the selected cell range.
Select a range so that the first table row was on the same row
and the resulting table overlapped the current one.", "SSE.Views.TableOptionsDialog.errorFTRangeIncludedOtherTables": "Operation could not be completed for the selected cell range.
Select a range which does not include other tables.", From 44a1232366ceffa3794cc0d36489816fc88ea00c Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Thu, 29 Jul 2021 15:47:51 +0300 Subject: [PATCH 5/9] [SSE] Fix align position of statusbar menu, fix styles in statusbar --- apps/spreadsheeteditor/main/app/view/Statusbar.js | 3 ++- apps/spreadsheeteditor/main/resources/less/statusbar.less | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/Statusbar.js b/apps/spreadsheeteditor/main/app/view/Statusbar.js index 31af9100f..296508997 100644 --- a/apps/spreadsheeteditor/main/app/view/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/view/Statusbar.js @@ -403,8 +403,9 @@ define([ ''); this.customizeStatusBarMenu = new Common.UI.Menu({ - style: 'margin-top: -14px; margin-left: -7px;', + style: 'margin-top: 0px; margin-left: -7px;', menuAlign: 'bl-tl', + menuAlignEl: $(this.el), items: [ //{template: _.template('
' + this.textCustomizeStatusBar + '
')}, //{caption: '--'}, diff --git a/apps/spreadsheeteditor/main/resources/less/statusbar.less b/apps/spreadsheeteditor/main/resources/less/statusbar.less index 86008040f..a1b0e057a 100644 --- a/apps/spreadsheeteditor/main/resources/less/statusbar.less +++ b/apps/spreadsheeteditor/main/resources/less/statusbar.less @@ -136,15 +136,14 @@ height: 25px; label { - &:first-of-type { - padding-left: 14px; - } &:not(:last-child) { padding-right: 10px; } } .separator { + position: relative; + padding-right: 11px; margin-top: -6px; } } @@ -376,6 +375,7 @@ &.no-compact { #status-tabs-scroll, #status-sheets-bar-box, #status-addtabs-box { + height: 26px; border-bottom: @scaled-one-px-value-ie solid @border-toolbar-ie; border-bottom: @scaled-one-px-value solid @border-toolbar; } From 286876fe3dcac08894279354f67d66d9206505d3 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Tue, 10 Aug 2021 18:34:00 +0300 Subject: [PATCH 6/9] [SSE] Change statusbar, set compact by default, add status block in compact statusbar, add opportunity to hide this block by context menu --- .../main/app/controller/Viewport.js | 2 +- .../main/app/template/StatusBar.template | 1 + .../main/app/view/Statusbar.js | 60 ++++++++++++++----- .../main/app/view/Viewport.js | 2 +- .../main/resources/less/statusbar.less | 6 +- 5 files changed, 48 insertions(+), 23 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/Viewport.js b/apps/spreadsheeteditor/main/app/controller/Viewport.js index c4267709f..d1b347a9e 100644 --- a/apps/spreadsheeteditor/main/app/controller/Viewport.js +++ b/apps/spreadsheeteditor/main/app/controller/Viewport.js @@ -216,7 +216,7 @@ define([ me.header.mnuitemCompactStatusBar = new Common.UI.MenuItem({ caption: me.header.textHideStatusBar, - checked: Common.localStorage.getBool("sse-compact-statusbar"), + checked: Common.localStorage.getBool("sse-compact-statusbar", true), checkable: true, value: 'statusbar' }); diff --git a/apps/spreadsheeteditor/main/app/template/StatusBar.template b/apps/spreadsheeteditor/main/app/template/StatusBar.template index ce3361bdc..b0dfb6c95 100644 --- a/apps/spreadsheeteditor/main/app/template/StatusBar.template +++ b/apps/spreadsheeteditor/main/app/template/StatusBar.template @@ -42,6 +42,7 @@
+
diff --git a/apps/spreadsheeteditor/main/app/view/Statusbar.js b/apps/spreadsheeteditor/main/app/view/Statusbar.js index 296508997..da4d226ed 100644 --- a/apps/spreadsheeteditor/main/app/view/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/view/Statusbar.js @@ -80,7 +80,7 @@ define([ })); this.cntStatusbar = $('.statusbar', this.el); - this.isCompact = Common.localStorage.getBool('sse-compact-statusbar', false); + this.isCompact = Common.localStorage.getBool('sse-compact-statusbar', true); if (!this.isCompact) { this.cntStatusbar.addClass('no-compact'); } @@ -398,8 +398,8 @@ define([ var customizeStatusBarMenuTemplate = _.template(''+ '
'+ - '
<%= caption %>
' + - '' + + '
<%= caption %>
' + + '' + '
'); this.customizeStatusBarMenu = new Common.UI.Menu({ @@ -453,6 +453,15 @@ define([ checked: true, template: customizeStatusBarMenuTemplate, exampleval: '' + }, + { + id: 'saved-status', + caption: this.itemStatus, + value: 'status', + checkable: true, + checked: true, + template: customizeStatusBarMenuTemplate, + exampleval: '' } ] }); @@ -484,7 +493,7 @@ define([ this.labelNumberSheets = $('#label-sheets', this.boxNumberSheets); this.boxAction = $('#status-action', this.el); - this.isCompact && this.boxAction.hide(); + //this.isCompact && this.boxAction.hide(); this.labelAction = $('#label-action', this.boxAction); this.$el.append('
'); @@ -639,8 +648,6 @@ define([ item.options.exampleval = (info.count) ? String(info.count) : ''; } else if (item.options.id === 'math-item-sum') { item.options.exampleval = (info.sum && info.sum.length) ? info.sum : ''; - } else { - item.options.exampleval = ''; } $(item.el).find('label').text(item.options.exampleval); }); @@ -820,20 +827,30 @@ define([ right += parseInt(this.boxFiltered.css('width')); visible = true; } - this.boxZoom.find('.separator').css('border-left-color', visible ? '' : 'transparent'); if (this.isCompact) { + if (this.boxAction.is(':visible')) { + this.boxAction.css({'right': right + 'px', 'left': 'auto', 'width': '140px'}); + this.boxAction.find('.separator').css('border-left-color', ''); + right += parseInt(this.boxAction.css('width')); + visible = true; + } + this.boxMath.is(':visible') && this.boxMath.css({'top': '0px', 'bottom': 'auto'}); this.boxFiltered.is(':visible') && this.boxFiltered.css({'top': '0px', 'bottom': 'auto'}); this.boxZoom.css({'top': '0px', 'bottom': 'auto'}); this.tabBarBox.css('right', right + 'px'); } else { - this.boxAction.css({'right': right + 'px'}) + if (this.boxAction.is(':visible')) { + this.boxAction.css({'right': right + 'px', 'left': '135px', 'width': 'auto'}); + this.boxAction.find('.separator').css('border-left-color', 'transparent'); + } this.boxMath.is(':visible') && this.boxMath.css({'top': 'auto', 'bottom': '0px'}); this.boxFiltered.is(':visible') && this.boxFiltered.css({'top': 'auto', 'bottom': '0px'}); this.boxZoom.css({'top': 'auto', 'bottom': '0px'}); this.tabBarBox.css('right', '0px'); } + this.boxZoom.find('.separator').css('border-left-color', visible ? '' : 'transparent'); }, updateVisibleItemsBoxMath: function () { @@ -896,12 +913,16 @@ define([ onCustomizeStatusBarClick: function (o, item, event) { var value = item.value, checked = item.checked; - this.boxMath.find('#status-math-' + value)[checked ? 'removeClass' : 'addClass']('hide'); - if (this.boxMath.find('label').length === this.boxMath.find('label.hide').length) { - this.boxMath.find('.separator').hide(); + if (value === 'status') { + this.boxAction[checked ? 'removeClass' : 'addClass']('hide'); } else { - if (this.boxMath.find('.separator').is(":hidden")) { - this.boxMath.find('.separator').show(); + this.boxMath.find('#status-math-' + value)[checked ? 'removeClass' : 'addClass']('hide'); + if (this.boxMath.find('label').length === this.boxMath.find('label.hide').length) { + this.boxMath.find('.separator').hide(); + } else { + if (this.boxMath.find('.separator').is(":hidden")) { + this.boxMath.find('.separator').show(); + } } } this.updateVisibleItemsBoxMath(); @@ -916,11 +937,11 @@ define([ if (compact) { this.cntStatusbar.removeClass('no-compact'); this.boxNumberSheets.hide(); - this.boxAction.hide(); + //this.boxAction.hide(); } else { this.cntStatusbar.addClass('no-compact'); this.boxNumberSheets.show(); - this.boxAction.show(); + //this.boxAction.show(); } this.updateTabbarBorders(); this.onTabInvisible(undefined, this.tabbar.checkInvisible(true)); @@ -934,6 +955,12 @@ define([ showStatusMessage: function(message) { this.labelAction.text(message); + this.customizeStatusBarMenu.items.forEach(function (item) { + if (item.options.id === 'saved-status') { + item.options.exampleval = message; + } + $(item.el).find('label').text(item.options.exampleval); + }); }, clearStatusMessage: function() { @@ -975,7 +1002,8 @@ define([ itemCount : 'Count', itemMinimum : 'Minimum', itemMaximum : 'Maximum', - itemSum : 'Sum' + itemSum : 'Sum', + itemStatus : 'Status' }, SSE.Views.Statusbar || {})); SSE.Views.Statusbar.RenameDialog = Common.UI.Window.extend(_.extend({ diff --git a/apps/spreadsheeteditor/main/app/view/Viewport.js b/apps/spreadsheeteditor/main/app/view/Viewport.js index 2cf849233..eebaf3390 100644 --- a/apps/spreadsheeteditor/main/app/view/Viewport.js +++ b/apps/spreadsheeteditor/main/app/view/Viewport.js @@ -100,7 +100,7 @@ define([ }, { el: items[3], alias: 'statusbar', - height: Common.localStorage.getBool('sse-compact-statusbar') ? 25 : 50 + height: Common.localStorage.getBool('sse-compact-statusbar', true) ? 25 : 50 }] }); diff --git a/apps/spreadsheeteditor/main/resources/less/statusbar.less b/apps/spreadsheeteditor/main/resources/less/statusbar.less index a1b0e057a..4eef1a4a8 100644 --- a/apps/spreadsheeteditor/main/resources/less/statusbar.less +++ b/apps/spreadsheeteditor/main/resources/less/statusbar.less @@ -355,7 +355,7 @@ height: 25px; bottom: 0; display: flex; - justify-content: space-around; + justify-content: flex-start; .status-label { font-weight: bold; color: @text-normal; @@ -369,10 +369,6 @@ width: 135px; } - #status-action { - left: 135px; - } - &.no-compact { #status-tabs-scroll, #status-sheets-bar-box, #status-addtabs-box { height: 26px; From ab98e6cedce74b5963f110e459bfd1fa6dccee79 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Wed, 11 Aug 2021 19:26:28 +0300 Subject: [PATCH 7/9] [SSE] Fix paddings of math items in statusbar --- .../main/app/view/Statusbar.js | 5 ++++ .../main/resources/less/statusbar.less | 23 +++++++++++++------ 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/Statusbar.js b/apps/spreadsheeteditor/main/app/view/Statusbar.js index da4d226ed..c4c59654c 100644 --- a/apps/spreadsheeteditor/main/app/view/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/view/Statusbar.js @@ -637,6 +637,11 @@ define([ this.labelSum.text((info.sum && info.sum.length) ? (this.textSum + ': ' + info.sum) : ''); this.labelAverage.text((info.average && info.average.length) ? (this.textAverage + ': ' + info.average) : ''); + this.labelMin[info.min && info.min.length > 0 ? 'show' : 'hide'](); + this.labelMax[info.max && info.max.length > 0 ? 'show' : 'hide'](); + this.labelSum[info.sum && info.sum.length > 0 ? 'show' : 'hide'](); + this.labelAverage[info.average && info.average.length > 0 ? 'show' : 'hide'](); + this.customizeStatusBarMenu.items.forEach(function (item) { if (item.options.id === 'math-item-average') { item.options.exampleval = (info.average && info.average.length) ? info.average : ''; diff --git a/apps/spreadsheeteditor/main/resources/less/statusbar.less b/apps/spreadsheeteditor/main/resources/less/statusbar.less index 4eef1a4a8..d763980b8 100644 --- a/apps/spreadsheeteditor/main/resources/less/statusbar.less +++ b/apps/spreadsheeteditor/main/resources/less/statusbar.less @@ -130,17 +130,10 @@ #status-filtered-box { //float: right; padding-top: 6px; - padding-right: 14px; position: absolute; height: 25px; - label { - &:not(:last-child) { - padding-right: 10px; - } - } - .separator { position: relative; padding-right: 11px; @@ -148,6 +141,22 @@ } } + #status-math-box { + padding-right: 4px; + label { + padding-right: 10px; + } + } + + #status-filtered-box { + padding-right: 14px; + label { + &:not(:last-child) { + padding-right: 10px; + } + } + } + #status-sheets-bar-box { position: absolute; overflow: hidden; From f144a76e1a220993b1dcca90c57186698aea2c7a Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Mon, 16 Aug 2021 17:22:13 +0300 Subject: [PATCH 8/9] [SSE] Change saving status block in statusbar --- apps/common/main/lib/component/TabBar.js | 10 ++++- apps/common/main/lib/view/Header.js | 2 +- .../main/app/controller/Viewport.js | 2 +- .../main/app/view/Statusbar.js | 45 +++++++++++++------ apps/spreadsheeteditor/main/locale/en.json | 3 +- .../main/resources/less/statusbar.less | 15 +++++++ 6 files changed, 59 insertions(+), 18 deletions(-) diff --git a/apps/common/main/lib/component/TabBar.js b/apps/common/main/lib/component/TabBar.js index 00040f394..4ea3bbf18 100644 --- a/apps/common/main/lib/component/TabBar.js +++ b/apps/common/main/lib/component/TabBar.js @@ -686,6 +686,14 @@ define([ newHintTab.attr('data-hint-direction', 'top'); newHintTab.attr('data-hint-offset', 'medium'); newHintTab.attr('data-hint-title', 'M'); - } + }, + + getWidth: function() { + var width = 21; + this.tabs.forEach(function(tab){ + width += tab.$el.width(); + }); + return width; + }, }); }); diff --git a/apps/common/main/lib/view/Header.js b/apps/common/main/lib/view/Header.js index 01280959c..43daf623b 100644 --- a/apps/common/main/lib/view/Header.js +++ b/apps/common/main/lib/view/Header.js @@ -788,7 +788,7 @@ define([ tipUndo: 'Undo', tipRedo: 'Redo', textCompactView: 'Hide Toolbar', - textHideStatusBar: 'Hide Status Bar', + textHideStatusBar: 'Combine sheet and status bars', textHideLines: 'Hide Rulers', textZoom: 'Zoom', textAdvSettings: 'Advanced Settings', diff --git a/apps/spreadsheeteditor/main/app/controller/Viewport.js b/apps/spreadsheeteditor/main/app/controller/Viewport.js index d1b347a9e..636152c0c 100644 --- a/apps/spreadsheeteditor/main/app/controller/Viewport.js +++ b/apps/spreadsheeteditor/main/app/controller/Viewport.js @@ -285,8 +285,8 @@ define([ style: 'min-width: 180px;', items: [ me.header.mnuitemCompactToolbar, - me.header.mnuitemCompactStatusBar, me.header.mnuitemHideFormulaBar, + me.header.mnuitemCompactStatusBar, {caption:'--'}, me.header.mnuitemHideHeadings, me.header.mnuitemHideGridlines, diff --git a/apps/spreadsheeteditor/main/app/view/Statusbar.js b/apps/spreadsheeteditor/main/app/view/Statusbar.js index c4c59654c..10934a68e 100644 --- a/apps/spreadsheeteditor/main/app/view/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/view/Statusbar.js @@ -409,6 +409,16 @@ define([ items: [ //{template: _.template('
' + this.textCustomizeStatusBar + '
')}, //{caption: '--'}, + { + id: 'saved-status', + caption: this.itemStatus, + value: 'status', + checkable: true, + checked: true, + template: customizeStatusBarMenuTemplate, + exampleval: '' + }, + {caption: '--'}, { id: 'math-item-average', caption: this.itemAverage, @@ -453,15 +463,6 @@ define([ checked: true, template: customizeStatusBarMenuTemplate, exampleval: '' - }, - { - id: 'saved-status', - caption: this.itemStatus, - value: 'status', - checkable: true, - checked: true, - template: customizeStatusBarMenuTemplate, - exampleval: '' } ] }); @@ -493,7 +494,7 @@ define([ this.labelNumberSheets = $('#label-sheets', this.boxNumberSheets); this.boxAction = $('#status-action', this.el); - //this.isCompact && this.boxAction.hide(); + this.boxAction.hide(); this.labelAction = $('#label-action', this.boxAction); this.$el.append('
'); @@ -621,6 +622,7 @@ define([ $('#status-label-zoom').text(Common.Utils.String.format(this.zoomText, Math.floor((this.api.asc_getZoom() +.005)*100))); this.updateNumberOfSheet(sindex, wc); + this.updateTabbarBorders(); me.fireEvent('sheet:changed', [me, sindex]); me.fireEvent('sheet:updateColors', [true]); @@ -835,10 +837,17 @@ define([ if (this.isCompact) { if (this.boxAction.is(':visible')) { - this.boxAction.css({'right': right + 'px', 'left': 'auto', 'width': '140px'}); - this.boxAction.find('.separator').css('border-left-color', ''); + var tabsWidth = this.tabbar.getWidth(); + if (Common.Utils.innerWidth() - right - 175 - 140 - tabsWidth > 0) { // docWidth - right - left - this.boxAction.width + var left = tabsWidth + 175; + this.boxAction.css({'right': right + 'px', 'left': left + 'px', 'width': 'auto'}); + this.boxAction.find('.separator').css('border-left-color', 'transparent'); + } else { + this.boxAction.css({'right': right + 'px', 'left': 'auto', 'width': '140px'}); + this.boxAction.find('.separator').css('border-left-color', ''); + visible = true; + } right += parseInt(this.boxAction.css('width')); - visible = true; } this.boxMath.is(':visible') && this.boxMath.css({'top': '0px', 'bottom': 'auto'}); @@ -966,6 +975,14 @@ define([ } $(item.el).find('label').text(item.options.exampleval); }); + if (!this.boxAction.is(':visible')) { + this.boxAction.show(); + } + var me = this; + _.delay(function(){ + me.updateTabbarBorders(); + me.onTabInvisible(undefined, me.tabbar.checkInvisible(true)); + },30); }, clearStatusMessage: function() { @@ -1008,7 +1025,7 @@ define([ itemMinimum : 'Minimum', itemMaximum : 'Maximum', itemSum : 'Sum', - itemStatus : 'Status' + itemStatus : 'Saving status' }, SSE.Views.Statusbar || {})); SSE.Views.Statusbar.RenameDialog = Common.UI.Window.extend(_.extend({ diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 29499b4e1..de83fb994 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -213,7 +213,7 @@ "Common.Views.Header.textBack": "Open file location", "Common.Views.Header.textCompactView": "Hide Toolbar", "Common.Views.Header.textHideLines": "Hide Rulers", - "Common.Views.Header.textHideStatusBar": "Hide Status Bar", + "Common.Views.Header.textHideStatusBar": "Combine sheet and status bars", "Common.Views.Header.textRemoveFavorite": "Remove from Favorites", "Common.Views.Header.textSaveBegin": "Saving...", "Common.Views.Header.textSaveChanged": "Modified", @@ -2993,6 +2993,7 @@ "SSE.Views.Statusbar.itemRename": "Rename", "SSE.Views.Statusbar.itemSum": "Sum", "SSE.Views.Statusbar.itemTabColor": "Tab Color", + "SSE.Views.Statusbar.itemStatus": "Saving status", "SSE.Views.Statusbar.RenameDialog.errNameExists": "Worksheet with such a name already exists.", "SSE.Views.Statusbar.RenameDialog.errNameWrongChar": "A sheet name cannot contain the following characters: \\/*?[]:", "SSE.Views.Statusbar.RenameDialog.labelSheetName": "Sheet Name", diff --git a/apps/spreadsheeteditor/main/resources/less/statusbar.less b/apps/spreadsheeteditor/main/resources/less/statusbar.less index d763980b8..e72c9df19 100644 --- a/apps/spreadsheeteditor/main/resources/less/statusbar.less +++ b/apps/spreadsheeteditor/main/resources/less/statusbar.less @@ -337,10 +337,12 @@ } } &.separator-item { + margin-top: 1px; margin-left: 20px; width: @scaled-one-px-value-ie; width: @scaled-one-px-value; > span { + display: none; padding: 0; margin: 0; width: @scaled-one-px-value-ie; @@ -477,6 +479,19 @@ } } +#statusbar-menu { + .dropdown-menu { + li { + > a { + padding: 5px 12px 5px 26px; + &::before { + margin-left: -22px; + } + } + } + } +} + .statusbar-mask { position: absolute; bottom: 0; From 96cee56f3e6d847dfea716c822b4b57095ab1c87 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Wed, 18 Aug 2021 17:29:07 +0300 Subject: [PATCH 9/9] [SSE] Fix position of statusbar context menu --- apps/spreadsheeteditor/main/app/view/Statusbar.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/spreadsheeteditor/main/app/view/Statusbar.js b/apps/spreadsheeteditor/main/app/view/Statusbar.js index 10934a68e..eaf8a3e6c 100644 --- a/apps/spreadsheeteditor/main/app/view/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/view/Statusbar.js @@ -909,7 +909,9 @@ define([ onCustomizeStatusBarAfterShow: function (obj) { if (obj.atposition) { - obj.setOffset(obj.atposition.left); + var statusHeight = $(this.el).height(), + offsetTop = !this.isCompact && (obj.atposition.top - $(this.el).offset().top > statusHeight/2) ? statusHeight/2 : 0; + obj.setOffset(obj.atposition.left, offsetTop); } this.enableKeyEvents = true; },