|
|
@ -243,24 +243,26 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, { |
|
|
|
_joinAll: function (res, callback) { |
|
|
|
_joinAll: function (res, callback) { |
|
|
|
var self = this, o = this.options; |
|
|
|
var self = this, o = this.options; |
|
|
|
this._assertValue(res); |
|
|
|
this._assertValue(res); |
|
|
|
o.itemsCreator({ |
|
|
|
if (this.storeValue.type === res.type) { |
|
|
|
type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA, |
|
|
|
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey()); |
|
|
|
keywords: [self.trigger.getKeyword()] |
|
|
|
|
|
|
|
}, function (ob) { |
|
|
|
|
|
|
|
var items = BI.map(ob.items, "value"); |
|
|
|
|
|
|
|
if (self.storeValue.type === res.type) { |
|
|
|
|
|
|
|
var change = false; |
|
|
|
var change = false; |
|
|
|
var map = self._makeMap(self.storeValue.value); |
|
|
|
var map = this._makeMap(this.storeValue.value); |
|
|
|
BI.each(items, function (i, v) { |
|
|
|
BI.each(BI.concat(result.match, result.find), function (i, v) { |
|
|
|
if (BI.isNotNull(map[v])) { |
|
|
|
if (BI.isNotNull(map[v])) { |
|
|
|
change = true; |
|
|
|
change = true; |
|
|
|
delete map[v]; |
|
|
|
delete map[v]; |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
change && (self.storeValue.value = BI.values(map)); |
|
|
|
change && (this.storeValue.value = BI.values(map)); |
|
|
|
callback(); |
|
|
|
callback(); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
o.itemsCreator({ |
|
|
|
|
|
|
|
type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA, |
|
|
|
|
|
|
|
keywords: [this.trigger.getKeyword()], |
|
|
|
|
|
|
|
selectedValues: this.storeValue.value, |
|
|
|
|
|
|
|
}, function (ob) { |
|
|
|
|
|
|
|
var items = BI.map(ob.items, "value"); |
|
|
|
var selectedMap = self._makeMap(self.storeValue.value); |
|
|
|
var selectedMap = self._makeMap(self.storeValue.value); |
|
|
|
var notSelectedMap = self._makeMap(res.value); |
|
|
|
var notSelectedMap = self._makeMap(res.value); |
|
|
|
var newItems = []; |
|
|
|
var newItems = []; |
|
|
|