Browse Source

Merge branch 'master' of http://cloud.finedevelop.com:2015/scm/~guy/fineui

# Conflicts:
#	dist/bundle.min.js
#	dist/fineui.min.js
es6
Young 7 years ago
parent
commit
0ea169b9b2
  1. 30
      dist/bundle.js
  2. 30
      dist/core.js
  3. 30
      dist/fineui.js
  4. 2
      src/core/wrapper/layout/layout.card.js
  5. 6
      src/core/wrapper/layout/layout.grid.js
  6. 4
      src/core/wrapper/layout/layout.tape.js
  7. 4
      src/core/wrapper/layout/middle/middle.center.js
  8. 4
      src/core/wrapper/layout/middle/middle.float.center.js
  9. 6
      src/core/wrapper/layout/middle/middle.horizontal.js
  10. 4
      src/core/wrapper/layout/middle/middle.vertical.js

30
dist/bundle.js vendored

@ -23901,7 +23901,7 @@ BI.CardLayout = BI.inherit(BI.Layout, {
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (item) { if (item) {
if (!self.hasWidget(item.cardName)) { if (!self.hasWidget(item.cardName)) {
var w = BI.createWidget(item, this); var w = BI.createWidget(item, self);
w.on(BI.Events.DESTROY, function () { w.on(BI.Events.DESTROY, function () {
var index = BI.findIndex(o.items, function (i, tItem) { var index = BI.findIndex(o.items, function (i, tItem) {
return tItem.cardName == item.cardName; return tItem.cardName == item.cardName;
@ -24490,7 +24490,7 @@ BI.GridLayout = BI.inherit(BI.Layout, {
}, },
stroke: function (items) { stroke: function (items) {
var o = this.options; var self = this, o = this.options;
var rows = o.rows || o.items.length, columns = o.columns || ((o.items[0] && o.items[0].length) | 0); var rows = o.rows || o.items.length, columns = o.columns || ((o.items[0] && o.items[0].length) | 0);
var width = 100 / columns, height = 100 / rows; var width = 100 / columns, height = 100 / rows;
var els = []; var els = [];
@ -24537,11 +24537,11 @@ BI.GridLayout = BI.inherit(BI.Layout, {
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (BI.isArray(item)) { if (BI.isArray(item)) {
BI.each(item, function (j, el) { BI.each(item, function (j, el) {
els[i][j] = BI.createWidget(el, this); els[i][j] = BI.createWidget(el, self);
}); });
return; return;
} }
els[item.row][item.column] = BI.createWidget(item, this); els[item.row][item.column] = BI.createWidget(item, self);
}); });
for (var i = 0; i < rows; i++) { for (var i = 0; i < rows; i++) {
for (var j = 0; j < columns; j++) { for (var j = 0; j < columns; j++) {
@ -24997,7 +24997,7 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
items = BI.compact(items); items = BI.compact(items);
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (!self.hasWidget(self.getName() + i + "")) { if (!self.hasWidget(self.getName() + i + "")) {
var w = BI.createWidget(item, this); var w = BI.createWidget(item, self);
self.addWidget(self.getName() + i + "", w); self.addWidget(self.getName() + i + "", w);
} else { } else {
w = self.getWidgetByName(self.getName() + i + ""); w = self.getWidgetByName(self.getName() + i + "");
@ -25102,7 +25102,7 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
items = BI.compact(items); items = BI.compact(items);
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (!self.hasWidget(self.getName() + i + "")) { if (!self.hasWidget(self.getName() + i + "")) {
var w = BI.createWidget(item, this); var w = BI.createWidget(item, self);
self.addWidget(self.getName() + i + "", w); self.addWidget(self.getName() + i + "", w);
} else { } else {
w = self.getWidgetByName(self.getName() + i + ""); w = self.getWidgetByName(self.getName() + i + "");
@ -25598,12 +25598,12 @@ BI.CenterLayout = BI.inherit(BI.Layout, {
el: BI.createWidget({ el: BI.createWidget({
type: "bi.default", type: "bi.default",
cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "") cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")
}, this) }, self)
}); });
}); });
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (item) { if (item) {
var w = BI.createWidget(item, this); var w = BI.createWidget(item, self);
w.element.css({ w.element.css({
position: "absolute", position: "absolute",
left: o.hgap + o.lgap, left: o.hgap + o.lgap,
@ -25667,7 +25667,7 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
BI.each(items, function (i) { BI.each(items, function (i) {
var widget = BI.createWidget({ var widget = BI.createWidget({
type: "bi.default" type: "bi.default"
}, this); }, self);
widget.element.addClass("center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")).css({ widget.element.addClass("center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")).css({
width: width + "%", width: width + "%",
height: "100%" height: "100%"
@ -25678,7 +25678,7 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
}); });
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (item) { if (item) {
var w = BI.createWidget(item, this); var w = BI.createWidget(item, self);
w.element.css({ w.element.css({
position: "absolute", position: "absolute",
left: o.hgap + o.lgap, left: o.hgap + o.lgap,
@ -25735,7 +25735,7 @@ BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
}, },
stroke: function (items) { stroke: function (items) {
var o = this.options; var self = this, o = this.options;
var list = []; var list = [];
BI.each(items, function (i) { BI.each(items, function (i) {
list.push({ list.push({
@ -25744,12 +25744,12 @@ BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
el: BI.createWidget({ el: BI.createWidget({
type: "bi.default", type: "bi.default",
cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "") cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")
}, this) }, self)
}); });
}); });
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (item) { if (item) {
var w = BI.createWidget(item, this); var w = BI.createWidget(item, self);
w.element.css({ w.element.css({
position: "absolute", position: "absolute",
left: o.hgap + o.lgap, left: o.hgap + o.lgap,
@ -25816,12 +25816,12 @@ BI.VerticalCenterLayout = BI.inherit(BI.Layout, {
el: BI.createWidget({ el: BI.createWidget({
type: "bi.default", type: "bi.default",
cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "") cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")
}, this) }, self)
}); });
}); });
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (item) { if (item) {
var w = BI.createWidget(item, this); var w = BI.createWidget(item, self);
w.element.css({ w.element.css({
position: "absolute", position: "absolute",
left: o.hgap + o.lgap, left: o.hgap + o.lgap,

30
dist/core.js vendored

@ -23901,7 +23901,7 @@ BI.CardLayout = BI.inherit(BI.Layout, {
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (item) { if (item) {
if (!self.hasWidget(item.cardName)) { if (!self.hasWidget(item.cardName)) {
var w = BI.createWidget(item, this); var w = BI.createWidget(item, self);
w.on(BI.Events.DESTROY, function () { w.on(BI.Events.DESTROY, function () {
var index = BI.findIndex(o.items, function (i, tItem) { var index = BI.findIndex(o.items, function (i, tItem) {
return tItem.cardName == item.cardName; return tItem.cardName == item.cardName;
@ -24490,7 +24490,7 @@ BI.GridLayout = BI.inherit(BI.Layout, {
}, },
stroke: function (items) { stroke: function (items) {
var o = this.options; var self = this, o = this.options;
var rows = o.rows || o.items.length, columns = o.columns || ((o.items[0] && o.items[0].length) | 0); var rows = o.rows || o.items.length, columns = o.columns || ((o.items[0] && o.items[0].length) | 0);
var width = 100 / columns, height = 100 / rows; var width = 100 / columns, height = 100 / rows;
var els = []; var els = [];
@ -24537,11 +24537,11 @@ BI.GridLayout = BI.inherit(BI.Layout, {
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (BI.isArray(item)) { if (BI.isArray(item)) {
BI.each(item, function (j, el) { BI.each(item, function (j, el) {
els[i][j] = BI.createWidget(el, this); els[i][j] = BI.createWidget(el, self);
}); });
return; return;
} }
els[item.row][item.column] = BI.createWidget(item, this); els[item.row][item.column] = BI.createWidget(item, self);
}); });
for (var i = 0; i < rows; i++) { for (var i = 0; i < rows; i++) {
for (var j = 0; j < columns; j++) { for (var j = 0; j < columns; j++) {
@ -24997,7 +24997,7 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
items = BI.compact(items); items = BI.compact(items);
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (!self.hasWidget(self.getName() + i + "")) { if (!self.hasWidget(self.getName() + i + "")) {
var w = BI.createWidget(item, this); var w = BI.createWidget(item, self);
self.addWidget(self.getName() + i + "", w); self.addWidget(self.getName() + i + "", w);
} else { } else {
w = self.getWidgetByName(self.getName() + i + ""); w = self.getWidgetByName(self.getName() + i + "");
@ -25102,7 +25102,7 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
items = BI.compact(items); items = BI.compact(items);
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (!self.hasWidget(self.getName() + i + "")) { if (!self.hasWidget(self.getName() + i + "")) {
var w = BI.createWidget(item, this); var w = BI.createWidget(item, self);
self.addWidget(self.getName() + i + "", w); self.addWidget(self.getName() + i + "", w);
} else { } else {
w = self.getWidgetByName(self.getName() + i + ""); w = self.getWidgetByName(self.getName() + i + "");
@ -25598,12 +25598,12 @@ BI.CenterLayout = BI.inherit(BI.Layout, {
el: BI.createWidget({ el: BI.createWidget({
type: "bi.default", type: "bi.default",
cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "") cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")
}, this) }, self)
}); });
}); });
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (item) { if (item) {
var w = BI.createWidget(item, this); var w = BI.createWidget(item, self);
w.element.css({ w.element.css({
position: "absolute", position: "absolute",
left: o.hgap + o.lgap, left: o.hgap + o.lgap,
@ -25667,7 +25667,7 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
BI.each(items, function (i) { BI.each(items, function (i) {
var widget = BI.createWidget({ var widget = BI.createWidget({
type: "bi.default" type: "bi.default"
}, this); }, self);
widget.element.addClass("center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")).css({ widget.element.addClass("center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")).css({
width: width + "%", width: width + "%",
height: "100%" height: "100%"
@ -25678,7 +25678,7 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
}); });
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (item) { if (item) {
var w = BI.createWidget(item, this); var w = BI.createWidget(item, self);
w.element.css({ w.element.css({
position: "absolute", position: "absolute",
left: o.hgap + o.lgap, left: o.hgap + o.lgap,
@ -25735,7 +25735,7 @@ BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
}, },
stroke: function (items) { stroke: function (items) {
var o = this.options; var self = this, o = this.options;
var list = []; var list = [];
BI.each(items, function (i) { BI.each(items, function (i) {
list.push({ list.push({
@ -25744,12 +25744,12 @@ BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
el: BI.createWidget({ el: BI.createWidget({
type: "bi.default", type: "bi.default",
cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "") cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")
}, this) }, self)
}); });
}); });
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (item) { if (item) {
var w = BI.createWidget(item, this); var w = BI.createWidget(item, self);
w.element.css({ w.element.css({
position: "absolute", position: "absolute",
left: o.hgap + o.lgap, left: o.hgap + o.lgap,
@ -25816,12 +25816,12 @@ BI.VerticalCenterLayout = BI.inherit(BI.Layout, {
el: BI.createWidget({ el: BI.createWidget({
type: "bi.default", type: "bi.default",
cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "") cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")
}, this) }, self)
}); });
}); });
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (item) { if (item) {
var w = BI.createWidget(item, this); var w = BI.createWidget(item, self);
w.element.css({ w.element.css({
position: "absolute", position: "absolute",
left: o.hgap + o.lgap, left: o.hgap + o.lgap,

30
dist/fineui.js vendored

@ -24074,7 +24074,7 @@ BI.CardLayout = BI.inherit(BI.Layout, {
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (item) { if (item) {
if (!self.hasWidget(item.cardName)) { if (!self.hasWidget(item.cardName)) {
var w = BI.createWidget(item, this); var w = BI.createWidget(item, self);
w.on(BI.Events.DESTROY, function () { w.on(BI.Events.DESTROY, function () {
var index = BI.findIndex(o.items, function (i, tItem) { var index = BI.findIndex(o.items, function (i, tItem) {
return tItem.cardName == item.cardName; return tItem.cardName == item.cardName;
@ -24663,7 +24663,7 @@ BI.GridLayout = BI.inherit(BI.Layout, {
}, },
stroke: function (items) { stroke: function (items) {
var o = this.options; var self = this, o = this.options;
var rows = o.rows || o.items.length, columns = o.columns || ((o.items[0] && o.items[0].length) | 0); var rows = o.rows || o.items.length, columns = o.columns || ((o.items[0] && o.items[0].length) | 0);
var width = 100 / columns, height = 100 / rows; var width = 100 / columns, height = 100 / rows;
var els = []; var els = [];
@ -24710,11 +24710,11 @@ BI.GridLayout = BI.inherit(BI.Layout, {
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (BI.isArray(item)) { if (BI.isArray(item)) {
BI.each(item, function (j, el) { BI.each(item, function (j, el) {
els[i][j] = BI.createWidget(el, this); els[i][j] = BI.createWidget(el, self);
}); });
return; return;
} }
els[item.row][item.column] = BI.createWidget(item, this); els[item.row][item.column] = BI.createWidget(item, self);
}); });
for (var i = 0; i < rows; i++) { for (var i = 0; i < rows; i++) {
for (var j = 0; j < columns; j++) { for (var j = 0; j < columns; j++) {
@ -25170,7 +25170,7 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
items = BI.compact(items); items = BI.compact(items);
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (!self.hasWidget(self.getName() + i + "")) { if (!self.hasWidget(self.getName() + i + "")) {
var w = BI.createWidget(item, this); var w = BI.createWidget(item, self);
self.addWidget(self.getName() + i + "", w); self.addWidget(self.getName() + i + "", w);
} else { } else {
w = self.getWidgetByName(self.getName() + i + ""); w = self.getWidgetByName(self.getName() + i + "");
@ -25275,7 +25275,7 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
items = BI.compact(items); items = BI.compact(items);
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (!self.hasWidget(self.getName() + i + "")) { if (!self.hasWidget(self.getName() + i + "")) {
var w = BI.createWidget(item, this); var w = BI.createWidget(item, self);
self.addWidget(self.getName() + i + "", w); self.addWidget(self.getName() + i + "", w);
} else { } else {
w = self.getWidgetByName(self.getName() + i + ""); w = self.getWidgetByName(self.getName() + i + "");
@ -25771,12 +25771,12 @@ BI.CenterLayout = BI.inherit(BI.Layout, {
el: BI.createWidget({ el: BI.createWidget({
type: "bi.default", type: "bi.default",
cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "") cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")
}, this) }, self)
}); });
}); });
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (item) { if (item) {
var w = BI.createWidget(item, this); var w = BI.createWidget(item, self);
w.element.css({ w.element.css({
position: "absolute", position: "absolute",
left: o.hgap + o.lgap, left: o.hgap + o.lgap,
@ -25840,7 +25840,7 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
BI.each(items, function (i) { BI.each(items, function (i) {
var widget = BI.createWidget({ var widget = BI.createWidget({
type: "bi.default" type: "bi.default"
}, this); }, self);
widget.element.addClass("center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")).css({ widget.element.addClass("center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")).css({
width: width + "%", width: width + "%",
height: "100%" height: "100%"
@ -25851,7 +25851,7 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
}); });
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (item) { if (item) {
var w = BI.createWidget(item, this); var w = BI.createWidget(item, self);
w.element.css({ w.element.css({
position: "absolute", position: "absolute",
left: o.hgap + o.lgap, left: o.hgap + o.lgap,
@ -25908,7 +25908,7 @@ BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
}, },
stroke: function (items) { stroke: function (items) {
var o = this.options; var self = this, o = this.options;
var list = []; var list = [];
BI.each(items, function (i) { BI.each(items, function (i) {
list.push({ list.push({
@ -25917,12 +25917,12 @@ BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
el: BI.createWidget({ el: BI.createWidget({
type: "bi.default", type: "bi.default",
cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "") cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")
}, this) }, self)
}); });
}); });
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (item) { if (item) {
var w = BI.createWidget(item, this); var w = BI.createWidget(item, self);
w.element.css({ w.element.css({
position: "absolute", position: "absolute",
left: o.hgap + o.lgap, left: o.hgap + o.lgap,
@ -25989,12 +25989,12 @@ BI.VerticalCenterLayout = BI.inherit(BI.Layout, {
el: BI.createWidget({ el: BI.createWidget({
type: "bi.default", type: "bi.default",
cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "") cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")
}, this) }, self)
}); });
}); });
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (item) { if (item) {
var w = BI.createWidget(item, this); var w = BI.createWidget(item, self);
w.element.css({ w.element.css({
position: "absolute", position: "absolute",
left: o.hgap + o.lgap, left: o.hgap + o.lgap,

2
src/core/wrapper/layout/layout.card.js

@ -28,7 +28,7 @@ BI.CardLayout = BI.inherit(BI.Layout, {
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (item) { if (item) {
if (!self.hasWidget(item.cardName)) { if (!self.hasWidget(item.cardName)) {
var w = BI.createWidget(item, this); var w = BI.createWidget(item, self);
w.on(BI.Events.DESTROY, function () { w.on(BI.Events.DESTROY, function () {
var index = BI.findIndex(o.items, function (i, tItem) { var index = BI.findIndex(o.items, function (i, tItem) {
return tItem.cardName == item.cardName; return tItem.cardName == item.cardName;

6
src/core/wrapper/layout/layout.grid.js

@ -45,7 +45,7 @@ BI.GridLayout = BI.inherit(BI.Layout, {
}, },
stroke: function (items) { stroke: function (items) {
var o = this.options; var self = this, o = this.options;
var rows = o.rows || o.items.length, columns = o.columns || ((o.items[0] && o.items[0].length) | 0); var rows = o.rows || o.items.length, columns = o.columns || ((o.items[0] && o.items[0].length) | 0);
var width = 100 / columns, height = 100 / rows; var width = 100 / columns, height = 100 / rows;
var els = []; var els = [];
@ -92,11 +92,11 @@ BI.GridLayout = BI.inherit(BI.Layout, {
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (BI.isArray(item)) { if (BI.isArray(item)) {
BI.each(item, function (j, el) { BI.each(item, function (j, el) {
els[i][j] = BI.createWidget(el, this); els[i][j] = BI.createWidget(el, self);
}); });
return; return;
} }
els[item.row][item.column] = BI.createWidget(item, this); els[item.row][item.column] = BI.createWidget(item, self);
}); });
for (var i = 0; i < rows; i++) { for (var i = 0; i < rows; i++) {
for (var j = 0; j < columns; j++) { for (var j = 0; j < columns; j++) {

4
src/core/wrapper/layout/layout.tape.js

@ -47,7 +47,7 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
items = BI.compact(items); items = BI.compact(items);
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (!self.hasWidget(self.getName() + i + "")) { if (!self.hasWidget(self.getName() + i + "")) {
var w = BI.createWidget(item, this); var w = BI.createWidget(item, self);
self.addWidget(self.getName() + i + "", w); self.addWidget(self.getName() + i + "", w);
} else { } else {
w = self.getWidgetByName(self.getName() + i + ""); w = self.getWidgetByName(self.getName() + i + "");
@ -152,7 +152,7 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
items = BI.compact(items); items = BI.compact(items);
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (!self.hasWidget(self.getName() + i + "")) { if (!self.hasWidget(self.getName() + i + "")) {
var w = BI.createWidget(item, this); var w = BI.createWidget(item, self);
self.addWidget(self.getName() + i + "", w); self.addWidget(self.getName() + i + "", w);
} else { } else {
w = self.getWidgetByName(self.getName() + i + ""); w = self.getWidgetByName(self.getName() + i + "");

4
src/core/wrapper/layout/middle/middle.center.js

@ -40,12 +40,12 @@ BI.CenterLayout = BI.inherit(BI.Layout, {
el: BI.createWidget({ el: BI.createWidget({
type: "bi.default", type: "bi.default",
cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "") cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")
}, this) }, self)
}); });
}); });
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (item) { if (item) {
var w = BI.createWidget(item, this); var w = BI.createWidget(item, self);
w.element.css({ w.element.css({
position: "absolute", position: "absolute",
left: o.hgap + o.lgap, left: o.hgap + o.lgap,

4
src/core/wrapper/layout/middle/middle.float.center.js

@ -35,7 +35,7 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
BI.each(items, function (i) { BI.each(items, function (i) {
var widget = BI.createWidget({ var widget = BI.createWidget({
type: "bi.default" type: "bi.default"
}, this); }, self);
widget.element.addClass("center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")).css({ widget.element.addClass("center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")).css({
width: width + "%", width: width + "%",
height: "100%" height: "100%"
@ -46,7 +46,7 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
}); });
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (item) { if (item) {
var w = BI.createWidget(item, this); var w = BI.createWidget(item, self);
w.element.css({ w.element.css({
position: "absolute", position: "absolute",
left: o.hgap + o.lgap, left: o.hgap + o.lgap,

6
src/core/wrapper/layout/middle/middle.horizontal.js

@ -30,7 +30,7 @@ BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
}, },
stroke: function (items) { stroke: function (items) {
var o = this.options; var self = this, o = this.options;
var list = []; var list = [];
BI.each(items, function (i) { BI.each(items, function (i) {
list.push({ list.push({
@ -39,12 +39,12 @@ BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
el: BI.createWidget({ el: BI.createWidget({
type: "bi.default", type: "bi.default",
cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "") cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")
}, this) }, self)
}); });
}); });
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (item) { if (item) {
var w = BI.createWidget(item, this); var w = BI.createWidget(item, self);
w.element.css({ w.element.css({
position: "absolute", position: "absolute",
left: o.hgap + o.lgap, left: o.hgap + o.lgap,

4
src/core/wrapper/layout/middle/middle.vertical.js

@ -39,12 +39,12 @@ BI.VerticalCenterLayout = BI.inherit(BI.Layout, {
el: BI.createWidget({ el: BI.createWidget({
type: "bi.default", type: "bi.default",
cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "") cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")
}, this) }, self)
}); });
}); });
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if (item) { if (item) {
var w = BI.createWidget(item, this); var w = BI.createWidget(item, self);
w.element.css({ w.element.css({
position: "absolute", position: "absolute",
left: o.hgap + o.lgap, left: o.hgap + o.lgap,

Loading…
Cancel
Save