|
|
@ -26,7 +26,7 @@ BI.ValueChooserInsertCombo = BI.inherit(BI.AbstractValueChooser, { |
|
|
|
element: this, |
|
|
|
element: this, |
|
|
|
allowEdit: o.allowEdit, |
|
|
|
allowEdit: o.allowEdit, |
|
|
|
text: o.text, |
|
|
|
text: o.text, |
|
|
|
value: o.value, |
|
|
|
value: this._assertValue(o.value), |
|
|
|
itemsCreator: BI.bind(this._itemsCreator, this), |
|
|
|
itemsCreator: BI.bind(this._itemsCreator, this), |
|
|
|
valueFormatter: BI.bind(this._valueFormatter, this), |
|
|
|
valueFormatter: BI.bind(this._valueFormatter, this), |
|
|
|
width: o.width, |
|
|
|
width: o.width, |
|
|
@ -65,8 +65,23 @@ 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) { |
|
|
|
setValue: function (v) { |
|
|
|
this.combo.setValue(v); |
|
|
|
this.combo.setValue(this._assertValue(v)); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
getValue: function () { |
|
|
|
getValue: function () { |
|
|
|