diff --git a/apps/common/main/lib/template/SearchPanel.template b/apps/common/main/lib/template/SearchPanel.template
index 86da97ea2..d40ebdb29 100644
--- a/apps/common/main/lib/template/SearchPanel.template
+++ b/apps/common/main/lib/template/SearchPanel.template
@@ -48,9 +48,9 @@
|
-
+
|
diff --git a/apps/common/main/lib/view/SearchPanel.js b/apps/common/main/lib/view/SearchPanel.js
index caf9e3943..71acac950 100644
--- a/apps/common/main/lib/view/SearchPanel.js
+++ b/apps/common/main/lib/view/SearchPanel.js
@@ -128,7 +128,7 @@ define([
me.fireEvent('search:options', ['case-sensitive', field.getValue() === 'checked']);
});
- this.chUseRegExp = new Common.UI.CheckBox({
+ /*this.chUseRegExp = new Common.UI.CheckBox({
el: $('#search-adv-use-regexp'),
labelText: this.textMatchUsingRegExp,
dataHint: '1',
@@ -136,7 +136,7 @@ define([
dataHintOffset: 'small'
}).on('change', function(field) {
me.fireEvent('search:options', ['regexp', field.getValue() === 'checked']);
- });
+ });*/
this.chMatchWord = new Common.UI.CheckBox({
el: $('#search-adv-match-word'),
@@ -311,7 +311,7 @@ define([
this.inputText.setValue(val);
},
- clearResults: function () {
+ clearResultsNumber: function () {
this.updateResultsNumber('no-results');
},
diff --git a/apps/documenteditor/main/app/controller/Search.js b/apps/documenteditor/main/app/controller/Search.js
index d682918f4..c8b85e2fe 100644
--- a/apps/documenteditor/main/app/controller/Search.js
+++ b/apps/documenteditor/main/app/controller/Search.js
@@ -237,6 +237,7 @@ define([
},
onUpdateSearchCurrent: function (current, all) {
+ if (current === -1) return;
this._state.currentResult = current;
this._state.resultsNumber = all;
if (this.view) {
@@ -322,6 +323,7 @@ define([
} else {
this.resultItems = [];
this.view.disableReplaceButtons(true);
+ this.view.clearResultsNumber();
}
this.view.disableNavButtons(this._state.currentResult, this._state.resultsNumber);
},
diff --git a/apps/documenteditor/main/app/controller/Viewport.js b/apps/documenteditor/main/app/controller/Viewport.js
index 9ae5ac5d0..588e27871 100644
--- a/apps/documenteditor/main/app/controller/Viewport.js
+++ b/apps/documenteditor/main/app/controller/Viewport.js
@@ -482,7 +482,6 @@ define([
}
if (this.header.btnSearch.pressed) {
this.searchBar.show(this.api.asc_GetSelectedText());
- leftMenu.getView('LeftMenu').panelSearch.clearResults();
} else {
this.searchBar.hide();
}
diff --git a/apps/presentationeditor/main/app/controller/Viewport.js b/apps/presentationeditor/main/app/controller/Viewport.js
index 7e8f3fed2..12ae69ce9 100644
--- a/apps/presentationeditor/main/app/controller/Viewport.js
+++ b/apps/presentationeditor/main/app/controller/Viewport.js
@@ -534,7 +534,6 @@ define([
}
if (this.header.btnSearch.pressed) {
this.searchBar.show(this.api.asc_GetSelectedText());
- leftMenu.getView('LeftMenu').panelSearch.clearResults();
} else {
this.searchBar.hide();
}