diff --git a/src/component/valuechooser/abstract.valuechooser.js b/src/component/valuechooser/abstract.valuechooser.js index ac4b08ae5..bd1ab309c 100644 --- a/src/component/valuechooser/abstract.valuechooser.js +++ b/src/component/valuechooser/abstract.valuechooser.js @@ -88,5 +88,20 @@ BI.AbstractValueChooser = BI.inherit(BI.Widget, { hasNext: self._hasNextByTimes(resultItems, options.times) }); } - } + }, + + _assertValue: function (v) { + v = v || {}; + var value = v; + if (v.type === BI.Selection.Multi && BI.isNotNull(this.items)) { + var isAllSelect = BI.difference(BI.map(this.items, "value"), v.value).length === 0; + if (isAllSelect) { + value = { + type: BI.Selection.All, + value: [], + }; + } + } + return value; + }, }); \ No newline at end of file diff --git a/src/component/valuechooser/combo.valuechooser.insert.js b/src/component/valuechooser/combo.valuechooser.insert.js index 700794459..cc64d15b6 100644 --- a/src/component/valuechooser/combo.valuechooser.insert.js +++ b/src/component/valuechooser/combo.valuechooser.insert.js @@ -65,21 +65,6 @@ BI.ValueChooserInsertCombo = BI.inherit(BI.AbstractValueChooser, { }); }, - _assertValue: function (v) { - v = v || {}; - var value = v; - if (v.type === BI.Selection.Multi && BI.isNotNull(this.items)) { - var isAllSelect = BI.difference(BI.map(this.items, "value"), v.value).length === 0; - if (isAllSelect) { - value = { - type: BI.Selection.All, - value: [], - }; - } - } - return value; - }, - setValue: function (v) { this.combo.setValue(this._assertValue(v)); }, diff --git a/src/component/valuechooser/combo.valuechooser.js b/src/component/valuechooser/combo.valuechooser.js index e39515b98..9f1a05f8d 100644 --- a/src/component/valuechooser/combo.valuechooser.js +++ b/src/component/valuechooser/combo.valuechooser.js @@ -69,21 +69,6 @@ BI.ValueChooserCombo = BI.inherit(BI.AbstractValueChooser, { }); }, - _assertValue: function (v) { - v = v || {}; - var value = v; - if (v.type === BI.Selection.Multi && BI.isNotNull(this.items)) { - var isAllSelect = BI.difference(BI.map(this.items, "value"), v.value).length === 0; - if (isAllSelect) { - value = { - type: BI.Selection.All, - value: [], - }; - } - } - return value; - }, - setValue: function (v) { this.combo.setValue(this._assertValue(v)); },