For Bug 30472: close only sending window (bug when receive 'saveaserror'), remove event listener after closing the window.
This commit is contained in:
parent
2b9c763955
commit
323a11bb00
|
@ -612,9 +612,10 @@ define([
|
||||||
this.setResizable(this.initConfig.resizable);
|
this.setResizable(this.initConfig.resizable);
|
||||||
|
|
||||||
var me = this;
|
var me = this;
|
||||||
Common.NotificationCenter.on('window:close', function() {
|
this.binding.winclose = function(obj) {
|
||||||
if (me.$window && me.isVisible()) me.close();
|
if (me.$window && me.isVisible() && me.$window == obj.$window) me.close();
|
||||||
});
|
};
|
||||||
|
Common.NotificationCenter.on('window:close', this.binding.winclose);
|
||||||
|
|
||||||
this.fireEvent('render:after',this);
|
this.fireEvent('render:after',this);
|
||||||
return this;
|
return this;
|
||||||
|
@ -704,6 +705,7 @@ define([
|
||||||
if ( this.initConfig.header ) {
|
if ( this.initConfig.header ) {
|
||||||
this.$window.find('.header').off('mousedown', this.binding.dragStart);
|
this.$window.find('.header').off('mousedown', this.binding.dragStart);
|
||||||
}
|
}
|
||||||
|
Common.NotificationCenter.off({'window:close': this.binding.winclose});
|
||||||
|
|
||||||
if (this.initConfig.modal) {
|
if (this.initConfig.modal) {
|
||||||
var mask = _getMask(),
|
var mask = _getMask(),
|
||||||
|
|
Loading…
Reference in a new issue