guy 6 years ago
parent
commit
4cd20863e2
  1. 8
      dist/base.js
  2. 90
      dist/bundle.js
  3. 63
      dist/bundle.min.js
  4. 82
      dist/core.js
  5. 90
      dist/fineui.js
  6. 74
      dist/fineui.min.js
  7. 8
      src/base/layer/layer.popup.js
  8. 2
      src/core/wrapper/layout.js
  9. 4
      src/core/wrapper/layout/adapt/adapt.center.js
  10. 4
      src/core/wrapper/layout/adapt/adapt.horizontal.js
  11. 8
      src/core/wrapper/layout/adapt/adapt.leftrightvertical.js
  12. 4
      src/core/wrapper/layout/adapt/adapt.vertical.js
  13. 2
      src/core/wrapper/layout/adapt/float.center.js
  14. 2
      src/core/wrapper/layout/adapt/float.horizontal.js
  15. 10
      src/core/wrapper/layout/layout.border.js
  16. 4
      src/core/wrapper/layout/layout.card.js
  17. 2
      src/core/wrapper/layout/layout.division.js
  18. 6
      src/core/wrapper/layout/layout.grid.js
  19. 4
      src/core/wrapper/layout/layout.horizontal.js
  20. 2
      src/core/wrapper/layout/layout.table.js
  21. 4
      src/core/wrapper/layout/layout.tape.js
  22. 6
      src/core/wrapper/layout/layout.td.js
  23. 2
      src/core/wrapper/layout/layout.window.js
  24. 4
      src/core/wrapper/layout/middle/middle.center.js
  25. 4
      src/core/wrapper/layout/middle/middle.float.center.js
  26. 4
      src/core/wrapper/layout/middle/middle.horizontal.js
  27. 4
      src/core/wrapper/layout/middle/middle.vertical.js

8
dist/base.js vendored

