|
|
@ -17,14 +17,15 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_init: function () { |
|
|
|
_init: function () { |
|
|
|
var self = this; var o = this.options; |
|
|
|
var self = this; |
|
|
|
|
|
|
|
var o = this.options; |
|
|
|
BI.MultiSelectCombo.superclass._init.apply(this, arguments); |
|
|
|
BI.MultiSelectCombo.superclass._init.apply(this, arguments); |
|
|
|
var assertShowValue = function () { |
|
|
|
var assertShowValue = function () { |
|
|
|
if (BI.isKey(self._startValue)) { |
|
|
|
if (BI.isKey(self._startValue)) { |
|
|
|
if (self.storeValue.type === BI.Selection.All) { |
|
|
|
if (self.storeValue.type === BI.Selection.All) { |
|
|
|
BI.remove(self.storeValue.value, self._startValue); |
|
|
|
BI.remove(self.storeValue.value, self._startValue); |
|
|
|
self.storeValue.assist = self.storeValue.assist || []; |
|
|
|
self.storeValue.assist = self.storeValue.assist || []; |
|
|
|
self.storeValue.assist.pushDistinct(self._startValue); |
|
|
|
BI.pushDistinct(self.storeValue.assist, self._startValue); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
BI.pushDistinct(self.storeValue.value, self._startValue); |
|
|
|
BI.pushDistinct(self.storeValue.value, self._startValue); |
|
|
|
BI.remove(self.storeValue.assist, self._startValue); |
|
|
|
BI.remove(self.storeValue.assist, self._startValue); |
|
|
@ -280,7 +281,8 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_itemsCreator4Trigger: function (op, callback) { |
|
|
|
_itemsCreator4Trigger: function (op, callback) { |
|
|
|
var self = this; var o = this.options; |
|
|
|
var self = this; |
|
|
|
|
|
|
|
var o = this.options; |
|
|
|
o.itemsCreator(op, function (res) { |
|
|
|
o.itemsCreator(op, function (res) { |
|
|
|
if (op.times === 1 && BI.isNotNull(op.keywords)) { |
|
|
|
if (op.times === 1 && BI.isNotNull(op.keywords)) { |
|
|
|
// 预防trigger内部把当前的storeValue改掉
|
|
|
|
// 预防trigger内部把当前的storeValue改掉
|
|
|
@ -311,7 +313,8 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_joinKeywords: function (keywords, callback) { |
|
|
|
_joinKeywords: function (keywords, callback) { |
|
|
|
var self = this; var o = this.options; |
|
|
|
var self = this; |
|
|
|
|
|
|
|
var o = this.options; |
|
|
|
this._assertValue(this.storeValue); |
|
|
|
this._assertValue(this.storeValue); |
|
|
|
this.requesting = true; |
|
|
|
this.requesting = true; |
|
|
|
o.itemsCreator({ |
|
|
|
o.itemsCreator({ |
|
|
@ -334,7 +337,8 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_joinAll: function (res, callback) { |
|
|
|
_joinAll: function (res, callback) { |
|
|
|
var self = this; var o = this.options; |
|
|
|
var self = this; |
|
|
|
|
|
|
|
var o = this.options; |
|
|
|
this._assertValue(res); |
|
|
|
this._assertValue(res); |
|
|
|
this.requesting = true; |
|
|
|
this.requesting = true; |
|
|
|
if (this.storeValue.type === res.type) { |
|
|
|
if (this.storeValue.type === res.type) { |
|
|
@ -385,7 +389,8 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_adjust: function (callback) { |
|
|
|
_adjust: function (callback) { |
|
|
|
var self = this; var o = this.options; |
|
|
|
var self = this; |
|
|
|
|
|
|
|
var o = this.options; |
|
|
|
adjust(); |
|
|
|
adjust(); |
|
|
|
callback(); |
|
|
|
callback(); |
|
|
|
|
|
|
|
|
|
|
@ -399,7 +404,8 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_join: function (res, callback) { |
|
|
|
_join: function (res, callback) { |
|
|
|
var self = this; var o = this.options; |
|
|
|
var self = this; |
|
|
|
|
|
|
|
var o = this.options; |
|
|
|
this._assertValue(res); |
|
|
|
this._assertValue(res); |
|
|
|
this._assertValue(this.storeValue); |
|
|
|
this._assertValue(this.storeValue); |
|
|
|
if (this.storeValue.type === res.type) { |
|
|
|
if (this.storeValue.type === res.type) { |
|
|
|