Add feed reading functionality
[blerg.git] / www / jssrc / blerg / Feed.js
1 enyo.kind({
2     name: "blerg.Feed",
3     kind: "blerg.Pager",
4     listKind: "blerg.TagRecord",
5     published: {
6     },
7     components: [
8         {name: "records"},
9         {name: "api", kind: "blerg.API",
10          onItemsLoaded: "itemsLoaded"}
11     ],
12     statics: {
13         locationDetect: function(l) {
14             var m = l.hash.match(/^#\/feed$/);
15             if (m) {
16                 return {kind: "blerg.Feed"};
17             }
18         }
19     },
20     create: function() {
21         this.inherited(arguments);
22         this.loadMore();
23     },
24     loadItems: function(from, to) {
25         this.inherited(arguments);
26         this.$.api.loadFeed();
27     },
28     itemsLoaded: function(inSender, inEvent) {
29         this.addItems(inEvent.entries);
30     }
31 });