From ec0809f84159f758677d22704f1cfdc125bc7805 Mon Sep 17 00:00:00 2001 From: nikita_bartoshuk Date: Mon, 29 Sep 2025 12:10:37 +0300 Subject: [PATCH] added btns disabling event --- apps/pdfeditor/main/app/controller/Search.js | 5 +++++ 1 file changed, 5 insertions(+) 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