[DE] Bug 57795, 57797
This commit is contained in:
parent
7a9876b22a
commit
45aea82e9f
|
@ -326,7 +326,9 @@ define([
|
|||
if (count > 300) {
|
||||
text = this.textTooManyResults;
|
||||
} else {
|
||||
text = current === 'no-results' ? this.textNoSearchResults : (!count ? this.textNoMatches : Common.Utils.String.format(this.textSearchResults, current + 1, count));
|
||||
text = current === 'no-results' ? this.textNoSearchResults :
|
||||
(current === 'stop' ? this.textSearchHasStopped :
|
||||
(!count ? this.textNoMatches : Common.Utils.String.format(this.textSearchResults, current + 1, count)));
|
||||
}
|
||||
this.$reaultsNumber.text(text);
|
||||
this.disableReplaceButtons(!count);
|
||||
|
@ -412,7 +414,8 @@ define([
|
|||
textName: 'Name',
|
||||
textCell: 'Cell',
|
||||
textValue: 'Value',
|
||||
textFormula: 'Formula'
|
||||
textFormula: 'Formula',
|
||||
textSearchHasStopped: 'Search has stopped'
|
||||
|
||||
}, Common.Views.SearchPanel || {}));
|
||||
});
|
|
@ -100,6 +100,7 @@ define([
|
|||
this.api.asc_registerCallback('asc_onEndTextAroundSearch', _.bind(this.onEndTextAroundSearch, this));
|
||||
this.api.asc_registerCallback('asc_onGetTextAroundSearchPack', _.bind(this.onApiGetTextAroundSearch, this));
|
||||
this.api.asc_registerCallback('asc_onRemoveTextAroundSearch', _.bind(this.onApiRemoveTextAroundSearch, this));
|
||||
this.api.asc_registerCallback('asc_onSearchEnd', _.bind(this.onApiSearchEnd, this));
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
@ -215,7 +216,7 @@ define([
|
|||
searchSettings.put_MatchCase(this._state.matchCase);
|
||||
searchSettings.put_WholeWords(this._state.matchWord);
|
||||
if (!this.api.asc_replaceText(searchSettings, textReplace, false)) {
|
||||
this.allResultsWasRemoved();
|
||||
this.removeResultItems();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -242,14 +243,14 @@ define([
|
|||
searchSettings.put_WholeWords(this._state.matchWord);
|
||||
this.api.asc_replaceText(searchSettings, textReplace, true);
|
||||
|
||||
this.allResultsWasRemoved();
|
||||
this.removeResultItems();
|
||||
}
|
||||
},
|
||||
|
||||
allResultsWasRemoved: function () {
|
||||
removeResultItems: function (type) {
|
||||
this.resultItems = [];
|
||||
this.hideResults();
|
||||
this.view.updateResultsNumber(undefined, 0);
|
||||
this.view.updateResultsNumber(type, 0); // type === undefined, count === 0 -> no matches
|
||||
this.view.disableReplaceButtons(true);
|
||||
this._state.currentResult = 0;
|
||||
this._state.resultsNumber = 0;
|
||||
|
@ -420,6 +421,10 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
onApiSearchEnd: function () {
|
||||
this.removeResultItems('stop');
|
||||
},
|
||||
|
||||
notcriticalErrorTitle: 'Warning',
|
||||
warnReplaceString: '{0} is not a valid special character for the Replace With box.'
|
||||
|
||||
|
|
|
@ -480,6 +480,7 @@
|
|||
"Common.Views.SearchPanel.textWholeWords": "Whole words only",
|
||||
"Common.Views.SearchPanel.tipNextResult": "Next result",
|
||||
"Common.Views.SearchPanel.tipPreviousResult": "Previous result",
|
||||
"Common.Views.SearchPanel.textSearchHasStopped": "Search has stopped",
|
||||
"Common.Views.SelectFileDlg.textLoading": "Loading",
|
||||
"Common.Views.SelectFileDlg.textTitle": "Select Data Source",
|
||||
"Common.Views.SignDialog.textBold": "Bold",
|
||||
|
|
Loading…
Reference in a new issue