diff --git a/dist/bundle.js b/dist/bundle.js index b5e65039cb..ba5fe11d8b 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -23901,7 +23901,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; @@ -24490,7 +24490,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 = []; @@ -24537,11 +24537,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++) { @@ -24997,7 +24997,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 + ""); @@ -25102,7 +25102,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 + ""); @@ -25598,12 +25598,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, @@ -25667,7 +25667,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%" @@ -25678,7 +25678,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, @@ -25735,7 +25735,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({ @@ -25744,12 +25744,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, @@ -25816,12 +25816,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, @@ -76077,9 +76077,6 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, { textAlign: "left", height: o.height, text: o.text, - title: function () { - return o.text; - }, hgap: c.hgap }); this.trigerButton = BI.createWidget({ diff --git a/dist/case.js b/dist/case.js index 24619c83cc..126f393aa2 100644 --- a/dist/case.js +++ b/dist/case.js @@ -13740,9 +13740,6 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, { textAlign: "left", height: o.height, text: o.text, - title: function () { - return o.text; - }, hgap: c.hgap }); this.trigerButton = BI.createWidget({ diff --git a/dist/core.js b/dist/core.js index 2c020859bb..ac0acaa920 100644 --- a/dist/core.js +++ b/dist/core.js @@ -23901,7 +23901,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; @@ -24490,7 +24490,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 = []; @@ -24537,11 +24537,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++) { @@ -24997,7 +24997,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 + ""); @@ -25102,7 +25102,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 + ""); @@ -25598,12 +25598,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, @@ -25667,7 +25667,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%" @@ -25678,7 +25678,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, @@ -25735,7 +25735,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({ @@ -25744,12 +25744,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, @@ -25816,12 +25816,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, diff --git a/dist/fineui.js b/dist/fineui.js index 7fb26ed531..714b3f9028 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -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, @@ -27553,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; @@ -77799,9 +77803,6 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, { textAlign: "left", height: o.height, text: o.text, - title: function () { - return o.text; - }, hgap: c.hgap }); this.trigerButton = BI.createWidget({ diff --git a/dist/fix/fix.compact.js b/dist/fix/fix.compact.js index ecb79592aa..03688192ab 100644 --- a/dist/fix/fix.compact.js +++ b/dist/fix/fix.compact.js @@ -116,10 +116,14 @@ 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; diff --git a/src/case/trigger/trigger.icon.text.js b/src/case/trigger/trigger.icon.text.js index 8a65e7e3aa..c2805878a5 100644 --- a/src/case/trigger/trigger.icon.text.js +++ b/src/case/trigger/trigger.icon.text.js @@ -26,9 +26,6 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, { textAlign: "left", height: o.height, text: o.text, - title: function () { - return o.text; - }, hgap: c.hgap }); this.trigerButton = BI.createWidget({ diff --git a/src/core/wrapper/layout/layout.card.js b/src/core/wrapper/layout/layout.card.js index cfcab22d0d..bdac5abce2 100644 --- a/src/core/wrapper/layout/layout.card.js +++ b/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, 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; diff --git a/src/core/wrapper/layout/layout.grid.js b/src/core/wrapper/layout/layout.grid.js index 55c3cb88a8..80a976cecc 100644 --- a/src/core/wrapper/layout/layout.grid.js +++ b/src/core/wrapper/layout/layout.grid.js @@ -45,7 +45,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 = []; @@ -92,11 +92,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++) { diff --git a/src/core/wrapper/layout/layout.tape.js b/src/core/wrapper/layout/layout.tape.js index 376d630296..ea24f8c826 100644 --- a/src/core/wrapper/layout/layout.tape.js +++ b/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, this); + var w = BI.createWidget(item, self); 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, this); + var w = BI.createWidget(item, self); self.addWidget(self.getName() + i + "", w); } else { w = self.getWidgetByName(self.getName() + i + ""); diff --git a/src/core/wrapper/layout/middle/middle.center.js b/src/core/wrapper/layout/middle/middle.center.js index 7bf5c86381..5545d7c41c 100644 --- a/src/core/wrapper/layout/middle/middle.center.js +++ b/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" : "") - }, 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, diff --git a/src/core/wrapper/layout/middle/middle.float.center.js b/src/core/wrapper/layout/middle/middle.float.center.js index aa1768fe54..ab9f0d6c25 100644 --- a/src/core/wrapper/layout/middle/middle.float.center.js +++ b/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" - }, this); + }, 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, this); + var w = BI.createWidget(item, self); w.element.css({ position: "absolute", left: o.hgap + o.lgap, diff --git a/src/core/wrapper/layout/middle/middle.horizontal.js b/src/core/wrapper/layout/middle/middle.horizontal.js index abd9f34d66..2cb37e7887 100644 --- a/src/core/wrapper/layout/middle/middle.horizontal.js +++ b/src/core/wrapper/layout/middle/middle.horizontal.js @@ -30,7 +30,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({ @@ -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" : "") - }, 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, diff --git a/src/core/wrapper/layout/middle/middle.vertical.js b/src/core/wrapper/layout/middle/middle.vertical.js index 0b7302f581..9c59a251e3 100644 --- a/src/core/wrapper/layout/middle/middle.vertical.js +++ b/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" : "") - }, 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,