Browse Source

无jira任务 fix: multi_select_combo 和 multi_select_insert_combo 统一逻辑,只有勾选了全选才认为是全选.

es6
dailer 6 years ago
parent
commit
98b81c0b86
  1. 24
      src/widget/multiselect/multiselect.combo.js

24
src/widget/multiselect/multiselect.combo.js

@ -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) {
o.itemsCreator({
type: BI.MultiSelectCombo.REQ_GET_DATA_LENGTH
}, function (res) {
self._count = res.count;
adjust();
callback();
});
} else {
adjust(); adjust();
callback(); 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);
} }
}); });

Loading…
Cancel
Save