|
|
@ -1,6 +1,6 @@ |
|
|
|
!(function () { |
|
|
|
!(function () { |
|
|
|
var needHideWhenAnotherComboOpen = {}; |
|
|
|
var needHideWhenAnotherComboOpen = {}; |
|
|
|
var currentOpenedCombo; |
|
|
|
var currentOpenedCombos = {}; |
|
|
|
/** |
|
|
|
/** |
|
|
|
* @class BI.Combo |
|
|
|
* @class BI.Combo |
|
|
|
* @extends BI.Widget |
|
|
|
* @extends BI.Widget |
|
|
@ -142,7 +142,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
this.element.removeClass(this.options.comboClass); |
|
|
|
this.element.removeClass(this.options.comboClass); |
|
|
|
delete needHideWhenAnotherComboOpen[this.getName()]; |
|
|
|
delete needHideWhenAnotherComboOpen[this.getName()]; |
|
|
|
currentOpenedCombo = null; |
|
|
|
delete currentOpenedCombos[this.getName()]; |
|
|
|
|
|
|
|
|
|
|
|
BI.Widget._renderEngine.createElement(document).unbind("mousedown." + this.getName()).unbind("mousewheel." + this.getName()); |
|
|
|
BI.Widget._renderEngine.createElement(document).unbind("mousedown." + this.getName()).unbind("mousewheel." + this.getName()); |
|
|
|
BI.EVENT_BLUR && o.hideWhenBlur && BI.Widget._renderEngine.createElement(window).unbind("blur." + this.getName()); |
|
|
|
BI.EVENT_BLUR && o.hideWhenBlur && BI.Widget._renderEngine.createElement(window).unbind("blur." + this.getName()); |
|
|
@ -163,7 +163,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
!this.options.hideWhenAnotherComboOpen && (currentOpenedCombo = this); |
|
|
|
currentOpenedCombos[this.getName()] = this; |
|
|
|
this.options.hideWhenAnotherComboOpen && (needHideWhenAnotherComboOpen[this.getName()] = this); |
|
|
|
this.options.hideWhenAnotherComboOpen && (needHideWhenAnotherComboOpen[this.getName()] = this); |
|
|
|
this.adjustWidth(e); |
|
|
|
this.adjustWidth(e); |
|
|
|
this.adjustHeight(e); |
|
|
|
this.adjustHeight(e); |
|
|
@ -303,19 +303,16 @@ |
|
|
|
BI.Resizers.remove(this.getName()); |
|
|
|
BI.Resizers.remove(this.getName()); |
|
|
|
this.popupView && this.popupView._destroy(); |
|
|
|
this.popupView && this.popupView._destroy(); |
|
|
|
delete needHideWhenAnotherComboOpen[this.getName()]; |
|
|
|
delete needHideWhenAnotherComboOpen[this.getName()]; |
|
|
|
if (currentOpenedCombo === this) { |
|
|
|
delete currentOpenedCombos[this.getName()]; |
|
|
|
currentOpenedCombo = null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
BI.Combo.closeAll = function () { |
|
|
|
BI.Combo.closeAll = function () { |
|
|
|
currentOpenedCombo && currentOpenedCombo.hideView(); |
|
|
|
BI.each(currentOpenedCombos, function (i, combo) { |
|
|
|
BI.each(needHideWhenAnotherComboOpen, function (i, combo) { |
|
|
|
|
|
|
|
if (combo) { |
|
|
|
if (combo) { |
|
|
|
combo.hideView(); |
|
|
|
combo.hideView(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
currentOpenedCombo = null; |
|
|
|
currentOpenedCombos = {}; |
|
|
|
needHideWhenAnotherComboOpen = {}; |
|
|
|
needHideWhenAnotherComboOpen = {}; |
|
|
|
}; |
|
|
|
}; |
|
|
|
BI.Combo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; |
|
|
|
BI.Combo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; |
|
|
|