@ -15465,7 +15465,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
_createView: function () {
var o = this.options;
this.button_group = BI.createWidget(o.el, {type: "bi.button_group", value: o.value}, this);
this.button_group = BI.createWidget(o.el, {type: "bi.button_group", value: o.value});
this.button_group.element.css({"min-height": o.minHeight + "px"});
return this.button_group;
},
@ -15475,7 +15475,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
if (false === o.tool) {
return;
}
return BI.createWidget(o.tool, this);
return BI.createWidget(o.tool);
},
_createTab: function () {
@ -15489,7 +15489,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
height: 25,
items: o.tabs,
value: o.value
}, this);
});
},
_createToolBar: function () {
@ -15507,7 +15507,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
shadow: true,
isShadowShowingOnSelected: true
})
}, this);
});
},
getView: function () {

90
dist/bundle.js vendored

@ -16647,7 +16647,7 @@ BI.Layout = BI.inherit(BI.Widget, {
_addElement: function (i, item) {
var self = this, w;
if (!this.hasWidget(this._getChildName(i))) {
w = BI.createWidget(item, this);
w = BI.createWidget(item);
w.on(BI.Events.DESTROY, function () {
BI.each(self._children, function (name, child) {
if (child === w) {
@ -22599,7 +22599,7 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
var td;
var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
if (!this.hasWidget(this._getChildName(i))) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
td = BI.createWidget({
type: "bi.default",
@ -22608,7 +22608,7 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
width: width
},
items: [w]
}, this);
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
@ -22717,7 +22717,7 @@ BI.HorizontalAdaptLayout = BI.inherit(BI.Layout, {
var td;
var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
if (!this.hasWidget(this._getChildName(i))) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
td = BI.createWidget({
type: "bi.default",
@ -22726,7 +22726,7 @@ BI.HorizontalAdaptLayout = BI.inherit(BI.Layout, {
width: width
},
items: [w]
}, this);
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
@ -22840,7 +22840,7 @@ BI.LeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
hgap: o.lhgap,
lgap: o.llgap,
rgap: o.lrgap
}, this);
});
left.element.css("height", "100%");
BI.createWidget({
type: "bi.left",
@ -22855,7 +22855,7 @@ BI.LeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
hgap: o.rhgap,
lgap: o.rlgap,
rgap: o.rrgap
}, this);
});
right.element.css("height", "100%");
BI.createWidget({
type: "bi.right",
@ -22905,7 +22905,7 @@ BI.LeftVerticalAdaptLayout = BI.inherit(BI.Layout, {
lgap: o.lgap,
hgap: o.hgap,
rgap: o.rgap
}, this);
});
left.element.css("height", "100%");
BI.createWidget({
type: "bi.left",
@ -22953,7 +22953,7 @@ BI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {
lgap: o.lgap,
hgap: o.hgap,
rgap: o.rgap
}, this);
});
right.element.css("height", "100%");
BI.createWidget({
type: "bi.right",
@ -23006,7 +23006,7 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
var td;
var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
if (!this.hasWidget(this._getChildName(i))) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
td = BI.createWidget({
type: "bi.default",
@ -23015,7 +23015,7 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
width: width
},
items: [w]
}, this);
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
@ -23205,7 +23205,7 @@ BI.FloatCenterAdaptLayout = BI.inherit(BI.Layout, {
bgap: o.bgap,
lgap: o.lgap,
rgap: o.rgap
}, this);
});
this.container = BI.createWidget({
type: "bi.left",
@ -23273,7 +23273,7 @@ BI.FloatHorizontalLayout = BI.inherit(BI.Layout, {
bgap: o.bgap,
lgap: o.lgap,
rgap: o.rgap
}, this);
});
this.container = BI.createWidget({
type: "bi.left",
@ -23912,7 +23912,7 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
if (item != null) {
if (item.el) {
if (!this.hasWidget(this.getName() + "north")) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
this.addWidget(this.getName() + "north", w);
}
this.getWidgetByName(this.getName() + "north").element.height(item.height)
@ -23932,7 +23932,7 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
if (item != null) {
if (item.el) {
if (!this.hasWidget(this.getName() + "south")) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
this.addWidget(this.getName() + "south", w);
}
this.getWidgetByName(this.getName() + "south").element.height(item.height)
@ -23952,7 +23952,7 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
if (item != null) {
if (item.el) {
if (!this.hasWidget(this.getName() + "west")) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
this.addWidget(this.getName() + "west", w);
}
this.getWidgetByName(this.getName() + "west").element.width(item.width)
@ -23972,7 +23972,7 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
if (item != null) {
if (item.el) {
if (!this.hasWidget(this.getName() + "east")) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
this.addWidget(this.getName() + "east", w);
}
this.getWidgetByName(this.getName() + "east").element.width(item.width)
@ -23991,7 +23991,7 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
item = regions["center"];
if (item != null) {
if (!this.hasWidget(this.getName() + "center")) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
this.addWidget(this.getName() + "center", w);
}
this.getWidgetByName(this.getName() + "center").element
@ -24035,7 +24035,7 @@ BI.CardLayout = BI.inherit(BI.Layout, {
BI.each(items, function (i, item) {
if (item) {
if (!self.hasWidget(item.cardName)) {
var w = BI.createWidget(item, self);
var w = BI.createWidget(item);
w.on(BI.Events.DESTROY, function () {
var index = BI.findIndex(o.items, function (i, tItem) {
return tItem.cardName == item.cardName;
@ -24105,7 +24105,7 @@ BI.CardLayout = BI.inherit(BI.Layout, {
if (this.isCardExisted(cardName)) {
throw new Error("cardName is already exist");
}
var widget = BI.createWidget(cardItem, this);
var widget = BI.createWidget(cardItem);
widget.element.css({
position: "relative",
top: "0",
@ -24386,7 +24386,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
throw new Error("item be required");
}
if(!this.hasWidget(this.getName() + i + "_" + j)) {
var w = BI.createWidget(map[i][j], this);
var w = BI.createWidget(map[i][j]);
this.addWidget(this.getName() + i + "_" + j, w);
} else {
w = this.getWidgetByName(this.getName() + i + "_" + j);
@ -24671,18 +24671,18 @@ BI.GridLayout = BI.inherit(BI.Layout, {
BI.each(items, function (i, item) {
if (BI.isArray(item)) {
BI.each(item, function (j, el) {
els[i][j] = BI.createWidget(el, self);
els[i][j] = BI.createWidget(el);
});
return;
}
els[item.row][item.column] = BI.createWidget(item, self);
els[item.row][item.column] = BI.createWidget(item);
});
for (var i = 0; i < rows; i++) {
for (var j = 0; j < columns; j++) {
if (!els[i][j]) {
els[i][j] = BI.createWidget({
type: "bi.layout"
}, this);
});
}
first(els[i][j], i, j);
els[i][j].element.css({
@ -24741,7 +24741,7 @@ BI.HorizontalLayout = BI.inherit(BI.Layout, {
var td;
var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
if (!this.hasWidget(this._getChildName(i))) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
w.element.css({position: "relative", margin: "0px auto"});
td = BI.createWidget({
type: "bi.default",
@ -24750,7 +24750,7 @@ BI.HorizontalLayout = BI.inherit(BI.Layout, {
width: width
},
items: [w]
}, this);
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
@ -25053,7 +25053,7 @@ BI.TableLayout = BI.inherit(BI.Layout, {
type: "bi.absolute",
height: BI.isArray(o.rowSize) ? o.rowSize[this.rows] : o.rowSize,
items: abs
}, this);
});
if (this.rows > 0) {
this.getWidgetByName(this.getName() + (this.rows - 1)).element.css({
"margin-bottom": o.vgap
@ -25131,7 +25131,7 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
items = BI.compact(items);
BI.each(items, function (i, item) {
if (!self.hasWidget(self.getName() + i + "")) {
var w = BI.createWidget(item, self);
var w = BI.createWidget(item);
self.addWidget(self.getName() + i + "", w);
} else {
w = self.getWidgetByName(self.getName() + i + "");
@ -25236,7 +25236,7 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
items = BI.compact(items);
BI.each(items, function (i, item) {
if (!self.hasWidget(self.getName() + i + "")) {
var w = BI.createWidget(item, self);
var w = BI.createWidget(item);
self.addWidget(self.getName() + i + "", w);
} else {
w = self.getWidgetByName(self.getName() + i + "");
@ -25371,10 +25371,10 @@ BI.TdLayout = BI.inherit(BI.Layout, {
var tr = BI.createWidget({
type: "bi.default",
tagName: "tr"
}, this);
});
for (var i = 0; i < arr.length; i++) {
var w = BI.createWidget(arr[i], this);
var w = BI.createWidget(arr[i]);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
if (arr[i].lgap) {
w.element.css({"margin-left": arr[i].lgap + "px"});
@ -25396,7 +25396,7 @@ BI.TdLayout = BI.inherit(BI.Layout, {
},
tagName: "td",
items: [w]
}, this);
});
td.element.css({
position: "relative",
"vertical-align": "middle",
@ -25600,7 +25600,7 @@ BI.WindowLayout = BI.inherit(BI.Layout, {
throw new Error("item be required");
}
if (!this.hasWidget(this.getName() + i + "_" + j)) {
var w = BI.createWidget(o.items[i][j], this);
var w = BI.createWidget(o.items[i][j]);
w.element.css({position: "absolute"});
this.addWidget(this.getName() + i + "_" + j, w);
}
@ -25732,12 +25732,12 @@ BI.CenterLayout = BI.inherit(BI.Layout, {
el: BI.createWidget({
type: "bi.default",
cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")
}, self)
})
});
});
BI.each(items, function (i, item) {
if (item) {
var w = BI.createWidget(item, self);
var w = BI.createWidget(item);
w.element.css({
position: "absolute",
left: o.hgap + o.lgap,
@ -25801,7 +25801,7 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
BI.each(items, function (i) {
var widget = BI.createWidget({
type: "bi.default"
}, self);
});
widget.element.addClass("center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")).css({
width: width + "%",
height: "100%"
@ -25812,7 +25812,7 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
});
BI.each(items, function (i, item) {
if (item) {
var w = BI.createWidget(item, self);
var w = BI.createWidget(item);
w.element.css({
position: "absolute",
left: o.hgap + o.lgap,
@ -25878,12 +25878,12 @@ BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
el: BI.createWidget({
type: "bi.default",
cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")
}, self)
})
});
});
BI.each(items, function (i, item) {
if (item) {
var w = BI.createWidget(item, self);
var w = BI.createWidget(item);
w.element.css({
position: "absolute",
left: o.hgap + o.lgap,
@ -25950,12 +25950,12 @@ BI.VerticalCenterLayout = BI.inherit(BI.Layout, {
el: BI.createWidget({
type: "bi.default",
cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")
}, self)
})
});
});
BI.each(items, function (i, item) {
if (item) {
var w = BI.createWidget(item, self);
var w = BI.createWidget(item);
w.element.css({
position: "absolute",
left: o.hgap + o.lgap,
@ -41515,7 +41515,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
_createView: function () {
var o = this.options;
this.button_group = BI.createWidget(o.el, {type: "bi.button_group", value: o.value}, this);
this.button_group = BI.createWidget(o.el, {type: "bi.button_group", value: o.value});
this.button_group.element.css({"min-height": o.minHeight + "px"});
return this.button_group;
},
@ -41525,7 +41525,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
if (false === o.tool) {
return;
}
return BI.createWidget(o.tool, this);
return BI.createWidget(o.tool);
},
_createTab: function () {
@ -41539,7 +41539,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
height: 25,
items: o.tabs,
value: o.value
}, this);
});
},
_createToolBar: function () {
@ -41557,7 +41557,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
shadow: true,
isShadowShowingOnSelected: true
})
}, this);
});
},
getView: function () {

63
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

82
dist/core.js vendored

@ -16647,7 +16647,7 @@ BI.Layout = BI.inherit(BI.Widget, {
_addElement: function (i, item) {
var self = this, w;
if (!this.hasWidget(this._getChildName(i))) {
w = BI.createWidget(item, this);
w = BI.createWidget(item);
w.on(BI.Events.DESTROY, function () {
BI.each(self._children, function (name, child) {
if (child === w) {
@ -22599,7 +22599,7 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
var td;
var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
if (!this.hasWidget(this._getChildName(i))) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
td = BI.createWidget({
type: "bi.default",
@ -22608,7 +22608,7 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
width: width
},
items: [w]
}, this);
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
@ -22717,7 +22717,7 @@ BI.HorizontalAdaptLayout = BI.inherit(BI.Layout, {
var td;
var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
if (!this.hasWidget(this._getChildName(i))) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
td = BI.createWidget({
type: "bi.default",
@ -22726,7 +22726,7 @@ BI.HorizontalAdaptLayout = BI.inherit(BI.Layout, {
width: width
},
items: [w]
}, this);
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
@ -22840,7 +22840,7 @@ BI.LeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
hgap: o.lhgap,
lgap: o.llgap,
rgap: o.lrgap
}, this);
});
left.element.css("height", "100%");
BI.createWidget({
type: "bi.left",
@ -22855,7 +22855,7 @@ BI.LeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
hgap: o.rhgap,
lgap: o.rlgap,
rgap: o.rrgap
}, this);
});
right.element.css("height", "100%");
BI.createWidget({
type: "bi.right",
@ -22905,7 +22905,7 @@ BI.LeftVerticalAdaptLayout = BI.inherit(BI.Layout, {
lgap: o.lgap,
hgap: o.hgap,
rgap: o.rgap
}, this);
});
left.element.css("height", "100%");
BI.createWidget({
type: "bi.left",
@ -22953,7 +22953,7 @@ BI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {
lgap: o.lgap,
hgap: o.hgap,
rgap: o.rgap
}, this);
});
right.element.css("height", "100%");
BI.createWidget({
type: "bi.right",
@ -23006,7 +23006,7 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
var td;
var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
if (!this.hasWidget(this._getChildName(i))) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
td = BI.createWidget({
type: "bi.default",
@ -23015,7 +23015,7 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
width: width
},
items: [w]
}, this);
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
@ -23205,7 +23205,7 @@ BI.FloatCenterAdaptLayout = BI.inherit(BI.Layout, {
bgap: o.bgap,
lgap: o.lgap,
rgap: o.rgap
}, this);
});
this.container = BI.createWidget({
type: "bi.left",
@ -23273,7 +23273,7 @@ BI.FloatHorizontalLayout = BI.inherit(BI.Layout, {
bgap: o.bgap,
lgap: o.lgap,
rgap: o.rgap
}, this);
});
this.container = BI.createWidget({
type: "bi.left",
@ -23912,7 +23912,7 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
if (item != null) {
if (item.el) {
if (!this.hasWidget(this.getName() + "north")) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
this.addWidget(this.getName() + "north", w);
}
this.getWidgetByName(this.getName() + "north").element.height(item.height)
@ -23932,7 +23932,7 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
if (item != null) {
if (item.el) {
if (!this.hasWidget(this.getName() + "south")) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
this.addWidget(this.getName() + "south", w);
}
this.getWidgetByName(this.getName() + "south").element.height(item.height)
@ -23952,7 +23952,7 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
if (item != null) {
if (item.el) {
if (!this.hasWidget(this.getName() + "west")) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
this.addWidget(this.getName() + "west", w);
}
this.getWidgetByName(this.getName() + "west").element.width(item.width)
@ -23972,7 +23972,7 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
if (item != null) {
if (item.el) {
if (!this.hasWidget(this.getName() + "east")) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
this.addWidget(this.getName() + "east", w);
}
this.getWidgetByName(this.getName() + "east").element.width(item.width)
@ -23991,7 +23991,7 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
item = regions["center"];
if (item != null) {
if (!this.hasWidget(this.getName() + "center")) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
this.addWidget(this.getName() + "center", w);
}
this.getWidgetByName(this.getName() + "center").element
@ -24035,7 +24035,7 @@ BI.CardLayout = BI.inherit(BI.Layout, {
BI.each(items, function (i, item) {
if (item) {
if (!self.hasWidget(item.cardName)) {
var w = BI.createWidget(item, self);
var w = BI.createWidget(item);
w.on(BI.Events.DESTROY, function () {
var index = BI.findIndex(o.items, function (i, tItem) {
return tItem.cardName == item.cardName;
@ -24105,7 +24105,7 @@ BI.CardLayout = BI.inherit(BI.Layout, {
if (this.isCardExisted(cardName)) {
throw new Error("cardName is already exist");
}
var widget = BI.createWidget(cardItem, this);
var widget = BI.createWidget(cardItem);
widget.element.css({
position: "relative",
top: "0",
@ -24386,7 +24386,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
throw new Error("item be required");
}
if(!this.hasWidget(this.getName() + i + "_" + j)) {
var w = BI.createWidget(map[i][j], this);
var w = BI.createWidget(map[i][j]);
this.addWidget(this.getName() + i + "_" + j, w);
} else {
w = this.getWidgetByName(this.getName() + i + "_" + j);
@ -24671,18 +24671,18 @@ BI.GridLayout = BI.inherit(BI.Layout, {
BI.each(items, function (i, item) {
if (BI.isArray(item)) {
BI.each(item, function (j, el) {
els[i][j] = BI.createWidget(el, self);
els[i][j] = BI.createWidget(el);
});
return;
}
els[item.row][item.column] = BI.createWidget(item, self);
els[item.row][item.column] = BI.createWidget(item);
});
for (var i = 0; i < rows; i++) {
for (var j = 0; j < columns; j++) {
if (!els[i][j]) {
els[i][j] = BI.createWidget({
type: "bi.layout"
}, this);
});
}
first(els[i][j], i, j);
els[i][j].element.css({
@ -24741,7 +24741,7 @@ BI.HorizontalLayout = BI.inherit(BI.Layout, {
var td;
var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
if (!this.hasWidget(this._getChildName(i))) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
w.element.css({position: "relative", margin: "0px auto"});
td = BI.createWidget({
type: "bi.default",
@ -24750,7 +24750,7 @@ BI.HorizontalLayout = BI.inherit(BI.Layout, {
width: width
},
items: [w]
}, this);
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
@ -25053,7 +25053,7 @@ BI.TableLayout = BI.inherit(BI.Layout, {
type: "bi.absolute",
height: BI.isArray(o.rowSize) ? o.rowSize[this.rows] : o.rowSize,
items: abs
}, this);
});
if (this.rows > 0) {
this.getWidgetByName(this.getName() + (this.rows - 1)).element.css({
"margin-bottom": o.vgap
@ -25131,7 +25131,7 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
items = BI.compact(items);
BI.each(items, function (i, item) {
if (!self.hasWidget(self.getName() + i + "")) {
var w = BI.createWidget(item, self);
var w = BI.createWidget(item);
self.addWidget(self.getName() + i + "", w);
} else {
w = self.getWidgetByName(self.getName() + i + "");
@ -25236,7 +25236,7 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
items = BI.compact(items);
BI.each(items, function (i, item) {
if (!self.hasWidget(self.getName() + i + "")) {
var w = BI.createWidget(item, self);
var w = BI.createWidget(item);
self.addWidget(self.getName() + i + "", w);
} else {
w = self.getWidgetByName(self.getName() + i + "");
@ -25371,10 +25371,10 @@ BI.TdLayout = BI.inherit(BI.Layout, {
var tr = BI.createWidget({
type: "bi.default",
tagName: "tr"
}, this);
});
for (var i = 0; i < arr.length; i++) {
var w = BI.createWidget(arr[i], this);
var w = BI.createWidget(arr[i]);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
if (arr[i].lgap) {
w.element.css({"margin-left": arr[i].lgap + "px"});
@ -25396,7 +25396,7 @@ BI.TdLayout = BI.inherit(BI.Layout, {
},
tagName: "td",
items: [w]
}, this);
});
td.element.css({
position: "relative",
"vertical-align": "middle",
@ -25600,7 +25600,7 @@ BI.WindowLayout = BI.inherit(BI.Layout, {
throw new Error("item be required");
}
if (!this.hasWidget(this.getName() + i + "_" + j)) {
var w = BI.createWidget(o.items[i][j], this);
var w = BI.createWidget(o.items[i][j]);
w.element.css({position: "absolute"});
this.addWidget(this.getName() + i + "_" + j, w);
}
@ -25732,12 +25732,12 @@ BI.CenterLayout = BI.inherit(BI.Layout, {
el: BI.createWidget({
type: "bi.default",
cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")
}, self)
})
});
});
BI.each(items, function (i, item) {
if (item) {
var w = BI.createWidget(item, self);
var w = BI.createWidget(item);
w.element.css({
position: "absolute",
left: o.hgap + o.lgap,
@ -25801,7 +25801,7 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
BI.each(items, function (i) {
var widget = BI.createWidget({
type: "bi.default"
}, self);
});
widget.element.addClass("center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")).css({
width: width + "%",
height: "100%"
@ -25812,7 +25812,7 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
});
BI.each(items, function (i, item) {
if (item) {
var w = BI.createWidget(item, self);
var w = BI.createWidget(item);
w.element.css({
position: "absolute",
left: o.hgap + o.lgap,
@ -25878,12 +25878,12 @@ BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
el: BI.createWidget({
type: "bi.default",
cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")
}, self)
})
});
});
BI.each(items, function (i, item) {
if (item) {
var w = BI.createWidget(item, self);
var w = BI.createWidget(item);
w.element.css({
position: "absolute",
left: o.hgap + o.lgap,
@ -25950,12 +25950,12 @@ BI.VerticalCenterLayout = BI.inherit(BI.Layout, {
el: BI.createWidget({
type: "bi.default",
cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")
}, self)
})
});
});
BI.each(items, function (i, item) {
if (item) {
var w = BI.createWidget(item, self);
var w = BI.createWidget(item);
w.element.css({
position: "absolute",
left: o.hgap + o.lgap,

90
dist/fineui.js vendored

@ -16848,7 +16848,7 @@ BI.Layout = BI.inherit(BI.Widget, {
_addElement: function (i, item) {
var self = this, w;
if (!this.hasWidget(this._getChildName(i))) {
w = BI.createWidget(item, this);
w = BI.createWidget(item);
w.on(BI.Events.DESTROY, function () {
BI.each(self._children, function (name, child) {
if (child === w) {
@ -22800,7 +22800,7 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
var td;
var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
if (!this.hasWidget(this._getChildName(i))) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
td = BI.createWidget({
type: "bi.default",
@ -22809,7 +22809,7 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
width: width
},
items: [w]
}, this);
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
@ -22918,7 +22918,7 @@ BI.HorizontalAdaptLayout = BI.inherit(BI.Layout, {
var td;
var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
if (!this.hasWidget(this._getChildName(i))) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
td = BI.createWidget({
type: "bi.default",
@ -22927,7 +22927,7 @@ BI.HorizontalAdaptLayout = BI.inherit(BI.Layout, {
width: width
},
items: [w]
}, this);
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
@ -23041,7 +23041,7 @@ BI.LeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
hgap: o.lhgap,
lgap: o.llgap,
rgap: o.lrgap
}, this);
});
left.element.css("height", "100%");
BI.createWidget({
type: "bi.left",
@ -23056,7 +23056,7 @@ BI.LeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
hgap: o.rhgap,
lgap: o.rlgap,
rgap: o.rrgap
}, this);
});
right.element.css("height", "100%");
BI.createWidget({
type: "bi.right",
@ -23106,7 +23106,7 @@ BI.LeftVerticalAdaptLayout = BI.inherit(BI.Layout, {
lgap: o.lgap,
hgap: o.hgap,
rgap: o.rgap
}, this);
});
left.element.css("height", "100%");
BI.createWidget({
type: "bi.left",
@ -23154,7 +23154,7 @@ BI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {
lgap: o.lgap,
hgap: o.hgap,
rgap: o.rgap
}, this);
});
right.element.css("height", "100%");
BI.createWidget({
type: "bi.right",
@ -23207,7 +23207,7 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
var td;
var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
if (!this.hasWidget(this._getChildName(i))) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
td = BI.createWidget({
type: "bi.default",
@ -23216,7 +23216,7 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
width: width
},
items: [w]
}, this);
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
@ -23406,7 +23406,7 @@ BI.FloatCenterAdaptLayout = BI.inherit(BI.Layout, {
bgap: o.bgap,
lgap: o.lgap,
rgap: o.rgap
}, this);
});
this.container = BI.createWidget({
type: "bi.left",
@ -23474,7 +23474,7 @@ BI.FloatHorizontalLayout = BI.inherit(BI.Layout, {
bgap: o.bgap,
lgap: o.lgap,
rgap: o.rgap
}, this);
});
this.container = BI.createWidget({
type: "bi.left",
@ -24113,7 +24113,7 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
if (item != null) {
if (item.el) {
if (!this.hasWidget(this.getName() + "north")) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
this.addWidget(this.getName() + "north", w);
}
this.getWidgetByName(this.getName() + "north").element.height(item.height)
@ -24133,7 +24133,7 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
if (item != null) {
if (item.el) {
if (!this.hasWidget(this.getName() + "south")) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
this.addWidget(this.getName() + "south", w);
}
this.getWidgetByName(this.getName() + "south").element.height(item.height)
@ -24153,7 +24153,7 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
if (item != null) {
if (item.el) {
if (!this.hasWidget(this.getName() + "west")) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
this.addWidget(this.getName() + "west", w);
}
this.getWidgetByName(this.getName() + "west").element.width(item.width)
@ -24173,7 +24173,7 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
if (item != null) {
if (item.el) {
if (!this.hasWidget(this.getName() + "east")) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
this.addWidget(this.getName() + "east", w);
}
this.getWidgetByName(this.getName() + "east").element.width(item.width)
@ -24192,7 +24192,7 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
item = regions["center"];
if (item != null) {
if (!this.hasWidget(this.getName() + "center")) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
this.addWidget(this.getName() + "center", w);
}
this.getWidgetByName(this.getName() + "center").element
@ -24236,7 +24236,7 @@ BI.CardLayout = BI.inherit(BI.Layout, {
BI.each(items, function (i, item) {
if (item) {
if (!self.hasWidget(item.cardName)) {
var w = BI.createWidget(item, self);
var w = BI.createWidget(item);
w.on(BI.Events.DESTROY, function () {
var index = BI.findIndex(o.items, function (i, tItem) {
return tItem.cardName == item.cardName;
@ -24306,7 +24306,7 @@ BI.CardLayout = BI.inherit(BI.Layout, {
if (this.isCardExisted(cardName)) {
throw new Error("cardName is already exist");
}
var widget = BI.createWidget(cardItem, this);
var widget = BI.createWidget(cardItem);
widget.element.css({
position: "relative",
top: "0",
@ -24587,7 +24587,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
throw new Error("item be required");
}
if(!this.hasWidget(this.getName() + i + "_" + j)) {
var w = BI.createWidget(map[i][j], this);
var w = BI.createWidget(map[i][j]);
this.addWidget(this.getName() + i + "_" + j, w);
} else {
w = this.getWidgetByName(this.getName() + i + "_" + j);
@ -24872,18 +24872,18 @@ BI.GridLayout = BI.inherit(BI.Layout, {
BI.each(items, function (i, item) {
if (BI.isArray(item)) {
BI.each(item, function (j, el) {
els[i][j] = BI.createWidget(el, self);
els[i][j] = BI.createWidget(el);
});
return;
}
els[item.row][item.column] = BI.createWidget(item, self);
els[item.row][item.column] = BI.createWidget(item);
});
for (var i = 0; i < rows; i++) {
for (var j = 0; j < columns; j++) {
if (!els[i][j]) {
els[i][j] = BI.createWidget({
type: "bi.layout"
}, this);
});
}
first(els[i][j], i, j);
els[i][j].element.css({
@ -24942,7 +24942,7 @@ BI.HorizontalLayout = BI.inherit(BI.Layout, {
var td;
var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
if (!this.hasWidget(this._getChildName(i))) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
w.element.css({position: "relative", margin: "0px auto"});
td = BI.createWidget({
type: "bi.default",
@ -24951,7 +24951,7 @@ BI.HorizontalLayout = BI.inherit(BI.Layout, {
width: width
},
items: [w]
}, this);
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
@ -25254,7 +25254,7 @@ BI.TableLayout = BI.inherit(BI.Layout, {
type: "bi.absolute",
height: BI.isArray(o.rowSize) ? o.rowSize[this.rows] : o.rowSize,
items: abs
}, this);
});
if (this.rows > 0) {
this.getWidgetByName(this.getName() + (this.rows - 1)).element.css({
"margin-bottom": o.vgap
@ -25332,7 +25332,7 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
items = BI.compact(items);
BI.each(items, function (i, item) {
if (!self.hasWidget(self.getName() + i + "")) {
var w = BI.createWidget(item, self);
var w = BI.createWidget(item);
self.addWidget(self.getName() + i + "", w);
} else {
w = self.getWidgetByName(self.getName() + i + "");
@ -25437,7 +25437,7 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
items = BI.compact(items);
BI.each(items, function (i, item) {
if (!self.hasWidget(self.getName() + i + "")) {
var w = BI.createWidget(item, self);
var w = BI.createWidget(item);
self.addWidget(self.getName() + i + "", w);
} else {
w = self.getWidgetByName(self.getName() + i + "");
@ -25572,10 +25572,10 @@ BI.TdLayout = BI.inherit(BI.Layout, {
var tr = BI.createWidget({
type: "bi.default",
tagName: "tr"
}, this);
});
for (var i = 0; i < arr.length; i++) {
var w = BI.createWidget(arr[i], this);
var w = BI.createWidget(arr[i]);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
if (arr[i].lgap) {
w.element.css({"margin-left": arr[i].lgap + "px"});
@ -25597,7 +25597,7 @@ BI.TdLayout = BI.inherit(BI.Layout, {
},
tagName: "td",
items: [w]
}, this);
});
td.element.css({
position: "relative",
"vertical-align": "middle",
@ -25801,7 +25801,7 @@ BI.WindowLayout = BI.inherit(BI.Layout, {
throw new Error("item be required");
}
if (!this.hasWidget(this.getName() + i + "_" + j)) {
var w = BI.createWidget(o.items[i][j], this);
var w = BI.createWidget(o.items[i][j]);
w.element.css({position: "absolute"});
this.addWidget(this.getName() + i + "_" + j, w);
}
@ -25933,12 +25933,12 @@ BI.CenterLayout = BI.inherit(BI.Layout, {
el: BI.createWidget({
type: "bi.default",
cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")
}, self)
})
});
});
BI.each(items, function (i, item) {
if (item) {
var w = BI.createWidget(item, self);
var w = BI.createWidget(item);
w.element.css({
position: "absolute",
left: o.hgap + o.lgap,
@ -26002,7 +26002,7 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
BI.each(items, function (i) {
var widget = BI.createWidget({
type: "bi.default"
}, self);
});
widget.element.addClass("center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")).css({
width: width + "%",
height: "100%"
@ -26013,7 +26013,7 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
});
BI.each(items, function (i, item) {
if (item) {
var w = BI.createWidget(item, self);
var w = BI.createWidget(item);
w.element.css({
position: "absolute",
left: o.hgap + o.lgap,
@ -26079,12 +26079,12 @@ BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
el: BI.createWidget({
type: "bi.default",
cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")
}, self)
})
});
});
BI.each(items, function (i, item) {
if (item) {
var w = BI.createWidget(item, self);
var w = BI.createWidget(item);
w.element.css({
position: "absolute",
left: o.hgap + o.lgap,
@ -26151,12 +26151,12 @@ BI.VerticalCenterLayout = BI.inherit(BI.Layout, {
el: BI.createWidget({
type: "bi.default",
cls: "center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")
}, self)
})
});
});
BI.each(items, function (i, item) {
if (item) {
var w = BI.createWidget(item, self);
var w = BI.createWidget(item);
w.element.css({
position: "absolute",
left: o.hgap + o.lgap,
@ -43279,7 +43279,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
_createView: function () {
var o = this.options;
this.button_group = BI.createWidget(o.el, {type: "bi.button_group", value: o.value}, this);
this.button_group = BI.createWidget(o.el, {type: "bi.button_group", value: o.value});
this.button_group.element.css({"min-height": o.minHeight + "px"});
return this.button_group;
},
@ -43289,7 +43289,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
if (false === o.tool) {
return;
}
return BI.createWidget(o.tool, this);
return BI.createWidget(o.tool);
},
_createTab: function () {
@ -43303,7 +43303,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
height: 25,
items: o.tabs,
value: o.value
}, this);
});
},
_createToolBar: function () {
@ -43321,7 +43321,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
shadow: true,
isShadowShowingOnSelected: true
})
}, this);
});
},
getView: function () {

74
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

8
src/base/layer/layer.popup.js

@ -93,7 +93,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
_createView: function () {
var o = this.options;
this.button_group = BI.createWidget(o.el, {type: "bi.button_group", value: o.value}, this);
this.button_group = BI.createWidget(o.el, {type: "bi.button_group", value: o.value});
this.button_group.element.css({"min-height": o.minHeight + "px"});
return this.button_group;
},
@ -103,7 +103,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
if (false === o.tool) {
return;
}
return BI.createWidget(o.tool, this);
return BI.createWidget(o.tool);
},
_createTab: function () {
@ -117,7 +117,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
height: 25,
items: o.tabs,
value: o.value
}, this);
});
},
_createToolBar: function () {
@ -135,7 +135,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
shadow: true,
isShadowShowingOnSelected: true
})
}, this);
});
},
getView: function () {

2
src/core/wrapper/layout.js

@ -85,7 +85,7 @@ BI.Layout = BI.inherit(BI.Widget, {
_addElement: function (i, item) {
var self = this, w;
if (!this.hasWidget(this._getChildName(i))) {
w = BI.createWidget(item, this);
w = BI.createWidget(item);
w.on(BI.Events.DESTROY, function () {
BI.each(self._children, function (name, child) {
if (child === w) {

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

@ -37,7 +37,7 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
var td;
var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
if (!this.hasWidget(this._getChildName(i))) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
td = BI.createWidget({
type: "bi.default",
@ -46,7 +46,7 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
width: width
},
items: [w]
}, this);
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));

4
src/core/wrapper/layout/adapt/adapt.horizontal.js

@ -37,7 +37,7 @@ BI.HorizontalAdaptLayout = BI.inherit(BI.Layout, {
var td;
var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
if (!this.hasWidget(this._getChildName(i))) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
td = BI.createWidget({
type: "bi.default",
@ -46,7 +46,7 @@ BI.HorizontalAdaptLayout = BI.inherit(BI.Layout, {
width: width
},
items: [w]
}, this);
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));

8
src/core/wrapper/layout/adapt/adapt.leftrightvertical.js

@ -43,7 +43,7 @@ BI.LeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
hgap: o.lhgap,
lgap: o.llgap,
rgap: o.lrgap
}, this);
});
left.element.css("height", "100%");
BI.createWidget({
type: "bi.left",
@ -58,7 +58,7 @@ BI.LeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
hgap: o.rhgap,
lgap: o.rlgap,
rgap: o.rrgap
}, this);
});
right.element.css("height", "100%");
BI.createWidget({
type: "bi.right",
@ -108,7 +108,7 @@ BI.LeftVerticalAdaptLayout = BI.inherit(BI.Layout, {
lgap: o.lgap,
hgap: o.hgap,
rgap: o.rgap
}, this);
});
left.element.css("height", "100%");
BI.createWidget({
type: "bi.left",
@ -156,7 +156,7 @@ BI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {
lgap: o.lgap,
hgap: o.hgap,
rgap: o.rgap
}, this);
});
right.element.css("height", "100%");
BI.createWidget({
type: "bi.right",

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

@ -37,7 +37,7 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
var td;
var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
if (!this.hasWidget(this._getChildName(i))) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
td = BI.createWidget({
type: "bi.default",
@ -46,7 +46,7 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
width: width
},
items: [w]
}, this);
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));

2
src/core/wrapper/layout/adapt/float.center.js

@ -56,7 +56,7 @@ BI.FloatCenterAdaptLayout = BI.inherit(BI.Layout, {
bgap: o.bgap,
lgap: o.lgap,
rgap: o.rgap
}, this);
});
this.container = BI.createWidget({
type: "bi.left",

2
src/core/wrapper/layout/adapt/float.horizontal.js

@ -51,7 +51,7 @@ BI.FloatHorizontalLayout = BI.inherit(BI.Layout, {
bgap: o.bgap,
lgap: o.lgap,
rgap: o.rgap
}, this);
});
this.container = BI.createWidget({
type: "bi.left",

10
src/core/wrapper/layout/layout.border.js

@ -36,7 +36,7 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
if (item != null) {
if (item.el) {
if (!this.hasWidget(this.getName() + "north")) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
this.addWidget(this.getName() + "north", w);
}
this.getWidgetByName(this.getName() + "north").element.height(item.height)
@ -56,7 +56,7 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
if (item != null) {
if (item.el) {
if (!this.hasWidget(this.getName() + "south")) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
this.addWidget(this.getName() + "south", w);
}
this.getWidgetByName(this.getName() + "south").element.height(item.height)
@ -76,7 +76,7 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
if (item != null) {
if (item.el) {
if (!this.hasWidget(this.getName() + "west")) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
this.addWidget(this.getName() + "west", w);
}
this.getWidgetByName(this.getName() + "west").element.width(item.width)
@ -96,7 +96,7 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
if (item != null) {
if (item.el) {
if (!this.hasWidget(this.getName() + "east")) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
this.addWidget(this.getName() + "east", w);
}
this.getWidgetByName(this.getName() + "east").element.width(item.width)
@ -115,7 +115,7 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
item = regions["center"];
if (item != null) {
if (!this.hasWidget(this.getName() + "center")) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
this.addWidget(this.getName() + "center", w);
}
this.getWidgetByName(this.getName() + "center").element

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

@ -28,7 +28,7 @@ BI.CardLayout = BI.inherit(BI.Layout, {
BI.each(items, function (i, item) {
if (item) {
if (!self.hasWidget(item.cardName)) {
var w = BI.createWidget(item, self);
var w = BI.createWidget(item);
w.on(BI.Events.DESTROY, function () {
var index = BI.findIndex(o.items, function (i, tItem) {
return tItem.cardName == item.cardName;
@ -98,7 +98,7 @@ BI.CardLayout = BI.inherit(BI.Layout, {
if (this.isCardExisted(cardName)) {
throw new Error("cardName is already exist");
}
var widget = BI.createWidget(cardItem, this);
var widget = BI.createWidget(cardItem);
widget.element.css({
position: "relative",
top: "0",

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

@ -113,7 +113,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
throw new Error("item be required");
}
if(!this.hasWidget(this.getName() + i + "_" + j)) {
var w = BI.createWidget(map[i][j], this);
var w = BI.createWidget(map[i][j]);
this.addWidget(this.getName() + i + "_" + j, w);
} else {
w = this.getWidgetByName(this.getName() + i + "_" + j);

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

@ -92,18 +92,18 @@ BI.GridLayout = BI.inherit(BI.Layout, {
BI.each(items, function (i, item) {
if (BI.isArray(item)) {
BI.each(item, function (j, el) {
els[i][j] = BI.createWidget(el, self);
els[i][j] = BI.createWidget(el);
});
return;
}
els[item.row][item.column] = BI.createWidget(item, self);
els[item.row][item.column] = BI.createWidget(item);
});
for (var i = 0; i < rows; i++) {
for (var j = 0; j < columns; j++) {
if (!els[i][j]) {
els[i][j] = BI.createWidget({
type: "bi.layout"
}, this);
});
}
first(els[i][j], i, j);
els[i][j].element.css({

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

@ -37,7 +37,7 @@ BI.HorizontalLayout = BI.inherit(BI.Layout, {
var td;
var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
if (!this.hasWidget(this._getChildName(i))) {
var w = BI.createWidget(item, this);
var w = BI.createWidget(item);
w.element.css({position: "relative", margin: "0px auto"});
td = BI.createWidget({
type: "bi.default",
@ -46,7 +46,7 @@ BI.HorizontalLayout = BI.inherit(BI.Layout, {
width: width
},
items: [w]
}, this);
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));

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

@ -114,7 +114,7 @@ BI.TableLayout = BI.inherit(BI.Layout, {
type: "bi.absolute",
height: BI.isArray(o.rowSize) ? o.rowSize[this.rows] : o.rowSize,
items: abs
}, this);
});
if (this.rows > 0) {
this.getWidgetByName(this.getName() + (this.rows - 1)).element.css({
"margin-bottom": o.vgap

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

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

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

@ -80,10 +80,10 @@ BI.TdLayout = BI.inherit(BI.Layout, {
var tr = BI.createWidget({
type: "bi.default",
tagName: "tr"
}, this);
});
for (var i = 0; i < arr.length; i++) {
var w = BI.createWidget(arr[i], this);
var w = BI.createWidget(arr[i]);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
if (arr[i].lgap) {
w.element.css({"margin-left": arr[i].lgap + "px"});
@ -105,7 +105,7 @@ BI.TdLayout = BI.inherit(BI.Layout, {
},
tagName: "td",
items: [w]
}, this);
});
td.element.css({
position: "relative",
"vertical-align": "middle",

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

@ -95,7 +95,7 @@ BI.WindowLayout = BI.inherit(BI.Layout, {
throw new Error("item be required");
}
if (!this.hasWidget(this.getName() + i + "_" + j)) {
var w = BI.createWidget(o.items[i][j], this);
var w = BI.createWidget(o.items[i][j]);
w.element.css({position: "absolute"});
this.addWidget(this.getName() + i + "_" + j, w);
}

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

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

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

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

Loading…
Cancel
Save