[SSE] Fix Bug 46338
This commit is contained in:
parent
d9c5b29953
commit
a298d8f28b
|
@ -111,10 +111,12 @@ define([
|
|||
|
||||
if (settings.api) {
|
||||
me.api = settings.api;
|
||||
me.wrapEvents = {
|
||||
onApiRangeChanged: _.bind(me.onApiRangeChanged, me)
|
||||
};
|
||||
|
||||
me.api.asc_setSelectionDialogMode(settings.type, settings.range ? settings.range : '');
|
||||
me.api.asc_unregisterCallback('asc_onSelectionRangeChanged', _.bind(me.onApiRangeChanged, me));
|
||||
me.api.asc_registerCallback('asc_onSelectionRangeChanged', _.bind(me.onApiRangeChanged, me));
|
||||
me.api.asc_registerCallback('asc_onSelectionRangeChanged', me.wrapEvents.onApiRangeChanged);
|
||||
Common.NotificationCenter.trigger('cells:range', settings.type);
|
||||
}
|
||||
|
||||
|
@ -177,8 +179,10 @@ define([
|
|||
},
|
||||
|
||||
onClose: function(event) {
|
||||
if (this.api)
|
||||
if (this.api) {
|
||||
this.api.asc_setSelectionDialogMode(Asc.c_oAscSelectionDialogType.None);
|
||||
this.api.asc_unregisterCallback('asc_onSelectionRangeChanged', this.wrapEvents.onApiRangeChanged);
|
||||
}
|
||||
Common.NotificationCenter.trigger('cells:range', Asc.c_oAscSelectionDialogType.None);
|
||||
|
||||
SSE.getController('RightMenu').SetDisabled(false);
|
||||
|
|
|
@ -133,8 +133,10 @@ define([
|
|||
if (settings.selectionType)
|
||||
me.selectionType = settings.selectionType;
|
||||
|
||||
me.api.asc_unregisterCallback('asc_onSelectionRangeChanged', _.bind(me.onApiRangeChanged, me));
|
||||
me.api.asc_registerCallback('asc_onSelectionRangeChanged', _.bind(me.onApiRangeChanged, me));
|
||||
me.wrapEvents = {
|
||||
onApiRangeChanged: _.bind(me.onApiRangeChanged, me)
|
||||
};
|
||||
me.api.asc_registerCallback('asc_onSelectionRangeChanged', me.wrapEvents.onApiRangeChanged);
|
||||
Common.NotificationCenter.trigger('cells:range', Asc.c_oAscSelectionDialogType.FormatTable);
|
||||
}
|
||||
|
||||
|
@ -190,8 +192,10 @@ define([
|
|||
},
|
||||
|
||||
onClose: function(event) {
|
||||
if (this.api)
|
||||
if (this.api) {
|
||||
this.api.asc_setSelectionDialogMode(Asc.c_oAscSelectionDialogType.None);
|
||||
this.api.asc_unregisterCallback('asc_onSelectionRangeChanged', this.wrapEvents.onApiRangeChanged);
|
||||
}
|
||||
Common.NotificationCenter.trigger('cells:range', Asc.c_oAscSelectionDialogType.None);
|
||||
Common.NotificationCenter.trigger('edit:complete', this);
|
||||
|
||||
|
|
Loading…
Reference in a new issue