added btns disabling event

This commit is contained in:
nikita_bartoshuk
2025-09-29 12:10:37 +03:00
parent 4fdf3e5b57
commit ec0809f841

View File

@ -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