diff --git a/apps/pdfeditor/main/app/controller/Search.js b/apps/pdfeditor/main/app/controller/Search.js index d6cbac0c27..c2aa47a8e1 100644 --- a/apps/pdfeditor/main/app/controller/Search.js +++ b/apps/pdfeditor/main/app/controller/Search.js @@ -109,6 +109,7 @@ define([ this.api.asc_registerCallback('asc_onRemoveTextAroundSearch', _.bind(this.onApiRemoveTextAroundSearch, this)); this.api.asc_registerCallback('asc_onSearchEnd', _.bind(this.onApiSearchEnd, this)); this.api.asc_registerCallback('asc_onReplaceAll', _.bind(this.onApiTextReplaced, this)); + this.api.asc_registerCallback('asc_onUpdateRedactState', _.bind(this.onUpdateRedactState, this)); } return this; }, @@ -294,6 +295,10 @@ define([ this.view.disableRedactButtons(this.api.asc_GetRedactSearchInfo(this._state.currentResult)) }, + onUpdateRedactState: function () { + this.view.disableRedactButtons(this.api.asc_GetRedactSearchInfo(this._state.currentResult)) + }, + removeResultItems: function (type) { this.resultItems = []; type !== 'replace-all' && this.view.updateResultsNumber(type, 0); // type === undefined, count === 0 -> no matches