listKind: "Control",
lastRecord: null,
components: [
- {name: "records"}
+ {name: "records"},
+ {name: "spinner", kind: "OldSchoolSpinner", showing: false}
],
addItems: function(items) {
this.$.records.createComponents(items, {kind: this.listKind});
this.lastRecord = r;
}
this.$.records.render();
+ this.stopLoadAnimation();
},
loadMore: function() {
if (this.lastRecord == 0)
this.loadItems();
}
},
- loadItems: function(from, to) { }
+ loadItems: function(from, to) {
+ this.startLoadAnimation();
+ },
+ startLoadAnimation: function() {
+ this.$.spinner.show();
+ this.$.spinner.start();
+ },
+ stopLoadAnimation: function() {
+ this.$.spinner.hide();
+ this.$.spinner.stop();
+ }
});