|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
BI.TextValueComboPopup = BI.inherit(BI.Pane, { |
|
|
|
|
BI.TextValueComboPopup = BI.inherit(BI.Widget, { |
|
|
|
|
_defaultConfig: function () { |
|
|
|
|
return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
|
baseCls: "bi-text-icon-popup", |
|
|
|
@ -15,17 +15,20 @@ BI.TextValueComboPopup = BI.inherit(BI.Pane, {
|
|
|
|
|
vgap: 5, |
|
|
|
|
items: [ |
|
|
|
|
{ |
|
|
|
|
type: "bi.button_group", |
|
|
|
|
type: "bi.list_pane", |
|
|
|
|
ref: (_ref) => { |
|
|
|
|
this.popup = _ref; |
|
|
|
|
}, |
|
|
|
|
items: this._formatItems(o.items), |
|
|
|
|
chooseType: o.chooseType, |
|
|
|
|
layouts: [ |
|
|
|
|
{ |
|
|
|
|
type: "bi.vertical" |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
el: { |
|
|
|
|
type: "bi.button_group", |
|
|
|
|
chooseType: o.chooseType, |
|
|
|
|
layouts: [ |
|
|
|
|
{ |
|
|
|
|
type: "bi.vertical" |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
value: o.value, |
|
|
|
|
listeners: [ |
|
|
|
|
{ |
|
|
|
@ -131,12 +134,6 @@ BI.TextValueComboPopup = BI.inherit(BI.Pane, {
|
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
beforeMount: function () { |
|
|
|
|
if (this.options.chooseType !== BI.ButtonGroup.CHOOSE_TYPE_MULTI) { |
|
|
|
|
this.check(); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_formatItems: function (items) { |
|
|
|
|
var o = this.options; |
|
|
|
|
return BI.map(items, function (i, item) { |
|
|
|
@ -150,7 +147,6 @@ BI.TextValueComboPopup = BI.inherit(BI.Pane, {
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
populate: function (items) { |
|
|
|
|
BI.TextValueComboPopup.superclass.populate.apply(this, arguments); |
|
|
|
|
this.popup.populate(this._formatItems(items)); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|