From 54ddb634733ca4d89e6ebb8327192bfce3f5094c Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Thu, 26 May 2022 17:51:00 +0300 Subject: [PATCH] [DE PE SSE] Fix search --- apps/documenteditor/main/app/controller/Search.js | 2 +- apps/documenteditor/main/app/controller/Viewport.js | 2 ++ apps/presentationeditor/main/app/controller/Search.js | 2 +- apps/presentationeditor/main/app/controller/Viewport.js | 2 ++ apps/spreadsheeteditor/main/app/controller/Search.js | 2 +- apps/spreadsheeteditor/main/app/controller/Viewport.js | 2 ++ apps/spreadsheeteditor/main/resources/less/leftmenu.less | 6 ++++-- 7 files changed, 13 insertions(+), 5 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Search.js b/apps/documenteditor/main/app/controller/Search.js index bee8c9b64..a49ed86d8 100644 --- a/apps/documenteditor/main/app/controller/Search.js +++ b/apps/documenteditor/main/app/controller/Search.js @@ -121,7 +121,7 @@ define([ this._state.useRegExp = checked; break; } - if (this._state.searchText !== '') { + if (this._state.searchText) { this.hideResults(); if (this.onQuerySearch()) { if (this.searchTimer) { diff --git a/apps/documenteditor/main/app/controller/Viewport.js b/apps/documenteditor/main/app/controller/Viewport.js index 729e9ae2a..e2d83c757 100644 --- a/apps/documenteditor/main/app/controller/Viewport.js +++ b/apps/documenteditor/main/app/controller/Viewport.js @@ -197,6 +197,8 @@ define([ toolbar = me.getApplication().getController('Toolbar').getView(); toolbar.btnCollabChanges = me.header.btnSave; } + + me.header.btnSearch.on('toggle', me.onSearchToggle.bind(this)); }, onAppReady: function (config) { diff --git a/apps/presentationeditor/main/app/controller/Search.js b/apps/presentationeditor/main/app/controller/Search.js index dc540f244..a8737608f 100644 --- a/apps/presentationeditor/main/app/controller/Search.js +++ b/apps/presentationeditor/main/app/controller/Search.js @@ -118,7 +118,7 @@ define([ this._state.useRegExp = checked; break; } - if (this._state.searchText !== '') { + if (this._state.searchText) { this.hideResults(); if (this.onQuerySearch()) { if (this.searchTimer) { diff --git a/apps/presentationeditor/main/app/controller/Viewport.js b/apps/presentationeditor/main/app/controller/Viewport.js index bb6549705..de46818e5 100644 --- a/apps/presentationeditor/main/app/controller/Viewport.js +++ b/apps/presentationeditor/main/app/controller/Viewport.js @@ -200,6 +200,8 @@ define([ if ( config.customization.toolbarHideFileName ) me.viewport.vlayout.getItem('toolbar').el.addClass('style-skip-docname'); } + + me.header.btnSearch.on('toggle', me.onSearchToggle.bind(this)); }, onAppReady: function (config) { diff --git a/apps/spreadsheeteditor/main/app/controller/Search.js b/apps/spreadsheeteditor/main/app/controller/Search.js index 76192db40..09f2fbac8 100644 --- a/apps/spreadsheeteditor/main/app/controller/Search.js +++ b/apps/spreadsheeteditor/main/app/controller/Search.js @@ -157,7 +157,7 @@ define([ this._state.lookInFormulas = value; break; } - if (runSearch && this._state.searchText !== '') { + if (runSearch && this._state.searchText) { this.hideResults(); if (this.onQuerySearch()) { this.searchTimer && clearInterval(this.searchTimer); diff --git a/apps/spreadsheeteditor/main/app/controller/Viewport.js b/apps/spreadsheeteditor/main/app/controller/Viewport.js index 4cc8a1103..b1555bff0 100644 --- a/apps/spreadsheeteditor/main/app/controller/Viewport.js +++ b/apps/spreadsheeteditor/main/app/controller/Viewport.js @@ -177,6 +177,8 @@ define([ if ( config.customization.toolbarHideFileName ) me.viewport.vlayout.getItem('toolbar').el.addClass('style-skip-docname'); } + + me.header.btnSearch.on('toggle', me.onSearchToggle.bind(this)); }, onAppReady: function (config) { diff --git a/apps/spreadsheeteditor/main/resources/less/leftmenu.less b/apps/spreadsheeteditor/main/resources/less/leftmenu.less index 9146e1ef1..fc7d33bf1 100644 --- a/apps/spreadsheeteditor/main/resources/less/leftmenu.less +++ b/apps/spreadsheeteditor/main/resources/less/leftmenu.less @@ -753,8 +753,9 @@ } } #search-results { - padding-top: 6px; + padding: 0; .search-table { + padding-top: 5px; width:100%; height: 100%; position: relative; @@ -766,6 +767,7 @@ text-align: start; font-weight: normal; padding-left: 4px; + padding-top: 2px; &:not(:first-child) { border-left: @scaled-one-px-value-ie solid @border-divider-ie; border-left: @scaled-one-px-value solid @border-divider; @@ -777,7 +779,7 @@ .search-items { height: calc(100% - 24px); position: absolute; - top: 23px; + top: 28px; width: 100%; overflow: hidden; .item {