|
|
@ -87116,19 +87116,23 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { |
|
|
|
self._setStartValue(""); |
|
|
|
self._setStartValue(""); |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE, function () { |
|
|
|
this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE, function () { |
|
|
|
if (this.getSearcher().hasMatched()) { |
|
|
|
// if (this.getSearcher().hasMatched()) {
|
|
|
|
var keyword = this.getSearcher().getKeyword(); |
|
|
|
var keyword = this.getSearcher().getKeyword(); |
|
|
|
self._join({ |
|
|
|
self._join({ |
|
|
|
type: BI.Selection.Multi, |
|
|
|
type: BI.Selection.Multi, |
|
|
|
value: [keyword] |
|
|
|
value: [keyword] |
|
|
|
}, function () { |
|
|
|
}, function () { |
|
|
|
|
|
|
|
//如果在不选的状态下直接把该值添加进来
|
|
|
|
|
|
|
|
if (self.storeValue.type === BI.Selection.Multi) { |
|
|
|
|
|
|
|
self.storeValue.value.pushDistinct(keyword); |
|
|
|
|
|
|
|
} |
|
|
|
self.combo.setValue(self.storeValue); |
|
|
|
self.combo.setValue(self.storeValue); |
|
|
|
self._setStartValue(keyword); |
|
|
|
self._setStartValue(keyword); |
|
|
|
assertShowValue(); |
|
|
|
assertShowValue(); |
|
|
|
self.populate(); |
|
|
|
self.populate(); |
|
|
|
self._setStartValue(""); |
|
|
|
self._setStartValue(""); |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
// }
|
|
|
|
}); |
|
|
|
}); |
|
|
|
this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function (keywords) { |
|
|
|
this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function (keywords) { |
|
|
|
var last = BI.last(keywords); |
|
|
|
var last = BI.last(keywords); |
|
|
@ -87343,30 +87347,32 @@ 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) { |
|
|
|
// if (!this._count) {
|
|
|
|
o.itemsCreator({ |
|
|
|
// o.itemsCreator({
|
|
|
|
type: BI.MultiSelectCombo.REQ_GET_DATA_LENGTH |
|
|
|
// type: BI.MultiSelectCombo.REQ_GET_DATA_LENGTH
|
|
|
|
}, function (res) { |
|
|
|
// }, function (res) {
|
|
|
|
self._count = res.count; |
|
|
|
// self._count = res.count;
|
|
|
|
adjust(); |
|
|
|
// adjust();
|
|
|
|
callback(); |
|
|
|
// callback();
|
|
|
|
}); |
|
|
|
// });
|
|
|
|
} else { |
|
|
|
// } else {
|
|
|
|
adjust(); |
|
|
|
adjust(); |
|
|
|
callback(); |
|
|
|
callback(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
function adjust() { |
|
|
|
function adjust() { |
|
|
|
if (self.storeValue.type === BI.Selection.All && self.storeValue.value.length >= self._count) { |
|
|
|
// if (self.storeValue.type === BI.Selection.All && self.storeValue.value.length >= self._count) {
|
|
|
|
self.storeValue = { |
|
|
|
// self.storeValue = {
|
|
|
|
type: BI.Selection.Multi, |
|
|
|
// type: BI.Selection.Multi,
|
|
|
|
value: [] |
|
|
|
// value: []
|
|
|
|
} |
|
|
|
// }
|
|
|
|
} else if (self.storeValue.type === BI.Selection.Multi && self.storeValue.value.length >= self._count) { |
|
|
|
// } else if (self.storeValue.type === BI.Selection.Multi && self.storeValue.value.length >= self._count) {
|
|
|
|
self.storeValue = { |
|
|
|
// self.storeValue = {
|
|
|
|
type: BI.Selection.All, |
|
|
|
// type: BI.Selection.All,
|
|
|
|
value: [] |
|
|
|
// 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; |
|
|
|