|
|
|
@ -24074,7 +24074,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, this); |
|
|
|
|
var w = BI.createWidget(item, self); |
|
|
|
|
w.on(BI.Events.DESTROY, function () { |
|
|
|
|
var index = BI.findIndex(o.items, function (i, tItem) { |
|
|
|
|
return tItem.cardName == item.cardName; |
|
|
|
@ -24663,7 +24663,7 @@ BI.GridLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
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 width = 100 / columns, height = 100 / rows; |
|
|
|
|
var els = []; |
|
|
|
@ -24710,11 +24710,11 @@ 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, this); |
|
|
|
|
els[i][j] = BI.createWidget(el, self); |
|
|
|
|
}); |
|
|
|
|
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 j = 0; j < columns; j++) { |
|
|
|
@ -25170,7 +25170,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, this); |
|
|
|
|
var w = BI.createWidget(item, self); |
|
|
|
|
self.addWidget(self.getName() + i + "", w); |
|
|
|
|
} else { |
|
|
|
|
w = self.getWidgetByName(self.getName() + i + ""); |
|
|
|
@ -25275,7 +25275,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, this); |
|
|
|
|
var w = BI.createWidget(item, self); |
|
|
|
|
self.addWidget(self.getName() + i + "", w); |
|
|
|
|
} else { |
|
|
|
|
w = self.getWidgetByName(self.getName() + i + ""); |
|
|
|
@ -25771,12 +25771,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" : "") |
|
|
|
|
}, this) |
|
|
|
|
}, self) |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
BI.each(items, function (i, item) { |
|
|
|
|
if (item) { |
|
|
|
|
var w = BI.createWidget(item, this); |
|
|
|
|
var w = BI.createWidget(item, self); |
|
|
|
|
w.element.css({ |
|
|
|
|
position: "absolute", |
|
|
|
|
left: o.hgap + o.lgap, |
|
|
|
@ -25840,7 +25840,7 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
BI.each(items, function (i) { |
|
|
|
|
var widget = BI.createWidget({ |
|
|
|
|
type: "bi.default" |
|
|
|
|
}, this); |
|
|
|
|
}, self); |
|
|
|
|
widget.element.addClass("center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")).css({ |
|
|
|
|
width: width + "%", |
|
|
|
|
height: "100%" |
|
|
|
@ -25851,7 +25851,7 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
}); |
|
|
|
|
BI.each(items, function (i, item) { |
|
|
|
|
if (item) { |
|
|
|
|
var w = BI.createWidget(item, this); |
|
|
|
|
var w = BI.createWidget(item, self); |
|
|
|
|
w.element.css({ |
|
|
|
|
position: "absolute", |
|
|
|
|
left: o.hgap + o.lgap, |
|
|
|
@ -25908,7 +25908,7 @@ BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
stroke: function (items) { |
|
|
|
|
var o = this.options; |
|
|
|
|
var self = this, o = this.options; |
|
|
|
|
var list = []; |
|
|
|
|
BI.each(items, function (i) { |
|
|
|
|
list.push({ |
|
|
|
@ -25917,12 +25917,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" : "") |
|
|
|
|
}, this) |
|
|
|
|
}, self) |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
BI.each(items, function (i, item) { |
|
|
|
|
if (item) { |
|
|
|
|
var w = BI.createWidget(item, this); |
|
|
|
|
var w = BI.createWidget(item, self); |
|
|
|
|
w.element.css({ |
|
|
|
|
position: "absolute", |
|
|
|
|
left: o.hgap + o.lgap, |
|
|
|
@ -25989,12 +25989,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" : "") |
|
|
|
|
}, this) |
|
|
|
|
}, self) |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
BI.each(items, function (i, item) { |
|
|
|
|
if (item) { |
|
|
|
|
var w = BI.createWidget(item, this); |
|
|
|
|
var w = BI.createWidget(item, self); |
|
|
|
|
w.element.css({ |
|
|
|
|
position: "absolute", |
|
|
|
|
left: o.hgap + o.lgap, |
|
|
|
@ -27351,11 +27351,11 @@ Data.Source = BISource = {
|
|
|
|
|
} |
|
|
|
|
this._parent = Model.target; |
|
|
|
|
var state = _.isFunction(this.state) ? this.state() : this.state; |
|
|
|
|
var computed = _.isFunction(this.computed) ? this.computed() : this.computed; |
|
|
|
|
var context = _.isFunction(this.context) ? this.context() : this.context; |
|
|
|
|
var childContext = _.isFunction(this.childContext) ? this.childContext() : this.childContext; |
|
|
|
|
var watch$$1 = _.isFunction(this.watch) ? this.watch() : this.watch; |
|
|
|
|
var actions = _.isFunction(this.actions) ? this.actions() : this.actions; |
|
|
|
|
var computed = this.computed; |
|
|
|
|
var context = this.context; |
|
|
|
|
var childContext = this.childContext; |
|
|
|
|
var watch$$1 = this.watch; |
|
|
|
|
var actions = this.actions; |
|
|
|
|
var keys = _.keys(this.$$model).concat(_.keys(state)).concat(_.keys(computed)).concat(context || []); |
|
|
|
|
defineProps(this, keys); |
|
|
|
|
childContext && defineContext(this, childContext); |
|
|
|
@ -27392,13 +27392,6 @@ Data.Source = BISource = {
|
|
|
|
|
return Model; |
|
|
|
|
}(); |
|
|
|
|
|
|
|
|
|
Model.prototype.state = {}; |
|
|
|
|
Model.prototype.computed = {}; |
|
|
|
|
Model.prototype.context = []; |
|
|
|
|
Model.prototype.childContext = []; |
|
|
|
|
Model.prototype.watch = {}; |
|
|
|
|
Model.prototype.actions = {}; |
|
|
|
|
|
|
|
|
|
function toJSON(model) { |
|
|
|
|
var result = void 0; |
|
|
|
|
if (_.isArray(model)) { |
|
|
|
@ -27560,10 +27553,14 @@ Data.Source = BISource = {
|
|
|
|
|
|
|
|
|
|
var _render = BI.Widget.prototype._render; |
|
|
|
|
BI.Widget.prototype._render = function () { |
|
|
|
|
var needPop = false; |
|
|
|
|
if (window.Fix && this._store) { |
|
|
|
|
needPop = true; |
|
|
|
|
pushTarget(this.store); |
|
|
|
|
initWatch(this, this.watch); |
|
|
|
|
} |
|
|
|
|
_render.apply(this, arguments); |
|
|
|
|
needPop && popTarget(); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
var unMount = BI.Widget.prototype.__d; |
|
|
|
|