|
|
@ -299,32 +299,9 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { |
|
|
|
|
|
|
|
|
|
|
|
_adjust: function (callback) { |
|
|
|
_adjust: function (callback) { |
|
|
|
var self = this, o = this.options; |
|
|
|
var self = this, o = this.options; |
|
|
|
if (!this._count) { |
|
|
|
adjust(); |
|
|
|
o.itemsCreator({ |
|
|
|
callback(); |
|
|
|
type: BI.MultiSelectCombo.REQ_GET_DATA_LENGTH |
|
|
|
|
|
|
|
}, function (res) { |
|
|
|
|
|
|
|
self._count = res.count; |
|
|
|
|
|
|
|
adjust(); |
|
|
|
|
|
|
|
callback(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
adjust(); |
|
|
|
|
|
|
|
callback(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function adjust () { |
|
|
|
function adjust () { |
|
|
|
if (self.storeValue.type === BI.Selection.All && self.storeValue.value.length >= self._count) { |
|
|
|
|
|
|
|
self.storeValue = { |
|
|
|
|
|
|
|
type: BI.Selection.Multi, |
|
|
|
|
|
|
|
value: [] |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
} else if (self.storeValue.type === BI.Selection.Multi && self.storeValue.value.length >= self._count) { |
|
|
|
|
|
|
|
self.storeValue = { |
|
|
|
|
|
|
|
type: BI.Selection.All, |
|
|
|
|
|
|
|
value: [] |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (self.wants2Quit === true) { |
|
|
|
if (self.wants2Quit === true) { |
|
|
|
self.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM); |
|
|
|
self.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM); |
|
|
|
self.wants2Quit = false; |
|
|
|
self.wants2Quit = false; |
|
|
@ -377,7 +354,6 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
populate: function () { |
|
|
|
populate: function () { |
|
|
|
this._count = null; |
|
|
|
|
|
|
|
this.combo.populate.apply(this.combo, arguments); |
|
|
|
this.combo.populate.apply(this.combo, arguments); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|