diff --git a/apps/common/main/lib/view/SearchPanel.js b/apps/common/main/lib/view/SearchPanel.js index c7620039f6..9628d4b0b0 100644 --- a/apps/common/main/lib/view/SearchPanel.js +++ b/apps/common/main/lib/view/SearchPanel.js @@ -417,6 +417,7 @@ define([ } this.updateResultsContainerHeight(); !window.SSE && this.disableReplaceButtons(!count); + !window.SSE && this.disableRedactButtons(!count); }, showToManyResults: function () { @@ -488,8 +489,13 @@ define([ }, disableRedactButtons: function (disable) { - this.btnMark.setDisabled(disable.current) - this.btnMarkAll.setDisabled(disable.all) + if (typeof disable === 'object') { + this.btnMark.setDisabled(disable.current) + this.btnMarkAll.setDisabled(disable.all) + } else { + this.btnMark.setDisabled(disable) + this.btnMarkAll.setDisabled(disable) + } }, disableReplaceButtons: function (disable) { diff --git a/apps/pdfeditor/main/app/controller/Search.js b/apps/pdfeditor/main/app/controller/Search.js index 3731621f47..d6cbac0c27 100644 --- a/apps/pdfeditor/main/app/controller/Search.js +++ b/apps/pdfeditor/main/app/controller/Search.js @@ -284,11 +284,14 @@ define([ this.api.asc_RedactSearchElement(this.resultItems[this._state.currentResult].id); if (this.resultItems[this._state.currentResult + 1]) { this.api.asc_SelectSearchElement(this._state.currentResult + 1); + } else { + this.view.disableRedactButtons(this.api.asc_GetRedactSearchInfo(this._state.currentResult)) } }, onMarkAll: function (textSearch) { this.api.asc_RedactAllSearchElements(); + this.view.disableRedactButtons(this.api.asc_GetRedactSearchInfo(this._state.currentResult)) }, removeResultItems: function (type) { @@ -308,7 +311,7 @@ define([ if (this.view) { this.view.updateResultsNumber(current, all); this.view.disableNavButtons(current, all); - this.view.disableRedactButtons(this.api.asc_GetRedactSearchInfo(current)) + this.view.disableRedactButtons(this.api.asc_GetRedactSearchInfo(current)); if (this.resultItems && this.resultItems.length > 0) { this.resultItems.forEach(function (item) { item.selected = false;