From b45ad86ace461b0be258188ba7fad66f6bddb3e0 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Tue, 9 Aug 2022 18:19:31 +0300 Subject: [PATCH 1/2] [DE PE SSE] Fix bug 58291 --- apps/documenteditor/main/app/controller/Search.js | 4 +--- apps/presentationeditor/main/app/controller/Search.js | 4 +--- apps/spreadsheeteditor/main/app/controller/Search.js | 1 + 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Search.js b/apps/documenteditor/main/app/controller/Search.js index 31d3f63e0..579106502 100644 --- a/apps/documenteditor/main/app/controller/Search.js +++ b/apps/documenteditor/main/app/controller/Search.js @@ -407,9 +407,7 @@ define([ this.view.$resultsContainer.show(); this.resultItems.forEach(function (item) { me.view.$resultsContainer.append(item.el); - if (item.selected) { - $(item.el).addClass('selected'); - } + $(item.el)[item.selected ? 'addClass' : 'removeClass']('selected'); $(item.el).on('click', function (el) { me.api.asc_SelectSearchElement(item.id); $('#search-results').find('.item').removeClass('selected'); diff --git a/apps/presentationeditor/main/app/controller/Search.js b/apps/presentationeditor/main/app/controller/Search.js index 0dbf56eea..7c242c2ab 100644 --- a/apps/presentationeditor/main/app/controller/Search.js +++ b/apps/presentationeditor/main/app/controller/Search.js @@ -366,9 +366,7 @@ define([ this.view.$resultsContainer.show(); this.resultItems.forEach(function (item) { me.view.$resultsContainer.append(item.el); - if (item.selected) { - $(item.el).addClass('selected'); - } + $(item.el)[item.selected ? 'addClass' : 'removeClass']('selected'); $(item.el).on('click', function (el) { me.api.asc_SelectSearchElement(item.id); $('#search-results').find('.item').removeClass('selected'); diff --git a/apps/spreadsheeteditor/main/app/controller/Search.js b/apps/spreadsheeteditor/main/app/controller/Search.js index 1eb8e841e..cd4854748 100644 --- a/apps/spreadsheeteditor/main/app/controller/Search.js +++ b/apps/spreadsheeteditor/main/app/controller/Search.js @@ -522,6 +522,7 @@ define([ this.view.$resultsContainer.show(); this.resultItems.forEach(function (item) { var $item = $(item.el).appendTo($tableBody); + item.$el = $item; if (item.selected) { $item.addClass('selected'); } From dc284b212d45dcdc74b9243816ba0910b29df201 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Wed, 10 Aug 2022 20:19:26 +0300 Subject: [PATCH 2/2] [DE PE SSE] Fix bug 58434 --- apps/documenteditor/main/app/view/ViewTab.js | 16 +++++++++++++++- apps/documenteditor/main/locale/en.json | 5 +++++ apps/presentationeditor/main/app/view/ViewTab.js | 13 ++++++++++++- apps/presentationeditor/main/locale/en.json | 5 ++++- apps/spreadsheeteditor/main/app/view/ViewTab.js | 5 ++++- apps/spreadsheeteditor/main/locale/en.json | 1 + 6 files changed, 41 insertions(+), 4 deletions(-) diff --git a/apps/documenteditor/main/app/view/ViewTab.js b/apps/documenteditor/main/app/view/ViewTab.js index 407388c79..fb300ead9 100644 --- a/apps/documenteditor/main/app/view/ViewTab.js +++ b/apps/documenteditor/main/app/view/ViewTab.js @@ -248,6 +248,7 @@ define([ this.lockedControls.push(this.chRulers); Common.Utils.lockControls(_set.disableOnStart, true, {array: this.lockedControls}); + Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this)); }, render: function (el) { @@ -273,6 +274,14 @@ define([ return this.$el; }, + onAppReady: function () { + this.btnNavigation.updateHint(this.tipHeadings); + this.btnFitToPage.updateHint(this.tipFitToPage); + this.btnFitToWidth.updateHint(this.tipFitToWidth); + this.btnInterfaceTheme.updateHint(this.tipInterfaceTheme); + this.btnDarkDocument.updateHint(this.tipDarkDocument); + }, + show: function () { Common.UI.BaseView.prototype.show.call(this); this.fireEvent('show', this); @@ -313,7 +322,12 @@ define([ textStatusBar: 'Status Bar', textAlwaysShowToolbar: 'Always show toolbar', textRulers: 'Rulers', - textDarkDocument: 'Dark document' + textDarkDocument: 'Dark document', + tipHeadings: 'Headings', + tipFitToPage: 'Fit to page', + tipFitToWidth: 'Fit to width', + tipInterfaceTheme: 'Interface theme', + tipDarkDocument: 'Dark document' } }()), DE.Views.ViewTab || {})); }); \ No newline at end of file diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index ed3c3f820..c977040e3 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -2918,6 +2918,11 @@ "DE.Views.ViewTab.textRulers": "Rulers", "DE.Views.ViewTab.textStatusBar": "Status Bar", "DE.Views.ViewTab.textZoom": "Zoom", + "DE.Views.ViewTab.tipHeadings": "Headings", + "DE.Views.ViewTab.tipFitToPage": "Fit to page", + "DE.Views.ViewTab.tipFitToWidth": "Fit to width", + "DE.Views.ViewTab.tipInterfaceTheme": "Interface theme", + "DE.Views.ViewTab.tipDarkDocument": "Dark document", "DE.Views.WatermarkSettingsDialog.textAuto": "Auto", "DE.Views.WatermarkSettingsDialog.textBold": "Bold", "DE.Views.WatermarkSettingsDialog.textColor": "Text color", diff --git a/apps/presentationeditor/main/app/view/ViewTab.js b/apps/presentationeditor/main/app/view/ViewTab.js index 45ea8deae..5fad142cf 100644 --- a/apps/presentationeditor/main/app/view/ViewTab.js +++ b/apps/presentationeditor/main/app/view/ViewTab.js @@ -225,6 +225,8 @@ define([ dataHintOffset: 'small' }); this.lockedControls.push(this.chNotes); + + Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this)); }, render: function (el) { @@ -249,6 +251,12 @@ define([ return this.$el; }, + onAppReady: function () { + this.btnFitToSlide.updateHint(this.tipFitToSlide); + this.btnFitToWidth.updateHint(this.tipFitToWidth); + this.btnInterfaceTheme.updateHint(this.tipInterfaceTheme); + }, + show: function () { Common.UI.BaseView.prototype.show.call(this); this.fireEvent('show', this); @@ -283,7 +291,10 @@ define([ textStatusBar: 'Status Bar', textAlwaysShowToolbar: 'Always show toolbar', textRulers: 'Rulers', - textNotes: 'Notes' + textNotes: 'Notes', + tipFitToSlide: 'Fit to slide', + tipFitToWidth: 'Fit to width', + tipInterfaceTheme: 'Interface theme' } }()), PE.Views.ViewTab || {})); }); \ No newline at end of file diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index a2534b18b..bdf17a15a 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -2368,5 +2368,8 @@ "PE.Views.ViewTab.textNotes": "Notes", "PE.Views.ViewTab.textRulers": "Rulers", "PE.Views.ViewTab.textStatusBar": "Status Bar", - "PE.Views.ViewTab.textZoom": "Zoom" + "PE.Views.ViewTab.textZoom": "Zoom", + "PE.Views.ViewTab.tipFitToSlide": "Fit to slide", + "PE.Views.ViewTab.tipFitToWidth": "Fit to width", + "PE.Views.ViewTab.tipInterfaceTheme": "Interface theme" } \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/app/view/ViewTab.js b/apps/spreadsheeteditor/main/app/view/ViewTab.js index f0ea6aa11..8516fd2e5 100644 --- a/apps/spreadsheeteditor/main/app/view/ViewTab.js +++ b/apps/spreadsheeteditor/main/app/view/ViewTab.js @@ -353,6 +353,8 @@ define([ me.btnCloseView.updateHint(me.tipClose); } + me.btnInterfaceTheme.updateHint(me.tipInterfaceTheme); + if (config.isEdit) { me.btnFreezePanes.setMenu(new Common.UI.Menu({ items: [ @@ -528,7 +530,8 @@ define([ textCombineSheetAndStatusBars: 'Combine sheet and status bars', textAlwaysShowToolbar: 'Always show toolbar', textInterfaceTheme: 'Interface theme', - textShowFrozenPanesShadow: 'Show frozen panes shadow' + textShowFrozenPanesShadow: 'Show frozen panes shadow', + tipInterfaceTheme: 'Interface theme' } }()), SSE.Views.ViewTab || {})); }); diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 025ffaace..e08453090 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -3679,6 +3679,7 @@ "SSE.Views.ViewTab.tipCreate": "Create sheet view", "SSE.Views.ViewTab.tipFreeze": "Freeze panes", "SSE.Views.ViewTab.tipSheetView": "Sheet view", + "SSE.Views.ViewTab.tipInterfaceTheme": "Interface theme", "SSE.Views.WBProtection.hintAllowRanges": "Allow edit ranges", "SSE.Views.WBProtection.hintProtectSheet": "Protect sheet", "SSE.Views.WBProtection.hintProtectWB": "Protect workbook",