[DE PE] Fix bug 58181
This commit is contained in:
parent
b754493691
commit
6c10117086
|
@ -107,6 +107,7 @@ define([
|
||||||
this.api.asc_registerCallback('asc_onGetTextAroundSearchPack', _.bind(this.onApiGetTextAroundSearch, 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_onRemoveTextAroundSearch', _.bind(this.onApiRemoveTextAroundSearch, this));
|
||||||
this.api.asc_registerCallback('asc_onSearchEnd', _.bind(this.onApiSearchEnd, this));
|
this.api.asc_registerCallback('asc_onSearchEnd', _.bind(this.onApiSearchEnd, this));
|
||||||
|
this.api.asc_registerCallback('asc_onReplaceAll', _.bind(this.onApiTextReplaced, this));
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
@ -432,8 +433,21 @@ define([
|
||||||
this.removeResultItems('stop');
|
this.removeResultItems('stop');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onApiTextReplaced: function(found, replaced) {
|
||||||
|
if (found) {
|
||||||
|
!(found - replaced > 0) ?
|
||||||
|
Common.UI.info( {msg: Common.Utils.String.format(this.textReplaceSuccess, replaced)} ) :
|
||||||
|
Common.UI.warning( {msg: Common.Utils.String.format(this.textReplaceSkipped, found-replaced)} );
|
||||||
|
} else {
|
||||||
|
Common.UI.info({msg: this.textNoTextFound});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
notcriticalErrorTitle: 'Warning',
|
notcriticalErrorTitle: 'Warning',
|
||||||
warnReplaceString: '{0} is not a valid special character for the Replace With box.'
|
warnReplaceString: '{0} is not a valid special character for the Replace With box.',
|
||||||
|
textReplaceSuccess: 'Search has been done. {0} occurrences have been replaced',
|
||||||
|
textReplaceSkipped: 'The replacement has been made. {0} occurrences were skipped.',
|
||||||
|
textNoTextFound: 'The data you have been searching for could not be found. Please adjust your search options.'
|
||||||
|
|
||||||
}, DE.Controllers.Search || {}));
|
}, DE.Controllers.Search || {}));
|
||||||
});
|
});
|
|
@ -936,6 +936,9 @@
|
||||||
"DE.Controllers.Navigation.txtGotoBeginning": "Go to the beginning of the document",
|
"DE.Controllers.Navigation.txtGotoBeginning": "Go to the beginning of the document",
|
||||||
"DE.Controllers.Search.notcriticalErrorTitle": "Warning",
|
"DE.Controllers.Search.notcriticalErrorTitle": "Warning",
|
||||||
"DE.Controllers.Search.warnReplaceString": "{0} is not a valid special character for the Replace With box.",
|
"DE.Controllers.Search.warnReplaceString": "{0} is not a valid special character for the Replace With box.",
|
||||||
|
"DE.Controllers.Search.textReplaceSuccess": "Search has been done. {0} occurrences have been replaced",
|
||||||
|
"DE.Controllers.Search.textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
|
||||||
|
"DE.Controllers.Search.textNoTextFound": "The data you have been searching for could not be found. Please adjust your search options.",
|
||||||
"DE.Controllers.Statusbar.textDisconnect": "<b>Connection is lost</b><br>Trying to connect. Please check connection settings.",
|
"DE.Controllers.Statusbar.textDisconnect": "<b>Connection is lost</b><br>Trying to connect. Please check connection settings.",
|
||||||
"DE.Controllers.Statusbar.textHasChanges": "New changes have been tracked",
|
"DE.Controllers.Statusbar.textHasChanges": "New changes have been tracked",
|
||||||
"DE.Controllers.Statusbar.textSetTrackChanges": "You are in Track Changes mode",
|
"DE.Controllers.Statusbar.textSetTrackChanges": "You are in Track Changes mode",
|
||||||
|
|
|
@ -104,6 +104,7 @@ define([
|
||||||
this.api.asc_registerCallback('asc_onGetTextAroundSearchPack', _.bind(this.onApiGetTextAroundSearch, 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_onRemoveTextAroundSearch', _.bind(this.onApiRemoveTextAroundSearch, this));
|
||||||
this.api.asc_registerCallback('asc_onSearchEnd', _.bind(this.onApiSearchEnd, this));
|
this.api.asc_registerCallback('asc_onSearchEnd', _.bind(this.onApiSearchEnd, this));
|
||||||
|
this.api.asc_registerCallback('asc_onReplaceAll', _.bind(this.onApiTextReplaced, this));
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
@ -385,8 +386,21 @@ define([
|
||||||
this.removeResultItems('stop');
|
this.removeResultItems('stop');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onApiTextReplaced: function(found, replaced) {
|
||||||
|
if (found) {
|
||||||
|
!(found - replaced > 0) ?
|
||||||
|
Common.UI.info( {msg: Common.Utils.String.format(this.textReplaceSuccess, replaced)} ) :
|
||||||
|
Common.UI.warning( {msg: Common.Utils.String.format(this.textReplaceSkipped, found-replaced)} );
|
||||||
|
} else {
|
||||||
|
Common.UI.info({msg: this.textNoTextFound});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
notcriticalErrorTitle: 'Warning',
|
notcriticalErrorTitle: 'Warning',
|
||||||
warnReplaceString: '{0} is not a valid special character for the Replace With box.'
|
warnReplaceString: '{0} is not a valid special character for the Replace With box.',
|
||||||
|
textReplaceSuccess: 'Search has been done. {0} occurrences have been replaced',
|
||||||
|
textReplaceSkipped: 'The replacement has been made. {0} occurrences were skipped.',
|
||||||
|
textNoTextFound: 'The data you have been searching for could not be found. Please adjust your search options.'
|
||||||
|
|
||||||
}, PE.Controllers.Search || {}));
|
}, PE.Controllers.Search || {}));
|
||||||
});
|
});
|
|
@ -997,6 +997,9 @@
|
||||||
"PE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
|
"PE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
|
||||||
"PE.Controllers.Search.notcriticalErrorTitle": "Warning",
|
"PE.Controllers.Search.notcriticalErrorTitle": "Warning",
|
||||||
"PE.Controllers.Search.warnReplaceString": "{0} is not a valid special character for the Replace With box.",
|
"PE.Controllers.Search.warnReplaceString": "{0} is not a valid special character for the Replace With box.",
|
||||||
|
"PE.Controllers.Search.textReplaceSuccess": "Search has been done. {0} occurrences have been replaced",
|
||||||
|
"PE.Controllers.Search.textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
|
||||||
|
"PE.Controllers.Search.textNoTextFound": "The data you have been searching for could not be found. Please adjust your search options.",
|
||||||
"PE.Controllers.Statusbar.textDisconnect": "<b>Connection is lost</b><br>Trying to connect. Please check connection settings.",
|
"PE.Controllers.Statusbar.textDisconnect": "<b>Connection is lost</b><br>Trying to connect. Please check connection settings.",
|
||||||
"PE.Controllers.Statusbar.zoomText": "Zoom {0}%",
|
"PE.Controllers.Statusbar.zoomText": "Zoom {0}%",
|
||||||
"PE.Controllers.Toolbar.confirmAddFontName": "The font you are going to save is not available on the current device.<br>The text style will be displayed using one of the system fonts, the saved font will be used when it is available.<br>Do you want to continue?",
|
"PE.Controllers.Toolbar.confirmAddFontName": "The font you are going to save is not available on the current device.<br>The text style will be displayed using one of the system fonts, the saved font will be used when it is available.<br>Do you want to continue?",
|
||||||
|
|
Loading…
Reference in a new issue