diff --git a/demo/js/core/abstract/combination/demo.combo.js b/demo/js/core/abstract/combination/demo.combo.js index e62fdb836..e849a1824 100644 --- a/demo/js/core/abstract/combination/demo.combo.js +++ b/demo/js/core/abstract/combination/demo.combo.js @@ -197,7 +197,7 @@ Demo.Func = BI.inherit(BI.Widget, { text: "全选", onCheck: function (v) { if (v) { - multiCombo.setValue(BI.pluck(BI.deepClone(self.years), "value")); + multiCombo.setValue(BI.map(BI.deepClone(self.years), "value")); } else { multiCombo.setValue([]); } diff --git a/demo/js/widget/downlist/demo.downlist.js b/demo/js/widget/downlist/demo.downlist.js index fd79aa96e..4225a19ae 100644 --- a/demo/js/widget/downlist/demo.downlist.js +++ b/demo/js/widget/downlist/demo.downlist.js @@ -57,7 +57,7 @@ Demo.Downlist = BI.inherit(BI.Widget, { value: [{"childValue":22,"value":11},{"value":18},{"value":20}], height: 30, width: 100, - items: [ + items: [[{text: "temp", value: 1111111}], [{ el: { text: "column 1111", @@ -80,17 +80,17 @@ Demo.Downlist = BI.inherit(BI.Widget, { text: "column 2", iconCls1: "chart-type-e-font", cls: "dot-e-font", - value: 11 + value: 12 }, children: [{ type: "bi.icon_text_item", cls: "dot-e-font", height: 25, text: "column 2.1", - value: 21 + value: 11 }, { text: "column 2.2", - value: 22, + value: 12, cls: "dot-e-font" }] }], @@ -139,7 +139,7 @@ Demo.Downlist = BI.inherit(BI.Widget, { text: "column 15", cls: "dot-e-font", - value: 23, + value: 25, bubble: "hahahaha" } ] diff --git a/dist/bundle.js b/dist/bundle.js index b191cbb01..2ccdf4b3b 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -86687,25 +86687,38 @@ BI.DownListPopup = BI.inherit(BI.Pane, { var value = []; BI.each(o.items, function (idx, itemGroup) { BI.each(itemGroup, function (id, item) { - if(BI.isNotNull(item.children)){ - var childValues = BI.pluck(item.children, "value"); - if(BI.contains(childValues, valueGetter(idx))){ - value.push(valueGetter(idx)); + if(BI.isNotNull(item.children)) { + var childValues = BI.map(item.children, "value"); + var v = joinValue(childValues, valueGetter(idx)); + if(BI.isNotEmptyString(v)) { + value.push(v); } }else{ - if(item.value === valueGetter(idx)){ - value.push(valueGetter(idx)); + if(item.value === valueGetter(idx)[0]) { + value.push(valueGetter(idx)[0]); } } - }) + }); }); return value; - function valueGetter(index) { + function joinValue (sources, targets) { + var value = ""; + BI.some(sources, function (idx, s) { + return BI.some(targets, function (id, t) { + if(s === t) { + value = s; + return true; + } + }); + }); + return value; + } + + function valueGetter (index) { switch (o.chooseType) { case BI.Selection.Single: return values[0]; - break; case BI.Selection.Multi: return values[index]; default: @@ -86733,9 +86746,17 @@ BI.DownListPopup = BI.inherit(BI.Pane, { this.popup.setValue(this._digest(valueItem)); }, + _getValue: function () { + var v = []; + BI.each(this.popup.getAllButtons(), function (i, item) { + i % 2 === 0 && v.push(item.getValue()); + }); + return v; + }, + getValue: function () { var self = this, result = []; - var values = this._checkValues(this.popup.getValue()); + var values = this._checkValues(this._getValue()); BI.each(values, function (i, value) { var valueItem = {}; if (BI.isNotNull(self.childValueMap[value])) { @@ -91719,7 +91740,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { type: BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA, keywords: keywords }, function (ob) { - var values = BI.pluck(ob.items, "value"); + var values = BI.map(ob.items, "value"); digest(values); }); @@ -91742,7 +91763,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { type: BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA, keywords: [this.trigger.getKey()] }, function (ob) { - var items = BI.pluck(ob.items, "value"); + var items = BI.map(ob.items, "value"); if (self.storeValue.type === res.type) { var change = false; var map = self._makeMap(self.storeValue.value); @@ -92076,7 +92097,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { type: BI.MultiSelectCombo.REQ_GET_ALL_DATA, keywords: keywords }, function (ob) { - var values = BI.pluck(ob.items, "value"); + var values = BI.map(ob.items, "value"); digest(values); }); @@ -92099,7 +92120,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { type: BI.MultiSelectCombo.REQ_GET_ALL_DATA, keywords: [this.trigger.getKey()] }, function (ob) { - var items = BI.pluck(ob.items, "value"); + var items = BI.map(ob.items, "value"); if (self.storeValue.type === res.type) { var change = false; var map = self._makeMap(self.storeValue.value); @@ -93529,7 +93550,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Widget, { o.itemsCreator({ type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA }, function (ob) { - self._allData = BI.pluck(ob.items, "value"); + self._allData = BI.map(ob.items, "value"); digest(self._allData); }); } else { @@ -93554,7 +93575,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Widget, { type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA, keyword: self.trigger.getKeyword() }, function (ob) { - var items = BI.pluck(ob.items, "value"); + var items = BI.map(ob.items, "value"); if (self.storeValue.type === res.type) { var change = false; var map = self._makeMap(self.storeValue.value); @@ -93843,7 +93864,7 @@ BI.MultiSelectList = BI.inherit(BI.Widget, { o.itemsCreator({ type: BI.MultiSelectList.REQ_GET_ALL_DATA }, function (ob) { - self._allData = BI.pluck(ob.items, "value"); + self._allData = BI.map(ob.items, "value"); digest(self._allData); }); } else { @@ -93868,7 +93889,7 @@ BI.MultiSelectList = BI.inherit(BI.Widget, { type: BI.MultiSelectList.REQ_GET_ALL_DATA, keyword: self.trigger.getKeyword() }, function (ob) { - var items = BI.pluck(ob.items, "value"); + var items = BI.map(ob.items, "value"); if (self.storeValue.type === res.type) { var change = false; var map = self._makeMap(self.storeValue.value); @@ -98360,7 +98381,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, { type: BI.SingleSelectCombo.REQ_GET_ALL_DATA, keywords: keywords }, function (ob) { - var values = BI.pluck(ob.items, "value"); + var values = BI.map(ob.items, "value"); digest(values); }); @@ -98383,7 +98404,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, { type: BI.SingleSelectCombo.REQ_GET_ALL_DATA, keywords: [this.trigger.getKey()] }, function (ob) { - var items = BI.pluck(ob.items, "value"); + var items = BI.map(ob.items, "value"); if (self.storeValue.type === res.type) { var change = false; var map = self._makeMap(self.storeValue.value); @@ -99677,7 +99698,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, { type: BI.SingleSelectCombo.REQ_GET_ALL_DATA, keywords: keywords }, function (ob) { - var values = BI.pluck(ob.items, "value"); + var values = BI.map(ob.items, "value"); digest(values); }); @@ -99700,7 +99721,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, { type: BI.SingleSelectCombo.REQ_GET_ALL_DATA, keywords: [this.trigger.getKey()] }, function (ob) { - var items = BI.pluck(ob.items, "value"); + var items = BI.map(ob.items, "value"); if (self.storeValue.type === res.type) { var change = false; var map = self._makeMap(self.storeValue.value); diff --git a/dist/demo.js b/dist/demo.js index a83d498c3..33f655b68 100644 --- a/dist/demo.js +++ b/dist/demo.js @@ -6142,7 +6142,7 @@ BI.shortcut("demo.combo_group", Demo.Func);Demo.Func = BI.inherit(BI.Widget, { text: "全选", onCheck: function (v) { if (v) { - multiCombo.setValue(BI.pluck(BI.deepClone(self.years), "value")); + multiCombo.setValue(BI.map(BI.deepClone(self.years), "value")); } else { multiCombo.setValue([]); } @@ -12093,7 +12093,7 @@ Demo.Downlist = BI.inherit(BI.Widget, { value: [{"childValue":22,"value":11},{"value":18},{"value":20}], height: 30, width: 100, - items: [ + items: [[{text: "temp", value: 1111111}], [{ el: { text: "column 1111", @@ -12116,17 +12116,17 @@ Demo.Downlist = BI.inherit(BI.Widget, { text: "column 2", iconCls1: "chart-type-e-font", cls: "dot-e-font", - value: 11 + value: 12 }, children: [{ type: "bi.icon_text_item", cls: "dot-e-font", height: 25, text: "column 2.1", - value: 21 + value: 11 }, { text: "column 2.2", - value: 22, + value: 12, cls: "dot-e-font" }] }], @@ -12175,7 +12175,7 @@ Demo.Downlist = BI.inherit(BI.Widget, { text: "column 15", cls: "dot-e-font", - value: 23, + value: 25, bubble: "hahahaha" } ] diff --git a/dist/fineui.js b/dist/fineui.js index 6819d67c4..0944c9c3f 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -88451,25 +88451,38 @@ BI.DownListPopup = BI.inherit(BI.Pane, { var value = []; BI.each(o.items, function (idx, itemGroup) { BI.each(itemGroup, function (id, item) { - if(BI.isNotNull(item.children)){ - var childValues = BI.pluck(item.children, "value"); - if(BI.contains(childValues, valueGetter(idx))){ - value.push(valueGetter(idx)); + if(BI.isNotNull(item.children)) { + var childValues = BI.map(item.children, "value"); + var v = joinValue(childValues, valueGetter(idx)); + if(BI.isNotEmptyString(v)) { + value.push(v); } }else{ - if(item.value === valueGetter(idx)){ - value.push(valueGetter(idx)); + if(item.value === valueGetter(idx)[0]) { + value.push(valueGetter(idx)[0]); } } - }) + }); }); return value; - function valueGetter(index) { + function joinValue (sources, targets) { + var value = ""; + BI.some(sources, function (idx, s) { + return BI.some(targets, function (id, t) { + if(s === t) { + value = s; + return true; + } + }); + }); + return value; + } + + function valueGetter (index) { switch (o.chooseType) { case BI.Selection.Single: return values[0]; - break; case BI.Selection.Multi: return values[index]; default: @@ -88497,9 +88510,17 @@ BI.DownListPopup = BI.inherit(BI.Pane, { this.popup.setValue(this._digest(valueItem)); }, + _getValue: function () { + var v = []; + BI.each(this.popup.getAllButtons(), function (i, item) { + i % 2 === 0 && v.push(item.getValue()); + }); + return v; + }, + getValue: function () { var self = this, result = []; - var values = this._checkValues(this.popup.getValue()); + var values = this._checkValues(this._getValue()); BI.each(values, function (i, value) { var valueItem = {}; if (BI.isNotNull(self.childValueMap[value])) { @@ -93483,7 +93504,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { type: BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA, keywords: keywords }, function (ob) { - var values = BI.pluck(ob.items, "value"); + var values = BI.map(ob.items, "value"); digest(values); }); @@ -93506,7 +93527,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { type: BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA, keywords: [this.trigger.getKey()] }, function (ob) { - var items = BI.pluck(ob.items, "value"); + var items = BI.map(ob.items, "value"); if (self.storeValue.type === res.type) { var change = false; var map = self._makeMap(self.storeValue.value); @@ -93840,7 +93861,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { type: BI.MultiSelectCombo.REQ_GET_ALL_DATA, keywords: keywords }, function (ob) { - var values = BI.pluck(ob.items, "value"); + var values = BI.map(ob.items, "value"); digest(values); }); @@ -93863,7 +93884,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { type: BI.MultiSelectCombo.REQ_GET_ALL_DATA, keywords: [this.trigger.getKey()] }, function (ob) { - var items = BI.pluck(ob.items, "value"); + var items = BI.map(ob.items, "value"); if (self.storeValue.type === res.type) { var change = false; var map = self._makeMap(self.storeValue.value); @@ -95293,7 +95314,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Widget, { o.itemsCreator({ type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA }, function (ob) { - self._allData = BI.pluck(ob.items, "value"); + self._allData = BI.map(ob.items, "value"); digest(self._allData); }); } else { @@ -95318,7 +95339,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Widget, { type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA, keyword: self.trigger.getKeyword() }, function (ob) { - var items = BI.pluck(ob.items, "value"); + var items = BI.map(ob.items, "value"); if (self.storeValue.type === res.type) { var change = false; var map = self._makeMap(self.storeValue.value); @@ -95607,7 +95628,7 @@ BI.MultiSelectList = BI.inherit(BI.Widget, { o.itemsCreator({ type: BI.MultiSelectList.REQ_GET_ALL_DATA }, function (ob) { - self._allData = BI.pluck(ob.items, "value"); + self._allData = BI.map(ob.items, "value"); digest(self._allData); }); } else { @@ -95632,7 +95653,7 @@ BI.MultiSelectList = BI.inherit(BI.Widget, { type: BI.MultiSelectList.REQ_GET_ALL_DATA, keyword: self.trigger.getKeyword() }, function (ob) { - var items = BI.pluck(ob.items, "value"); + var items = BI.map(ob.items, "value"); if (self.storeValue.type === res.type) { var change = false; var map = self._makeMap(self.storeValue.value); @@ -100124,7 +100145,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, { type: BI.SingleSelectCombo.REQ_GET_ALL_DATA, keywords: keywords }, function (ob) { - var values = BI.pluck(ob.items, "value"); + var values = BI.map(ob.items, "value"); digest(values); }); @@ -100147,7 +100168,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, { type: BI.SingleSelectCombo.REQ_GET_ALL_DATA, keywords: [this.trigger.getKey()] }, function (ob) { - var items = BI.pluck(ob.items, "value"); + var items = BI.map(ob.items, "value"); if (self.storeValue.type === res.type) { var change = false; var map = self._makeMap(self.storeValue.value); @@ -101441,7 +101462,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, { type: BI.SingleSelectCombo.REQ_GET_ALL_DATA, keywords: keywords }, function (ob) { - var values = BI.pluck(ob.items, "value"); + var values = BI.map(ob.items, "value"); digest(values); }); @@ -101464,7 +101485,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, { type: BI.SingleSelectCombo.REQ_GET_ALL_DATA, keywords: [this.trigger.getKey()] }, function (ob) { - var items = BI.pluck(ob.items, "value"); + var items = BI.map(ob.items, "value"); if (self.storeValue.type === res.type) { var change = false; var map = self._makeMap(self.storeValue.value); diff --git a/dist/widget.js b/dist/widget.js index 8913157f9..e1fad0a91 100644 --- a/dist/widget.js +++ b/dist/widget.js @@ -2352,25 +2352,38 @@ BI.DownListPopup = BI.inherit(BI.Pane, { var value = []; BI.each(o.items, function (idx, itemGroup) { BI.each(itemGroup, function (id, item) { - if(BI.isNotNull(item.children)){ - var childValues = BI.pluck(item.children, "value"); - if(BI.contains(childValues, valueGetter(idx))){ - value.push(valueGetter(idx)); + if(BI.isNotNull(item.children)) { + var childValues = BI.map(item.children, "value"); + var v = joinValue(childValues, valueGetter(idx)); + if(BI.isNotEmptyString(v)) { + value.push(v); } }else{ - if(item.value === valueGetter(idx)){ - value.push(valueGetter(idx)); + if(item.value === valueGetter(idx)[0]) { + value.push(valueGetter(idx)[0]); } } - }) + }); }); return value; - function valueGetter(index) { + function joinValue (sources, targets) { + var value = ""; + BI.some(sources, function (idx, s) { + return BI.some(targets, function (id, t) { + if(s === t) { + value = s; + return true; + } + }); + }); + return value; + } + + function valueGetter (index) { switch (o.chooseType) { case BI.Selection.Single: return values[0]; - break; case BI.Selection.Multi: return values[index]; default: @@ -2398,9 +2411,17 @@ BI.DownListPopup = BI.inherit(BI.Pane, { this.popup.setValue(this._digest(valueItem)); }, + _getValue: function () { + var v = []; + BI.each(this.popup.getAllButtons(), function (i, item) { + i % 2 === 0 && v.push(item.getValue()); + }); + return v; + }, + getValue: function () { var self = this, result = []; - var values = this._checkValues(this.popup.getValue()); + var values = this._checkValues(this._getValue()); BI.each(values, function (i, value) { var valueItem = {}; if (BI.isNotNull(self.childValueMap[value])) { @@ -7384,7 +7405,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { type: BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA, keywords: keywords }, function (ob) { - var values = BI.pluck(ob.items, "value"); + var values = BI.map(ob.items, "value"); digest(values); }); @@ -7407,7 +7428,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { type: BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA, keywords: [this.trigger.getKey()] }, function (ob) { - var items = BI.pluck(ob.items, "value"); + var items = BI.map(ob.items, "value"); if (self.storeValue.type === res.type) { var change = false; var map = self._makeMap(self.storeValue.value); @@ -7741,7 +7762,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { type: BI.MultiSelectCombo.REQ_GET_ALL_DATA, keywords: keywords }, function (ob) { - var values = BI.pluck(ob.items, "value"); + var values = BI.map(ob.items, "value"); digest(values); }); @@ -7764,7 +7785,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { type: BI.MultiSelectCombo.REQ_GET_ALL_DATA, keywords: [this.trigger.getKey()] }, function (ob) { - var items = BI.pluck(ob.items, "value"); + var items = BI.map(ob.items, "value"); if (self.storeValue.type === res.type) { var change = false; var map = self._makeMap(self.storeValue.value); @@ -9194,7 +9215,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Widget, { o.itemsCreator({ type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA }, function (ob) { - self._allData = BI.pluck(ob.items, "value"); + self._allData = BI.map(ob.items, "value"); digest(self._allData); }); } else { @@ -9219,7 +9240,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Widget, { type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA, keyword: self.trigger.getKeyword() }, function (ob) { - var items = BI.pluck(ob.items, "value"); + var items = BI.map(ob.items, "value"); if (self.storeValue.type === res.type) { var change = false; var map = self._makeMap(self.storeValue.value); @@ -9508,7 +9529,7 @@ BI.MultiSelectList = BI.inherit(BI.Widget, { o.itemsCreator({ type: BI.MultiSelectList.REQ_GET_ALL_DATA }, function (ob) { - self._allData = BI.pluck(ob.items, "value"); + self._allData = BI.map(ob.items, "value"); digest(self._allData); }); } else { @@ -9533,7 +9554,7 @@ BI.MultiSelectList = BI.inherit(BI.Widget, { type: BI.MultiSelectList.REQ_GET_ALL_DATA, keyword: self.trigger.getKeyword() }, function (ob) { - var items = BI.pluck(ob.items, "value"); + var items = BI.map(ob.items, "value"); if (self.storeValue.type === res.type) { var change = false; var map = self._makeMap(self.storeValue.value); @@ -14025,7 +14046,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, { type: BI.SingleSelectCombo.REQ_GET_ALL_DATA, keywords: keywords }, function (ob) { - var values = BI.pluck(ob.items, "value"); + var values = BI.map(ob.items, "value"); digest(values); }); @@ -14048,7 +14069,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, { type: BI.SingleSelectCombo.REQ_GET_ALL_DATA, keywords: [this.trigger.getKey()] }, function (ob) { - var items = BI.pluck(ob.items, "value"); + var items = BI.map(ob.items, "value"); if (self.storeValue.type === res.type) { var change = false; var map = self._makeMap(self.storeValue.value); @@ -15342,7 +15363,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, { type: BI.SingleSelectCombo.REQ_GET_ALL_DATA, keywords: keywords }, function (ob) { - var values = BI.pluck(ob.items, "value"); + var values = BI.map(ob.items, "value"); digest(values); }); @@ -15365,7 +15386,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, { type: BI.SingleSelectCombo.REQ_GET_ALL_DATA, keywords: [this.trigger.getKey()] }, function (ob) { - var items = BI.pluck(ob.items, "value"); + var items = BI.map(ob.items, "value"); if (self.storeValue.type === res.type) { var change = false; var map = self._makeMap(self.storeValue.value); diff --git a/src/widget/downlist/popup.downlist.js b/src/widget/downlist/popup.downlist.js index 4bacae9b9..fd4207847 100644 --- a/src/widget/downlist/popup.downlist.js +++ b/src/widget/downlist/popup.downlist.js @@ -198,25 +198,38 @@ BI.DownListPopup = BI.inherit(BI.Pane, { var value = []; BI.each(o.items, function (idx, itemGroup) { BI.each(itemGroup, function (id, item) { - if(BI.isNotNull(item.children)){ - var childValues = BI.pluck(item.children, "value"); - if(BI.contains(childValues, valueGetter(idx))){ - value.push(valueGetter(idx)); + if(BI.isNotNull(item.children)) { + var childValues = BI.map(item.children, "value"); + var v = joinValue(childValues, valueGetter(idx)); + if(BI.isNotEmptyString(v)) { + value.push(v); } }else{ - if(item.value === valueGetter(idx)){ - value.push(valueGetter(idx)); + if(item.value === valueGetter(idx)[0]) { + value.push(valueGetter(idx)[0]); } } - }) + }); }); return value; - function valueGetter(index) { + function joinValue (sources, targets) { + var value = ""; + BI.some(sources, function (idx, s) { + return BI.some(targets, function (id, t) { + if(s === t) { + value = s; + return true; + } + }); + }); + return value; + } + + function valueGetter (index) { switch (o.chooseType) { case BI.Selection.Single: return values[0]; - break; case BI.Selection.Multi: return values[index]; default: @@ -244,9 +257,17 @@ BI.DownListPopup = BI.inherit(BI.Pane, { this.popup.setValue(this._digest(valueItem)); }, + _getValue: function () { + var v = []; + BI.each(this.popup.getAllButtons(), function (i, item) { + i % 2 === 0 && v.push(item.getValue()); + }); + return v; + }, + getValue: function () { var self = this, result = []; - var values = this._checkValues(this.popup.getValue()); + var values = this._checkValues(this._getValue()); BI.each(values, function (i, value) { var valueItem = {}; if (BI.isNotNull(self.childValueMap[value])) { diff --git a/src/widget/multiselect/multiselect..insert.combo.js b/src/widget/multiselect/multiselect..insert.combo.js index ac87f79cc..0708ed9d7 100644 --- a/src/widget/multiselect/multiselect..insert.combo.js +++ b/src/widget/multiselect/multiselect..insert.combo.js @@ -237,7 +237,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { type: BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA, keywords: keywords }, function (ob) { - var values = BI.pluck(ob.items, "value"); + var values = BI.map(ob.items, "value"); digest(values); }); @@ -260,7 +260,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { type: BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA, keywords: [this.trigger.getKey()] }, function (ob) { - var items = BI.pluck(ob.items, "value"); + var items = BI.map(ob.items, "value"); if (self.storeValue.type === res.type) { var change = false; var map = self._makeMap(self.storeValue.value); diff --git a/src/widget/multiselect/multiselect.combo.js b/src/widget/multiselect/multiselect.combo.js index d37de7d12..e24ef0b53 100644 --- a/src/widget/multiselect/multiselect.combo.js +++ b/src/widget/multiselect/multiselect.combo.js @@ -236,7 +236,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { type: BI.MultiSelectCombo.REQ_GET_ALL_DATA, keywords: keywords }, function (ob) { - var values = BI.pluck(ob.items, "value"); + var values = BI.map(ob.items, "value"); digest(values); }); @@ -259,7 +259,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { type: BI.MultiSelectCombo.REQ_GET_ALL_DATA, keywords: [this.trigger.getKey()] }, function (ob) { - var items = BI.pluck(ob.items, "value"); + var items = BI.map(ob.items, "value"); if (self.storeValue.type === res.type) { var change = false; var map = self._makeMap(self.storeValue.value); diff --git a/src/widget/multiselectlist/multiselectlist.insert.js b/src/widget/multiselectlist/multiselectlist.insert.js index b1be66863..d52fb34ca 100644 --- a/src/widget/multiselectlist/multiselectlist.insert.js +++ b/src/widget/multiselectlist/multiselectlist.insert.js @@ -204,7 +204,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Widget, { o.itemsCreator({ type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA }, function (ob) { - self._allData = BI.pluck(ob.items, "value"); + self._allData = BI.map(ob.items, "value"); digest(self._allData); }); } else { @@ -229,7 +229,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Widget, { type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA, keyword: self.trigger.getKeyword() }, function (ob) { - var items = BI.pluck(ob.items, "value"); + var items = BI.map(ob.items, "value"); if (self.storeValue.type === res.type) { var change = false; var map = self._makeMap(self.storeValue.value); diff --git a/src/widget/multiselectlist/multiselectlist.js b/src/widget/multiselectlist/multiselectlist.js index bfb9361cc..0d09f5368 100644 --- a/src/widget/multiselectlist/multiselectlist.js +++ b/src/widget/multiselectlist/multiselectlist.js @@ -193,7 +193,7 @@ BI.MultiSelectList = BI.inherit(BI.Widget, { o.itemsCreator({ type: BI.MultiSelectList.REQ_GET_ALL_DATA }, function (ob) { - self._allData = BI.pluck(ob.items, "value"); + self._allData = BI.map(ob.items, "value"); digest(self._allData); }); } else { @@ -218,7 +218,7 @@ BI.MultiSelectList = BI.inherit(BI.Widget, { type: BI.MultiSelectList.REQ_GET_ALL_DATA, keyword: self.trigger.getKeyword() }, function (ob) { - var items = BI.pluck(ob.items, "value"); + var items = BI.map(ob.items, "value"); if (self.storeValue.type === res.type) { var change = false; var map = self._makeMap(self.storeValue.value); diff --git a/src/widget/singleselect/singleselect.combo.js b/src/widget/singleselect/singleselect.combo.js index 829af86bb..9804255aa 100644 --- a/src/widget/singleselect/singleselect.combo.js +++ b/src/widget/singleselect/singleselect.combo.js @@ -216,7 +216,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, { type: BI.SingleSelectCombo.REQ_GET_ALL_DATA, keywords: keywords }, function (ob) { - var values = BI.pluck(ob.items, "value"); + var values = BI.map(ob.items, "value"); digest(values); }); @@ -239,7 +239,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, { type: BI.SingleSelectCombo.REQ_GET_ALL_DATA, keywords: [this.trigger.getKey()] }, function (ob) { - var items = BI.pluck(ob.items, "value"); + var items = BI.map(ob.items, "value"); if (self.storeValue.type === res.type) { var change = false; var map = self._makeMap(self.storeValue.value); diff --git a/src/widget/singleselectaddsearch/singleselect.combo.js b/src/widget/singleselectaddsearch/singleselect.combo.js index 51b01a4de..6280e6763 100644 --- a/src/widget/singleselectaddsearch/singleselect.combo.js +++ b/src/widget/singleselectaddsearch/singleselect.combo.js @@ -216,7 +216,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, { type: BI.SingleSelectCombo.REQ_GET_ALL_DATA, keywords: keywords }, function (ob) { - var values = BI.pluck(ob.items, "value"); + var values = BI.map(ob.items, "value"); digest(values); }); @@ -239,7 +239,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, { type: BI.SingleSelectCombo.REQ_GET_ALL_DATA, keywords: [this.trigger.getKey()] }, function (ob) { - var items = BI.pluck(ob.items, "value"); + var items = BI.map(ob.items, "value"); if (self.storeValue.type === res.type) { var change = false; var map = self._makeMap(self.storeValue.value);