[SSE] Use event asc_onToggleAutoCorrectOptions instead of asc_onShowAutoCorrectOptions/asc_onHideAutoCorrectOptions.

This commit is contained in:
Julia Radzhabova 2017-12-01 12:20:06 +03:00
parent 54231ebed3
commit 198b3f2557

View file

@ -275,8 +275,7 @@ define([
this.api.asc_registerCallback('asc_onFormulaCompleteMenu', _.bind(this.onFormulaCompleteMenu, this));
this.api.asc_registerCallback('asc_onShowSpecialPasteOptions', _.bind(this.onShowSpecialPasteOptions, this));
this.api.asc_registerCallback('asc_onHideSpecialPasteOptions', _.bind(this.onHideSpecialPasteOptions, this));
this.api.asc_registerCallback('asc_onShowAutoCorrectOptions', _.bind(this.onShowAutoCorrectOptions, this));
this.api.asc_registerCallback('asc_onHideAutoCorrectOptions', _.bind(this.onHideAutoCorrectOptions, this));
this.api.asc_registerCallback('asc_onToggleAutoCorrectOptions', _.bind(this.onToggleAutoCorrectOptions, this));
}
return this;
},
@ -1868,7 +1867,14 @@ define([
pasteContainer.hide();
},
onShowAutoCorrectOptions: function(autoCorrectOptions) {
onToggleAutoCorrectOptions: function(autoCorrectOptions) {
if (!autoCorrectOptions) {
var pasteContainer = this.documentHolder.cmpEl.find('#autocorrect-paste-container');
if (pasteContainer.is(':visible'))
pasteContainer.hide();
return;
}
var me = this,
documentHolderView = me.documentHolder,
coord = autoCorrectOptions.asc_getCellCoord(),
@ -1921,12 +1927,6 @@ define([
}
},
onHideAutoCorrectOptions: function() {
var pasteContainer = this.documentHolder.cmpEl.find('#autocorrect-paste-container');
if (pasteContainer.is(':visible'))
pasteContainer.hide();
},
onCellsRange: function(status) {
this.rangeSelectionMode = (status != Asc.c_oAscSelectionDialogType.None);
},