X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;f=www%2Fjssrc%2Fblerg%2FTag.js;h=0d77dab026ede7759917521665048b18d99da4d7;hb=4210d2d20df6635e19c20f5b303d498f4657968b;hp=d885481c41904dd38972e1c922a75663908d613d;hpb=123d2723395955bf2121e0bfeb6c864b70a33448;p=blerg.git diff --git a/www/jssrc/blerg/Tag.js b/www/jssrc/blerg/Tag.js index d885481..0d77dab 100644 --- a/www/jssrc/blerg/Tag.js +++ b/www/jssrc/blerg/Tag.js @@ -7,9 +7,18 @@ enyo.kind({ tag: "" }, components: [ + {classes: "blerg-user-controls", components: [ + {name: "rssLink", kind: "blerg.Link", components: [ + {tag: null, content: "["}, + {kind: "Image", src: "/images/rss.png", attributes: {width: 16, height: 16}}, + {tag: null, content: "RSS]"} + ]} + ]}, {name: "records"}, + {name: "spinner", kind: "OldSchoolSpinner", showing: false}, {name: "api", kind: "blerg.API", - onItemsLoaded: "itemsLoaded"} + onItemsLoaded: "itemsLoaded", + onClearStatus: "clearStatus"} ], statics: { locationDetect: function(l) { @@ -36,6 +45,7 @@ enyo.kind({ this.bubble('onSetTitle', {section: 'about @' + this.tag}); break; } + this.$.rssLink.setHref('/rss/' + this.type + '/' + this.tag); this.$.records.destroyComponents(); this.lastRecord = null; this.loadMore(); @@ -46,5 +56,13 @@ enyo.kind({ }, itemsLoaded: function(inSender, inEvent) { this.addItems(inEvent.entries); + if (this.type == 'ref' && blerg.API.loggedIn && blerg.API.username == this.tag) { + this.$.api.clearStatus('mentioned'); + } + }, + clearStatus: function(inSender, inEvent) { + if (inEvent.type == 'mentioned' && inEvent.status == 'success') { + enyo.Signals.send('onClearNotification', {type: inEvent.type}); + } } });