diff --git a/src/base/layer/layer.popup.js b/src/base/layer/layer.popup.js index 731510c42..6255975ab 100644 --- a/src/base/layer/layer.popup.js +++ b/src/base/layer/layer.popup.js @@ -380,11 +380,12 @@ BI.PopupView = BI.inherit(BI.Widget, { default: break; } - this.element.removeClass("left") - .removeClass("right") - .removeClass("top") - .removeClass("bottom") - .addClass(direction); + this.element + .removeClass("left") + .removeClass("right") + .removeClass("top") + .removeClass("bottom") + .addClass(direction); this.arrow.element.css(style); this.arrowWrapper.element.css(wrapperStyle); this.placeholder.element.css(placeholderStyle); diff --git a/src/base/list/listview.js b/src/base/list/listview.js index 65f777a99..bca51e3cc 100644 --- a/src/base/list/listview.js +++ b/src/base/list/listview.js @@ -21,13 +21,13 @@ BI.ListView = BI.inherit(BI.Widget, { }, init: function () { - var self = this; this.renderedIndex = -1; this.cache = {}; }, render: function () { var self = this, o = this.options; + return { type: "bi.vertical", items: [BI.extend({ @@ -72,10 +72,11 @@ BI.ListView = BI.inherit(BI.Widget, { var index = (this.cache[this.renderedIndex] && (this.cache[this.renderedIndex].index + o.blockSize)) || 0; var cnt = this.renderedIndex + 1; var lastHeight; - var getElementHeight = function () { + function getElementHeight () { return self.container.element.height(); - }; - while ((lastHeight = getElementHeight()) < minContentHeight && index < o.items.length) { + } + lastHeight = getElementHeight(); + while ((lastHeight) < minContentHeight && index < o.items.length) { var items = o.items.slice(index, index + o.blockSize); this.container.addItems(items.map(function (item, i) { return o.itemFormatter(item, index + i); @@ -93,7 +94,6 @@ BI.ListView = BI.inherit(BI.Widget, { }, _calculateBlocksToRender: function () { - var o = this.options; this._renderMoreIf(); }, diff --git a/src/base/list/virtualgrouplist.js b/src/base/list/virtualgrouplist.js index cb8d1b533..2dc5f97a5 100644 --- a/src/base/list/virtualgrouplist.js +++ b/src/base/list/virtualgrouplist.js @@ -27,6 +27,7 @@ BI.VirtualGroupList = BI.inherit(BI.Widget, { render: function () { var self = this, o = this.options; + return { type: "bi.vertical", items: [{ diff --git a/src/base/list/virtuallist.js b/src/base/list/virtuallist.js index d5881b30b..7ae32143a 100644 --- a/src/base/list/virtuallist.js +++ b/src/base/list/virtuallist.js @@ -20,13 +20,13 @@ BI.VirtualList = BI.inherit(BI.Widget, { }, init: function () { - var self = this; this.renderedIndex = -1; this.cache = {}; }, render: function () { - var self = this, o = this.options; + var self = this; + return { type: "bi.vertical", items: [{ @@ -45,7 +45,7 @@ BI.VirtualList = BI.inherit(BI.Widget, { ref: function () { self.bottomBlank = this; } - }], + }] }; },