- name: "blerg.Pager",
- kind: "Control",
- listKind: "Control",
- lastRecord: null,
- components: [
- {name: "records"},
- {name: "loadMoreButton", kind: "onyx.Button", onclick: "loadMore", content: "Load More"}
- ],
- addItems: function(items) {
- this.$.records.createComponents(items, {kind: this.listKind});
- for (var i = 0; i < items.length; i++) {
- var r = parseInt(items[i].record);
- if (r < this.lastRecord || this.lastRecord == null)
- this.lastRecord = r;
- }
- this.$.records.render();
- if (this.lastRecord == 0)
- this.$.loadMoreButton.hide();
- },
- loadMore: function() {
- if (this.lastRecord == 0)
- return;
+ name: "blerg.Pager",
+ kind: "Control",
+ listKind: "Control",
+ lastRecord: null,
+ components: [
+ {name: "records"},
+ {name: "spinner", kind: "OldSchoolSpinner", showing: false}
+ ],
+ addItems: function(items) {
+ this.$.records.createComponents(items, {kind: this.listKind});
+ for (var i = 0; i < items.length; i++) {
+ var r = parseInt(items[i].record);
+ if (r < this.lastRecord || this.lastRecord == null)
+ this.lastRecord = r;
+ }
+ this.$.records.render();
+ this.stopLoadAnimation();
+ },
+ loadMore: function() {
+ if (this.lastRecord == 0)
+ return;