X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;f=www%2Fjssrc%2Fblerg%2FPager.js;h=92f6f4cc4a14377b22966a402b096e2da73b00e5;hb=4c3823106abb40d31797b51eeb047018698afc12;hp=2e2717727560cd86bb3d052fe026c49631fc4a8c;hpb=f4fcda2f29d7c2efe91d9afabf7d5fcd4bd04b5a;p=blerg.git diff --git a/www/jssrc/blerg/Pager.js b/www/jssrc/blerg/Pager.js index 2e27177..92f6f4c 100644 --- a/www/jssrc/blerg/Pager.js +++ b/www/jssrc/blerg/Pager.js @@ -4,7 +4,8 @@ enyo.kind({ 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}); @@ -14,6 +15,7 @@ enyo.kind({ this.lastRecord = r; } this.$.records.render(); + this.stopLoadAnimation(); }, loadMore: function() { if (this.lastRecord == 0) @@ -29,5 +31,15 @@ enyo.kind({ 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(); + } });