8 {name: "spinner", kind: "OldSchoolSpinner", showing: false}
10 addItems: function(items) {
11 this.$.records.createComponents(items, {kind: this.listKind});
12 for (var i = 0; i < items.length; i++) {
13 var r = parseInt(items[i].record);
14 if (r < this.lastRecord || this.lastRecord == null)
17 this.$.records.render();
18 this.stopLoadAnimation();
20 loadMore: function() {
21 if (this.lastRecord == 0)
24 if (this.lastRecord != null) {
25 var to = this.lastRecord - 1;
26 var from = this.lastRecord - 50;
29 this.loadItems(from, to);
34 loadItems: function(from, to) {
35 this.startLoadAnimation();
37 startLoadAnimation: function() {
38 this.$.spinner.show();
39 this.$.spinner.start();
41 stopLoadAnimation: function() {
42 this.$.spinner.hide();
43 this.$.spinner.stop();