From 4e91fb42a3dd7ffddd8cd41fb8f6bb9a3253c60d Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Fri, 22 Jul 2022 15:35:24 +0300 Subject: [PATCH 1/3] [DE PE SSE] Bug 55070 --- apps/documenteditor/main/app/view/FileMenuPanels.js | 2 +- apps/presentationeditor/main/app/view/FileMenuPanels.js | 2 +- apps/spreadsheeteditor/main/app/view/FileMenuPanels.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index 549a0e1ea..67fcdb4c3 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -1381,7 +1381,7 @@ define([ this.lblApplication = $markup.findById('#id-info-appname'); this.tblAuthor = $markup.findById('#id-info-author table'); this.trAuthor = $markup.findById('#id-info-add-author').closest('tr'); - this.authorTpl = '
'; + this.authorTpl = '
'; this.tblAuthor.on('click', function(e) { var btn = $markup.find(e.target); diff --git a/apps/presentationeditor/main/app/view/FileMenuPanels.js b/apps/presentationeditor/main/app/view/FileMenuPanels.js index d13f08fbb..32d4287b3 100644 --- a/apps/presentationeditor/main/app/view/FileMenuPanels.js +++ b/apps/presentationeditor/main/app/view/FileMenuPanels.js @@ -1090,7 +1090,7 @@ define([ this.lblApplication = $markup.findById('#id-info-appname'); this.tblAuthor = $markup.findById('#id-info-author table'); this.trAuthor = $markup.findById('#id-info-add-author').closest('tr'); - this.authorTpl = '
'; + this.authorTpl = '
'; this.tblAuthor.on('click', function(e) { var btn = $markup.find(e.target); diff --git a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js index 53709c3d7..50ce1d522 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js @@ -1465,7 +1465,7 @@ SSE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({ this.lblApplication = $markup.findById('#id-info-appname'); this.tblAuthor = $markup.findById('#id-info-author table'); this.trAuthor = $markup.findById('#id-info-add-author').closest('tr'); - this.authorTpl = '
'; + this.authorTpl = '
'; this.tblAuthor.on('click', function(e) { var btn = $markup.find(e.target); From f35f86c5bf566f188ce544c28e4e1e5d44bf6ff8 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Fri, 22 Jul 2022 16:26:37 +0300 Subject: [PATCH 2/3] [DE PE SSE] Fix search styles --- .../main/lib/template/SearchPanel.template | 10 ++++---- .../main/resources/less/searchdialog.less | 24 +++++++++++++++++++ 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/apps/common/main/lib/template/SearchPanel.template b/apps/common/main/lib/template/SearchPanel.template index bdba42b87..f9025bf78 100644 --- a/apps/common/main/lib/template/SearchPanel.template +++ b/apps/common/main/lib/template/SearchPanel.template @@ -17,16 +17,16 @@ -
-
-
+
+
+
- - + + diff --git a/apps/common/main/resources/less/searchdialog.less b/apps/common/main/resources/less/searchdialog.less index 7904cd623..f134428be 100644 --- a/apps/common/main/resources/less/searchdialog.less +++ b/apps/common/main/resources/less/searchdialog.less @@ -160,6 +160,30 @@ color: @text-secondary-ie; color: @text-secondary; } + + .search-nav-btns { + display: inline-block; + float: right; + div { + display: inline-block; + } + #search-adv-back { + margin-right: 4px; + } + } + + .btn-text-default { + display: inline-block; + width: auto; + } + + #search-adv-replace { + min-width: 62px; + } + + #search-adv-replace-all { + min-width: 78px; + } } .search-options-block { From 55dda4ad47b14d7f5aed8d7fe35f9094eae86ab3 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Fri, 22 Jul 2022 17:38:51 +0300 Subject: [PATCH 3/3] [DE PE SSE] Fix bug 58193 --- apps/documenteditor/main/app/controller/Search.js | 4 ++++ apps/documenteditor/main/app/controller/Viewport.js | 3 ++- .../presentationeditor/main/app/controller/Search.js | 4 ++++ .../main/app/controller/Viewport.js | 3 ++- apps/spreadsheeteditor/main/app/controller/Search.js | 12 +++++++++++- .../main/app/controller/Viewport.js | 3 ++- 6 files changed, 25 insertions(+), 4 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Search.js b/apps/documenteditor/main/app/controller/Search.js index 93cc06350..4d2527082 100644 --- a/apps/documenteditor/main/app/controller/Search.js +++ b/apps/documenteditor/main/app/controller/Search.js @@ -444,6 +444,10 @@ define([ } }, + getSearchText: function () { + return this._state.searchText; + }, + notcriticalErrorTitle: 'Warning', warnReplaceString: '{0} is not a valid special character for the Replace With box.', textReplaceSuccess: 'Search has been done. {0} occurrences have been replaced', diff --git a/apps/documenteditor/main/app/controller/Viewport.js b/apps/documenteditor/main/app/controller/Viewport.js index eb3209d5d..713133cde 100644 --- a/apps/documenteditor/main/app/controller/Viewport.js +++ b/apps/documenteditor/main/app/controller/Viewport.js @@ -293,7 +293,8 @@ define([ }, this)); } if (this.header.btnSearch.pressed) { - this.searchBar.show(this.api.asc_GetSelectedText()); + var selectedText = this.api.asc_GetSelectedText(); + this.searchBar.show(selectedText && selectedText.trim() || this.getApplication().getController('Search').getSearchText()); } else { this.searchBar.hide(); } diff --git a/apps/presentationeditor/main/app/controller/Search.js b/apps/presentationeditor/main/app/controller/Search.js index 663902bf7..0dbf56eea 100644 --- a/apps/presentationeditor/main/app/controller/Search.js +++ b/apps/presentationeditor/main/app/controller/Search.js @@ -397,6 +397,10 @@ define([ } }, + getSearchText: function () { + return this._state.searchText; + }, + notcriticalErrorTitle: 'Warning', warnReplaceString: '{0} is not a valid special character for the Replace With box.', textReplaceSuccess: 'Search has been done. {0} occurrences have been replaced', diff --git a/apps/presentationeditor/main/app/controller/Viewport.js b/apps/presentationeditor/main/app/controller/Viewport.js index 0b080326c..50500ed56 100644 --- a/apps/presentationeditor/main/app/controller/Viewport.js +++ b/apps/presentationeditor/main/app/controller/Viewport.js @@ -355,7 +355,8 @@ define([ }, this)); } if (this.header.btnSearch.pressed) { - this.searchBar.show(this.api.asc_GetSelectedText()); + var selectedText = this.api.asc_GetSelectedText(); + this.searchBar.show(selectedText && selectedText.trim() || this.getApplication().getController('Search').getSearchText()); } else { this.searchBar.hide(); } diff --git a/apps/spreadsheeteditor/main/app/controller/Search.js b/apps/spreadsheeteditor/main/app/controller/Search.js index 2324dd13b..1eb8e841e 100644 --- a/apps/spreadsheeteditor/main/app/controller/Search.js +++ b/apps/spreadsheeteditor/main/app/controller/Search.js @@ -57,7 +57,13 @@ define([ 'SearchBar': { 'search:back': _.bind(this.onSearchNext, this, 'back'), 'search:next': _.bind(this.onSearchNext, this, 'next'), - 'search:input': _.bind(this.onInputSearchChange, this), + 'search:input': _.bind(function (text) { + if (this._state.searchText === text) { + Common.NotificationCenter.trigger('search:updateresults', this._state.currentResult, this._state.resultsNumber); + return; + } + this.onInputSearchChange(text); + }, this), 'search:keydown': _.bind(this.onSearchNext, this, 'keydown'), 'show': _.bind(this.onSelectSearchingResults, this, true), 'hide': _.bind(this.onSelectSearchingResults, this, false) @@ -559,6 +565,10 @@ define([ } }, + getSearchText: function () { + return this._state.searchText; + }, + textNoTextFound: 'The data you have been searching for could not be found. Please adjust your search options.', textReplaceSuccess: 'Search has been done. {0} occurrences have been replaced', textReplaceSkipped: 'The replacement has been made. {0} occurrences were skipped.', diff --git a/apps/spreadsheeteditor/main/app/controller/Viewport.js b/apps/spreadsheeteditor/main/app/controller/Viewport.js index 1bf0adc1f..90b38270e 100644 --- a/apps/spreadsheeteditor/main/app/controller/Viewport.js +++ b/apps/spreadsheeteditor/main/app/controller/Viewport.js @@ -321,7 +321,8 @@ define([ }, this)); } if (this.header.btnSearch.pressed) { - this.searchBar.show(this.api.asc_GetSelectedText()); + var selectedText = this.api.asc_GetSelectedText(); + this.searchBar.show(selectedText && selectedText.trim() || this.getApplication().getController('Search').getSearchText()); } else { this.searchBar.hide(); }