|
|
|
@ -13110,10 +13110,15 @@ BI.Widget = BI.inherit(BI.OB, {
|
|
|
|
|
return new cls(config); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
BI.createWidget = function (item, options) { |
|
|
|
|
BI.createWidget = function (item, options, context) { |
|
|
|
|
var el, w; |
|
|
|
|
item || (item = {}); |
|
|
|
|
if (BI.isWidget(options)) { |
|
|
|
|
context = options; |
|
|
|
|
options = {}; |
|
|
|
|
} else { |
|
|
|
|
options || (options = {}); |
|
|
|
|
} |
|
|
|
|
if (BI.isEmpty(item) && BI.isEmpty(options)) { |
|
|
|
|
return BI.createWidget({ |
|
|
|
|
type: "bi.layout" |
|
|
|
@ -16801,7 +16806,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); |
|
|
|
|
w = BI.createWidget(item, this); |
|
|
|
|
w.on(BI.Events.DESTROY, function () { |
|
|
|
|
BI.each(self._children, function (name, child) { |
|
|
|
|
if (child === w) { |
|
|
|
@ -18769,7 +18774,7 @@ BI.LayerController = BI.inherit(BI.Controller, {
|
|
|
|
|
return this.create(name, null, op); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
create: function (name, from, op) { |
|
|
|
|
create: function (name, from, op, context) { |
|
|
|
|
if (this.has(name)) { |
|
|
|
|
return this.get(name); |
|
|
|
|
} |
|
|
|
@ -18788,7 +18793,7 @@ BI.LayerController = BI.inherit(BI.Controller, {
|
|
|
|
|
var widget = BI.createWidget((op.render || {}), { |
|
|
|
|
type: "bi.layout", |
|
|
|
|
cls: op.cls |
|
|
|
|
}); |
|
|
|
|
}, context); |
|
|
|
|
var layout = BI.createWidget({ |
|
|
|
|
type: "bi.absolute", |
|
|
|
|
items: [{ |
|
|
|
@ -22633,7 +22638,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); |
|
|
|
|
var w = BI.createWidget(item, this); |
|
|
|
|
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"}); |
|
|
|
|
td = BI.createWidget({ |
|
|
|
|
type: "bi.default", |
|
|
|
@ -22642,7 +22647,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)); |
|
|
|
@ -22751,7 +22756,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); |
|
|
|
|
var w = BI.createWidget(item, this); |
|
|
|
|
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"}); |
|
|
|
|
td = BI.createWidget({ |
|
|
|
|
type: "bi.default", |
|
|
|
@ -22760,7 +22765,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)); |
|
|
|
@ -22874,7 +22879,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", |
|
|
|
@ -22889,7 +22894,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", |
|
|
|
@ -22939,7 +22944,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", |
|
|
|
@ -22987,7 +22992,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", |
|
|
|
@ -23040,7 +23045,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); |
|
|
|
|
var w = BI.createWidget(item, this); |
|
|
|
|
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"}); |
|
|
|
|
td = BI.createWidget({ |
|
|
|
|
type: "bi.default", |
|
|
|
@ -23049,7 +23054,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)); |
|
|
|
@ -23239,7 +23244,7 @@ BI.FloatCenterAdaptLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
bgap: o.bgap, |
|
|
|
|
lgap: o.lgap, |
|
|
|
|
rgap: o.rgap |
|
|
|
|
}); |
|
|
|
|
}, this); |
|
|
|
|
|
|
|
|
|
this.container = BI.createWidget({ |
|
|
|
|
type: "bi.left", |
|
|
|
@ -23307,7 +23312,7 @@ BI.FloatHorizontalLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
bgap: o.bgap, |
|
|
|
|
lgap: o.lgap, |
|
|
|
|
rgap: o.rgap |
|
|
|
|
}); |
|
|
|
|
}, this); |
|
|
|
|
|
|
|
|
|
this.container = BI.createWidget({ |
|
|
|
|
type: "bi.left", |
|
|
|
@ -23946,7 +23951,7 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
if (item != null) { |
|
|
|
|
if (item.el) { |
|
|
|
|
if (!this.hasWidget(this.getName() + "north")) { |
|
|
|
|
var w = BI.createWidget(item); |
|
|
|
|
var w = BI.createWidget(item, this); |
|
|
|
|
this.addWidget(this.getName() + "north", w); |
|
|
|
|
} |
|
|
|
|
this.getWidgetByName(this.getName() + "north").element.height(item.height) |
|
|
|
@ -23966,7 +23971,7 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
if (item != null) { |
|
|
|
|
if (item.el) { |
|
|
|
|
if (!this.hasWidget(this.getName() + "south")) { |
|
|
|
|
var w = BI.createWidget(item); |
|
|
|
|
var w = BI.createWidget(item, this); |
|
|
|
|
this.addWidget(this.getName() + "south", w); |
|
|
|
|
} |
|
|
|
|
this.getWidgetByName(this.getName() + "south").element.height(item.height) |
|
|
|
@ -23986,7 +23991,7 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
if (item != null) { |
|
|
|
|
if (item.el) { |
|
|
|
|
if (!this.hasWidget(this.getName() + "west")) { |
|
|
|
|
var w = BI.createWidget(item); |
|
|
|
|
var w = BI.createWidget(item, this); |
|
|
|
|
this.addWidget(this.getName() + "west", w); |
|
|
|
|
} |
|
|
|
|
this.getWidgetByName(this.getName() + "west").element.width(item.width) |
|
|
|
@ -24006,7 +24011,7 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
if (item != null) { |
|
|
|
|
if (item.el) { |
|
|
|
|
if (!this.hasWidget(this.getName() + "east")) { |
|
|
|
|
var w = BI.createWidget(item); |
|
|
|
|
var w = BI.createWidget(item, this); |
|
|
|
|
this.addWidget(this.getName() + "east", w); |
|
|
|
|
} |
|
|
|
|
this.getWidgetByName(this.getName() + "east").element.width(item.width) |
|
|
|
@ -24025,7 +24030,7 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
item = regions["center"]; |
|
|
|
|
if (item != null) { |
|
|
|
|
if (!this.hasWidget(this.getName() + "center")) { |
|
|
|
|
var w = BI.createWidget(item); |
|
|
|
|
var w = BI.createWidget(item, this); |
|
|
|
|
this.addWidget(this.getName() + "center", w); |
|
|
|
|
} |
|
|
|
|
this.getWidgetByName(this.getName() + "center").element |
|
|
|
@ -24069,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); |
|
|
|
|
var w = BI.createWidget(item, this); |
|
|
|
|
w.on(BI.Events.DESTROY, function () { |
|
|
|
|
var index = BI.findIndex(o.items, function (i, tItem) { |
|
|
|
|
return tItem.cardName == item.cardName; |
|
|
|
@ -24139,7 +24144,7 @@ BI.CardLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
if (this.isCardExisted(cardName)) { |
|
|
|
|
throw new Error("cardName is already exist"); |
|
|
|
|
} |
|
|
|
|
var widget = BI.createWidget(cardItem); |
|
|
|
|
var widget = BI.createWidget(cardItem, this); |
|
|
|
|
widget.element.css({ |
|
|
|
|
position: "relative", |
|
|
|
|
top: "0", |
|
|
|
@ -24420,7 +24425,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]); |
|
|
|
|
var w = BI.createWidget(map[i][j], this); |
|
|
|
|
this.addWidget(this.getName() + i + "_" + j, w); |
|
|
|
|
} else { |
|
|
|
|
w = this.getWidgetByName(this.getName() + i + "_" + j); |
|
|
|
@ -24705,18 +24710,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); |
|
|
|
|
els[i][j] = BI.createWidget(el, this); |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
els[item.row][item.column] = BI.createWidget(item); |
|
|
|
|
els[item.row][item.column] = BI.createWidget(item, this); |
|
|
|
|
}); |
|
|
|
|
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({ |
|
|
|
@ -24775,7 +24780,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); |
|
|
|
|
var w = BI.createWidget(item, this); |
|
|
|
|
w.element.css({position: "relative", margin: "0px auto"}); |
|
|
|
|
td = BI.createWidget({ |
|
|
|
|
type: "bi.default", |
|
|
|
@ -24784,7 +24789,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)); |
|
|
|
@ -25087,7 +25092,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 |
|
|
|
@ -25165,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); |
|
|
|
|
var w = BI.createWidget(item, this); |
|
|
|
|
self.addWidget(self.getName() + i + "", w); |
|
|
|
|
} else { |
|
|
|
|
w = self.getWidgetByName(self.getName() + i + ""); |
|
|
|
@ -25270,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); |
|
|
|
|
var w = BI.createWidget(item, this); |
|
|
|
|
self.addWidget(self.getName() + i + "", w); |
|
|
|
|
} else { |
|
|
|
|
w = self.getWidgetByName(self.getName() + i + ""); |
|
|
|
@ -25405,10 +25410,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]); |
|
|
|
|
var w = BI.createWidget(arr[i], this); |
|
|
|
|
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"}); |
|
|
|
@ -25430,7 +25435,7 @@ BI.TdLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
}, |
|
|
|
|
tagName: "td", |
|
|
|
|
items: [w] |
|
|
|
|
}); |
|
|
|
|
}, this); |
|
|
|
|
td.element.css({ |
|
|
|
|
position: "relative", |
|
|
|
|
"vertical-align": "middle", |
|
|
|
@ -25634,7 +25639,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]); |
|
|
|
|
var w = BI.createWidget(o.items[i][j], this); |
|
|
|
|
w.element.css({position: "absolute"}); |
|
|
|
|
this.addWidget(this.getName() + i + "_" + j, w); |
|
|
|
|
} |
|
|
|
@ -25766,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) |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
BI.each(items, function (i, item) { |
|
|
|
|
if (item) { |
|
|
|
|
var w = BI.createWidget(item); |
|
|
|
|
var w = BI.createWidget(item, this); |
|
|
|
|
w.element.css({ |
|
|
|
|
position: "absolute", |
|
|
|
|
left: o.hgap + o.lgap, |
|
|
|
@ -25835,7 +25840,7 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
BI.each(items, function (i) { |
|
|
|
|
var widget = BI.createWidget({ |
|
|
|
|
type: "bi.default" |
|
|
|
|
}); |
|
|
|
|
}, this); |
|
|
|
|
widget.element.addClass("center-element " + (i === 0 ? "first-element " : "") + (i === items.length - 1 ? "last-element" : "")).css({ |
|
|
|
|
width: width + "%", |
|
|
|
|
height: "100%" |
|
|
|
@ -25846,7 +25851,7 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
}); |
|
|
|
|
BI.each(items, function (i, item) { |
|
|
|
|
if (item) { |
|
|
|
|
var w = BI.createWidget(item); |
|
|
|
|
var w = BI.createWidget(item, this); |
|
|
|
|
w.element.css({ |
|
|
|
|
position: "absolute", |
|
|
|
|
left: o.hgap + o.lgap, |
|
|
|
@ -25912,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) |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
BI.each(items, function (i, item) { |
|
|
|
|
if (item) { |
|
|
|
|
var w = BI.createWidget(item); |
|
|
|
|
var w = BI.createWidget(item, this); |
|
|
|
|
w.element.css({ |
|
|
|
|
position: "absolute", |
|
|
|
|
left: o.hgap + o.lgap, |
|
|
|
@ -25984,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) |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
BI.each(items, function (i, item) { |
|
|
|
|
if (item) { |
|
|
|
|
var w = BI.createWidget(item); |
|
|
|
|
var w = BI.createWidget(item, this); |
|
|
|
|
w.element.css({ |
|
|
|
|
position: "absolute", |
|
|
|
|
left: o.hgap + o.lgap, |
|
|
|
@ -27462,7 +27467,7 @@ Data.Source = BISource = {
|
|
|
|
|
var targetStack = []; |
|
|
|
|
|
|
|
|
|
function pushTarget (_target) { |
|
|
|
|
if (target) targetStack.push(target); |
|
|
|
|
if (_target) targetStack.push(_target); |
|
|
|
|
Fix.Model.target = target = _target; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -27470,6 +27475,18 @@ Data.Source = BISource = {
|
|
|
|
|
Fix.Model.target = target = targetStack.pop(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var context = null; |
|
|
|
|
var contextStack = []; |
|
|
|
|
|
|
|
|
|
function pushContext (_context) { |
|
|
|
|
if (_context) contextStack.push(_context); |
|
|
|
|
Fix.Model.context = context = _context; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function popContext () { |
|
|
|
|
Fix.Model.context = context = contextStack.pop(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var oldWatch = Fix.watch; |
|
|
|
|
Fix.watch = function (model, expOrFn, cb, options) { |
|
|
|
|
if (BI.isPlainObject(cb)) { |
|
|
|
@ -27501,12 +27518,27 @@ Data.Source = BISource = {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var _create = BI.createWidget; |
|
|
|
|
BI.createWidget = function (item, options, context) { |
|
|
|
|
var pushed = false; |
|
|
|
|
if (BI.isWidget(options)) { |
|
|
|
|
pushContext(options); |
|
|
|
|
pushed = true; |
|
|
|
|
} else if (context != null) { |
|
|
|
|
pushContext(context); |
|
|
|
|
pushed = true; |
|
|
|
|
} |
|
|
|
|
var result = _create.apply(this, arguments); |
|
|
|
|
pushed && popContext(); |
|
|
|
|
return result; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
var _init = BI.Widget.prototype._init; |
|
|
|
|
BI.Widget.prototype._init = function () { |
|
|
|
|
var self = this; |
|
|
|
|
var needPop = false; |
|
|
|
|
if (window.Fix && this._store) { |
|
|
|
|
var store = findStore(this.options.element); |
|
|
|
|
var store = findStore(this.options.element || context); |
|
|
|
|
if (store) { |
|
|
|
|
pushTarget(store); |
|
|
|
|
needPop = true; |
|
|
|
@ -30760,7 +30792,7 @@ BI.Combo = BI.inherit(BI.Widget, {
|
|
|
|
|
this.popupView = BI.createWidget(this.options.popup, { |
|
|
|
|
type: "bi.popup_view", |
|
|
|
|
value: o.value |
|
|
|
|
}); |
|
|
|
|
}, this); |
|
|
|
|
this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { |
|
|
|
|
if (type === BI.Events.CLICK) { |
|
|
|
|
self.combo.setValue(self.getValue()); |
|
|
|
@ -31161,7 +31193,7 @@ BI.Expander = BI.inherit(BI.Widget, {
|
|
|
|
|
vgap: 0 |
|
|
|
|
}], |
|
|
|
|
value: o.value |
|
|
|
|
}); |
|
|
|
|
}, this); |
|
|
|
|
this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { |
|
|
|
|
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); |
|
|
|
|
if (type === BI.Events.CLICK) { |
|
|
|
@ -32001,7 +32033,7 @@ BI.Searcher = BI.inherit(BI.Widget, {
|
|
|
|
|
BI.Maskers.create(this.getName(), o.adapter, BI.extend({ |
|
|
|
|
container: this, |
|
|
|
|
render: this.popupView |
|
|
|
|
}, o.masker)); |
|
|
|
|
}, o.masker), this); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
@ -32329,7 +32361,7 @@ BI.Switcher = BI.inherit(BI.Widget, {
|
|
|
|
|
vgap: 0 |
|
|
|
|
}], |
|
|
|
|
value: o.value |
|
|
|
|
}); |
|
|
|
|
}, this); |
|
|
|
|
this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { |
|
|
|
|
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); |
|
|
|
|
if (type === BI.Events.CLICK) { |
|
|
|
@ -43032,7 +43064,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.button_group = BI.createWidget(o.el, {type: "bi.button_group", value: o.value}, this); |
|
|
|
|
this.button_group.element.css({"min-height": o.minHeight + "px"}); |
|
|
|
|
return this.button_group; |
|
|
|
|
}, |
|
|
|
@ -43042,7 +43074,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
|
|
|
|
|
if (false === o.tool) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
return BI.createWidget(o.tool); |
|
|
|
|
return BI.createWidget(o.tool, this); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_createTab: function () { |
|
|
|
@ -43056,7 +43088,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
|
|
|
|
|
height: 25, |
|
|
|
|
items: o.tabs, |
|
|
|
|
value: o.value |
|
|
|
|
}); |
|
|
|
|
}, this); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_createToolBar: function () { |
|
|
|
@ -43074,7 +43106,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
|
|
|
|
|
shadow: true, |
|
|
|
|
isShadowShowingOnSelected: true |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
}, this); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
getView: function () { |
|
|
|
|