X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;ds=sidebyside;f=www%2Fjssrc%2Fblerg%2FBlerg.js;h=45b7d5f2cf373bd80fcb11dd3b6a339dd0fd4c90;hb=4720a1f90f7d42f3611f064cc5ba3d768a92b5c6;hp=f40a2771e566ace899cbc40acbb0d8d09bff66ed;hpb=80ad774f55998cc11e08694245dfd6cb1b49a86f;p=blerg.git diff --git a/www/jssrc/blerg/Blerg.js b/www/jssrc/blerg/Blerg.js index f40a277..45b7d5f 100644 --- a/www/jssrc/blerg/Blerg.js +++ b/www/jssrc/blerg/Blerg.js @@ -2,6 +2,7 @@ enyo.kind({ name: "blerg.Blerg", kind: "Control", lastHash: null, + pathHandlers: [ blerg.User, blerg.Tag, blerg.Feed, blerg.ExternalURLPost, blerg.Welcome ], handlers: { onStartSignup: "showSignupDialog", onTryLogin: "tryLogin", @@ -25,13 +26,6 @@ enyo.kind({ onLoginFailed: "loginFailed", onLogoutSuccessful: "logout"} ], - urlmap: [ - ['search', /^\?post\/([^/]+)\/(.+)/, "blerg.ExternalURLPost"], - ['hash', /^#\/(ref|tag)\/([A-Za-z0-9_-]+)(?:\/p(\d+))?$/, "blerg.Tag"], - ['hash', /^#\/feed(?:\/p(\d+))?$/, "blerg.Feed"], - ['hash', /^#([A-Za-z0-9_-]+)(?:\/(p)?(\d+))?$/, "blerg.User"] - ], - pathHandlers: [ blerg.User, blerg.Tag, blerg.Welcome ], rendered: function() { this.inherited(arguments); @@ -42,10 +36,10 @@ enyo.kind({ document.body.addEventListener('keyup', function(event) { if (event.shiftKey && event.keyCode == 32) { - this.$.post.show(); + this.waterfall('onPostVisibility', {showing: true}); event.stopPropagation(); } - }, false); + }.bind(this), false); }, hashCheck: function() { if (location.hash != this.lastHash) { @@ -81,10 +75,6 @@ enyo.kind({ this.$.api.logout(); }, loginSuccessful: function(inSender, inEvent) { - this.$.api.requestFeedStatus(); - this.feedStatusUpdateInterval = setInterval(function() { - this.$.api.requestFeedStatus(); - }.bind(this), 900000); this.waterfall('onLogin', inEvent); }, loginFailed: function(inSender, inEvent) {