|
|
@ -1118,9 +1118,21 @@ BI.ButtonGroup = BI.inherit(BI.Widget, { |
|
|
|
this.layouts.addItems(this._packageLayout(items).items); |
|
|
|
this.layouts.addItems(this._packageLayout(items).items); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
removeItemAt: function (index) { |
|
|
|
removeItemAt: function (indexes) { |
|
|
|
this.buttons[index].destroy(); |
|
|
|
BI.remove(this.buttons, indexes); |
|
|
|
this.layouts.removeItemAt(index); |
|
|
|
this.layouts.removeItemAt(indexes); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
removeItems: function (values) { |
|
|
|
|
|
|
|
values = BI.isArray(values) ? values : [values]; |
|
|
|
|
|
|
|
var deleted = []; |
|
|
|
|
|
|
|
BI.each(this.buttons, function (i, button) { |
|
|
|
|
|
|
|
if (BI.deepContains(values, button.getValue())) { |
|
|
|
|
|
|
|
deleted.push(i); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
BI.remove(this.buttons, deleted); |
|
|
|
|
|
|
|
this.layouts.removeItemAt(deleted); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
populate: function (items) { |
|
|
|
populate: function (items) { |
|
|
@ -3612,6 +3624,14 @@ BI.shortcut("bi.combo_group", BI.ComboGroup);BI.VirtualGroup = BI.inherit(BI.Wid |
|
|
|
this.layouts.prependItems(items); |
|
|
|
this.layouts.prependItems(items); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setValue: function (v) { |
|
|
|
|
|
|
|
this.layouts.setValue(v); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getValue: function () { |
|
|
|
|
|
|
|
return this.layouts.getValue(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
populate: function (items) { |
|
|
|
populate: function (items) { |
|
|
|
var self = this; |
|
|
|
var self = this; |
|
|
|
items = items || []; |
|
|
|
items = items || []; |
|
|
|