8 {name: "spinner", kind: "OldSchoolSpinner", showing: false}
10 addItems: function(items) {
11 if (items.length > 0) {
12 this.$.records.createComponents(items, {kind: this.listKind});
13 for (var i = 0; i < items.length; i++) {
14 var r = parseInt(items[i].record);
15 if (r < this.lastRecord || this.lastRecord == null)
19 this.$.records.createComponent({content: "No items"});
21 this.$.records.render();
22 this.stopLoadAnimation();
24 loadMore: function() {
25 if (this.lastRecord == 0)
28 if (this.lastRecord != null) {
29 var to = this.lastRecord - 1;
30 var from = this.lastRecord - 50;
33 this.loadItems(from, to);
38 loadItems: function(from, to) {
39 this.startLoadAnimation();
41 startLoadAnimation: function() {
42 this.$.spinner.show();
43 this.$.spinner.start();
45 stopLoadAnimation: function() {
46 this.$.spinner.hide();
47 this.$.spinner.stop();