|
|
|
@ -40,10 +40,12 @@ BI.DisplaySelectedList = BI.inherit(BI.Pane, {
|
|
|
|
|
}, |
|
|
|
|
items: this._createItems(opts.items), |
|
|
|
|
chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI, |
|
|
|
|
layouts: [{ |
|
|
|
|
type: "bi.vertical", |
|
|
|
|
lgap: 10 |
|
|
|
|
}] |
|
|
|
|
layouts: [ |
|
|
|
|
{ |
|
|
|
|
type: "bi.vertical", |
|
|
|
|
lgap: 10 |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
itemsCreator: function (options, callback) { |
|
|
|
|
if (options.times === 1) { |
|
|
|
@ -53,10 +55,7 @@ BI.DisplaySelectedList = BI.inherit(BI.Pane, {
|
|
|
|
|
if (cacheItems.length > 0) { |
|
|
|
|
var renderedItems = cacheItems.slice(0, 100); |
|
|
|
|
cacheItems = cacheItems.slice(100); |
|
|
|
|
self.hasNext = true; |
|
|
|
|
if (cacheItems.length === 0) { |
|
|
|
|
self.hasNext = false; |
|
|
|
|
} |
|
|
|
|
self.hasNext = cacheItems.length > 0; |
|
|
|
|
callback(self._createItems(renderedItems)); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
@ -65,8 +64,8 @@ BI.DisplaySelectedList = BI.inherit(BI.Pane, {
|
|
|
|
|
self.hasNext = !!ob.hasNext; |
|
|
|
|
var firstItemsCount = 100 + ob.items.length % 100; |
|
|
|
|
if (ob.items.length > 100) { |
|
|
|
|
cacheItems = ob.items.slice(100 + ob.items.length % 100); |
|
|
|
|
self.hasNext = true; |
|
|
|
|
cacheItems = ob.items.slice(firstItemsCount); |
|
|
|
|
self.hasNext = (firstItemsCount === ob.items.length) ? false : true; |
|
|
|
|
} |
|
|
|
|
callback(self._createItems(ob.items.slice(0, firstItemsCount))); |
|
|
|
|
}); |
|
|
|
@ -104,4 +103,4 @@ BI.DisplaySelectedList = BI.inherit(BI.Pane, {
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
BI.shortcut("bi.display_selected_list", BI.DisplaySelectedList); |
|
|
|
|
BI.shortcut("bi.display_selected_list", BI.DisplaySelectedList); |
|
|
|
|