[DE PE SSE] Fix search

This commit is contained in:
JuliaSvinareva 2022-05-26 17:51:00 +03:00
parent 4b56a2a2a3
commit 54ddb63473
7 changed files with 13 additions and 5 deletions

View file

@ -121,7 +121,7 @@ define([
this._state.useRegExp = checked; this._state.useRegExp = checked;
break; break;
} }
if (this._state.searchText !== '') { if (this._state.searchText) {
this.hideResults(); this.hideResults();
if (this.onQuerySearch()) { if (this.onQuerySearch()) {
if (this.searchTimer) { if (this.searchTimer) {

View file

@ -197,6 +197,8 @@ define([
toolbar = me.getApplication().getController('Toolbar').getView(); toolbar = me.getApplication().getController('Toolbar').getView();
toolbar.btnCollabChanges = me.header.btnSave; toolbar.btnCollabChanges = me.header.btnSave;
} }
me.header.btnSearch.on('toggle', me.onSearchToggle.bind(this));
}, },
onAppReady: function (config) { onAppReady: function (config) {

View file

@ -118,7 +118,7 @@ define([
this._state.useRegExp = checked; this._state.useRegExp = checked;
break; break;
} }
if (this._state.searchText !== '') { if (this._state.searchText) {
this.hideResults(); this.hideResults();
if (this.onQuerySearch()) { if (this.onQuerySearch()) {
if (this.searchTimer) { if (this.searchTimer) {

View file

@ -200,6 +200,8 @@ define([
if ( config.customization.toolbarHideFileName ) if ( config.customization.toolbarHideFileName )
me.viewport.vlayout.getItem('toolbar').el.addClass('style-skip-docname'); me.viewport.vlayout.getItem('toolbar').el.addClass('style-skip-docname');
} }
me.header.btnSearch.on('toggle', me.onSearchToggle.bind(this));
}, },
onAppReady: function (config) { onAppReady: function (config) {

View file

@ -157,7 +157,7 @@ define([
this._state.lookInFormulas = value; this._state.lookInFormulas = value;
break; break;
} }
if (runSearch && this._state.searchText !== '') { if (runSearch && this._state.searchText) {
this.hideResults(); this.hideResults();
if (this.onQuerySearch()) { if (this.onQuerySearch()) {
this.searchTimer && clearInterval(this.searchTimer); this.searchTimer && clearInterval(this.searchTimer);

View file

@ -177,6 +177,8 @@ define([
if ( config.customization.toolbarHideFileName ) if ( config.customization.toolbarHideFileName )
me.viewport.vlayout.getItem('toolbar').el.addClass('style-skip-docname'); me.viewport.vlayout.getItem('toolbar').el.addClass('style-skip-docname');
} }
me.header.btnSearch.on('toggle', me.onSearchToggle.bind(this));
}, },
onAppReady: function (config) { onAppReady: function (config) {

View file

@ -753,8 +753,9 @@
} }
} }
#search-results { #search-results {
padding-top: 6px; padding: 0;
.search-table { .search-table {
padding-top: 5px;
width:100%; width:100%;
height: 100%; height: 100%;
position: relative; position: relative;
@ -766,6 +767,7 @@
text-align: start; text-align: start;
font-weight: normal; font-weight: normal;
padding-left: 4px; padding-left: 4px;
padding-top: 2px;
&:not(:first-child) { &:not(:first-child) {
border-left: @scaled-one-px-value-ie solid @border-divider-ie; border-left: @scaled-one-px-value-ie solid @border-divider-ie;
border-left: @scaled-one-px-value solid @border-divider; border-left: @scaled-one-px-value solid @border-divider;
@ -777,7 +779,7 @@
.search-items { .search-items {
height: calc(100% - 24px); height: calc(100% - 24px);
position: absolute; position: absolute;
top: 23px; top: 28px;
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
.item { .item {