|
|
|
@ -22,12 +22,13 @@ BI.VirtualGroup = BI.inherit(BI.Widget, {
|
|
|
|
|
_packageBtns: function (items) { |
|
|
|
|
var o = this.options; |
|
|
|
|
var map = this.buttonMap = {}; |
|
|
|
|
for (var i = o.layouts.length - 1; i > 0; i--) { |
|
|
|
|
var layouts = BI.isArray(o.layouts) ? o.layouts : [o.layouts]; |
|
|
|
|
for (var i = layouts.length - 1; i > 0; i--) { |
|
|
|
|
items = BI.map(items, function (k, it) { |
|
|
|
|
var el = BI.stripEL(it); |
|
|
|
|
return BI.extend({}, o.layouts[i], { |
|
|
|
|
return BI.extend({}, layouts[i], { |
|
|
|
|
items: [ |
|
|
|
|
BI.extend({}, o.layouts[i].el, { |
|
|
|
|
BI.extend({}, layouts[i].el, { |
|
|
|
|
el: BI.extend({ |
|
|
|
|
ref: function (_ref) { |
|
|
|
|
if (BI.isKey(map[el.value])) { |
|
|
|
@ -44,7 +45,9 @@ BI.VirtualGroup = BI.inherit(BI.Widget, {
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_packageLayout: function (items) { |
|
|
|
|
var o = this.options, layout = BI.deepClone(o.layouts[0]); |
|
|
|
|
var o = this.options; |
|
|
|
|
var layouts = BI.isArray(o.layouts) ? o.layouts : [o.layouts]; |
|
|
|
|
var layout = BI.deepClone(layouts[0]); |
|
|
|
|
|
|
|
|
|
var lay = BI.formatEL(layout).el; |
|
|
|
|
while (lay && lay.items && !BI.isEmpty(lay.items)) { |
|
|
|
@ -100,7 +103,6 @@ BI.VirtualGroup = BI.inherit(BI.Widget, {
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
populate: function (items) { |
|
|
|
|
var self = this; |
|
|
|
|
items = items || []; |
|
|
|
|
this.options.items = items; |
|
|
|
|
items = this._packageBtns(items); |
|
|
|
|