update for add and off the window resize event
This commit is contained in:
parent
a1264c81b2
commit
0b34cbf22c
|
@ -678,10 +678,6 @@ define([
|
|||
this.$window.find('.header').on('mousedown', this.binding.dragStart);
|
||||
this.$window.find('.tool.close').on('click', _.bind(doclose, this));
|
||||
this.$window.find('.tool.help').on('click', _.bind(dohelp, this));
|
||||
if(this.initConfig.automove){
|
||||
this.binding.windowresize = _.bind(_onResizeMove, this);
|
||||
$(window).on('resize', this.binding.windowresize);
|
||||
}
|
||||
if (!this.initConfig.modal)
|
||||
Common.Gateway.on('processmouse', _.bind(_onProcessMouse, this));
|
||||
} else {
|
||||
|
@ -765,6 +761,10 @@ define([
|
|||
}
|
||||
|
||||
$(document).on('keydown.' + this.cid, this.binding.keydown);
|
||||
if(this.initConfig.automove){
|
||||
this.binding.windowresize = _.bind(_onResizeMove, this);
|
||||
$(window).on('resize', this.binding.windowresize);
|
||||
}
|
||||
|
||||
var me = this;
|
||||
|
||||
|
@ -862,6 +862,7 @@ define([
|
|||
|
||||
hide: function() {
|
||||
$(document).off('keydown.' + this.cid);
|
||||
this.initConfig.automove && $(window).off('resize', this.binding.windowresize);
|
||||
if (this.$window) {
|
||||
if (this.initConfig.modal) {
|
||||
var mask = _getMask(),
|
||||
|
|
|
@ -2932,7 +2932,7 @@ define([
|
|||
this.lockToolbar(Common.enumLock.cantPrint, true, {array: [this.btnPrint]});
|
||||
} else {
|
||||
this.mode = mode;
|
||||
!mode.canPrint && this.btnPrint.hide();
|
||||
!mode.canPrint && this.btnPrint && this.btnPrint.hide();
|
||||
this.lockToolbar(Common.enumLock.cantPrint, !mode.canPrint, {array: [this.btnPrint]});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue