guy 8 years ago
parent
commit
2b9bceac94
  1. 6
      bi/base.js
  2. 8
      bi/core.js
  3. 6
      dist/base.js
  4. 8
      dist/core.js
  5. 6
      src/base/combination/group.button.js
  6. 8
      src/core/wrapper/layout.js

6
bi/base.js

@ -1260,8 +1260,14 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
return node; return node;
}, },
empty: function () {
BI.ButtonGroup.superclass.empty.apply(this, arguments);
this.options.items = [];
},
destroy: function () { destroy: function () {
BI.ButtonGroup.superclass.destroy.apply(this, arguments); BI.ButtonGroup.superclass.destroy.apply(this, arguments);
this.options.items = [];
} }
}); });
BI.extend(BI.ButtonGroup, { BI.extend(BI.ButtonGroup, {

8
bi/core.js

@ -12871,7 +12871,7 @@ BI.Layout = BI.inherit(BI.Widget, {
for (var i = this.options.items.length; i > index; i--) { for (var i = this.options.items.length; i > index; i--) {
this._children[this._getChildName(i)] = this._children[this._getChildName(i - 1)]; this._children[this._getChildName(i)] = this._children[this._getChildName(i - 1)];
} }
delete this._children[index]; delete this._children[this._getChildName(index)];
this.options.items.splice(index, 0, item); this.options.items.splice(index, 0, item);
}, },
@ -12879,6 +12879,7 @@ BI.Layout = BI.inherit(BI.Widget, {
for (var i = index; i < this.options.items.length - 1; i++) { for (var i = index; i < this.options.items.length - 1; i++) {
this._children[this._getChildName(i)] = this._children[this._getChildName(i + 1)]; this._children[this._getChildName(i)] = this._children[this._getChildName(i + 1)];
} }
delete this._children[this._getChildName(this.options.items.length - 1)];
this.options.items.splice(index, 1); this.options.items.splice(index, 1);
}, },
@ -13038,6 +13039,11 @@ BI.Layout = BI.inherit(BI.Widget, {
}); });
}, },
empty: function () {
BI.Layout.superclass.empty.apply(this, arguments);
this.options.items = [];
},
populate: function (items) { populate: function (items) {
var self = this, o = this.options; var self = this, o = this.options;
items = items || []; items = items || [];

6
dist/base.js vendored

@ -1260,8 +1260,14 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
return node; return node;
}, },
empty: function () {
BI.ButtonGroup.superclass.empty.apply(this, arguments);
this.options.items = [];
},
destroy: function () { destroy: function () {
BI.ButtonGroup.superclass.destroy.apply(this, arguments); BI.ButtonGroup.superclass.destroy.apply(this, arguments);
this.options.items = [];
} }
}); });
BI.extend(BI.ButtonGroup, { BI.extend(BI.ButtonGroup, {

8
dist/core.js vendored

@ -19469,7 +19469,7 @@ BI.Layout = BI.inherit(BI.Widget, {
for (var i = this.options.items.length; i > index; i--) { for (var i = this.options.items.length; i > index; i--) {
this._children[this._getChildName(i)] = this._children[this._getChildName(i - 1)]; this._children[this._getChildName(i)] = this._children[this._getChildName(i - 1)];
} }
delete this._children[index]; delete this._children[this._getChildName(index)];
this.options.items.splice(index, 0, item); this.options.items.splice(index, 0, item);
}, },
@ -19477,6 +19477,7 @@ BI.Layout = BI.inherit(BI.Widget, {
for (var i = index; i < this.options.items.length - 1; i++) { for (var i = index; i < this.options.items.length - 1; i++) {
this._children[this._getChildName(i)] = this._children[this._getChildName(i + 1)]; this._children[this._getChildName(i)] = this._children[this._getChildName(i + 1)];
} }
delete this._children[this._getChildName(this.options.items.length - 1)];
this.options.items.splice(index, 1); this.options.items.splice(index, 1);
}, },
@ -19636,6 +19637,11 @@ BI.Layout = BI.inherit(BI.Widget, {
}); });
}, },
empty: function () {
BI.Layout.superclass.empty.apply(this, arguments);
this.options.items = [];
},
populate: function (items) { populate: function (items) {
var self = this, o = this.options; var self = this, o = this.options;
items = items || []; items = items || [];

6
src/base/combination/group.button.js

@ -297,8 +297,14 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
return node; return node;
}, },
empty: function () {
BI.ButtonGroup.superclass.empty.apply(this, arguments);
this.options.items = [];
},
destroy: function () { destroy: function () {
BI.ButtonGroup.superclass.destroy.apply(this, arguments); BI.ButtonGroup.superclass.destroy.apply(this, arguments);
this.options.items = [];
} }
}); });
BI.extend(BI.ButtonGroup, { BI.extend(BI.ButtonGroup, {

8
src/core/wrapper/layout.js

@ -181,7 +181,7 @@ BI.Layout = BI.inherit(BI.Widget, {
for (var i = this.options.items.length; i > index; i--) { for (var i = this.options.items.length; i > index; i--) {
this._children[this._getChildName(i)] = this._children[this._getChildName(i - 1)]; this._children[this._getChildName(i)] = this._children[this._getChildName(i - 1)];
} }
delete this._children[index]; delete this._children[this._getChildName(index)];
this.options.items.splice(index, 0, item); this.options.items.splice(index, 0, item);
}, },
@ -189,6 +189,7 @@ BI.Layout = BI.inherit(BI.Widget, {
for (var i = index; i < this.options.items.length - 1; i++) { for (var i = index; i < this.options.items.length - 1; i++) {
this._children[this._getChildName(i)] = this._children[this._getChildName(i + 1)]; this._children[this._getChildName(i)] = this._children[this._getChildName(i + 1)];
} }
delete this._children[this._getChildName(this.options.items.length - 1)];
this.options.items.splice(index, 1); this.options.items.splice(index, 1);
}, },
@ -348,6 +349,11 @@ BI.Layout = BI.inherit(BI.Widget, {
}); });
}, },
empty: function () {
BI.Layout.superclass.empty.apply(this, arguments);
this.options.items = [];
},
populate: function (items) { populate: function (items) {
var self = this, o = this.options; var self = this, o = this.options;
items = items || []; items = items || [];

Loading…
Cancel
Save