X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;f=www%2Fjssrc%2Fblerg%2FBlerg.js;h=944c0c1cfe429356395d46b8a38db37d59a312d9;hb=f1c5b259b364aa5480bfd3939a46cf301fce3c8b;hp=827dc06e1e8fbc97786db73d2417c8f6f34511b4;hpb=6eee0074c07ce85359975621ff832943d320493a;p=blerg.git diff --git a/www/jssrc/blerg/Blerg.js b/www/jssrc/blerg/Blerg.js index 827dc06..944c0c1 100644 --- a/www/jssrc/blerg/Blerg.js +++ b/www/jssrc/blerg/Blerg.js @@ -1,8 +1,11 @@ +// Listen for onsubmit events +enyo.dispatcher.listen(document, "submit"); + enyo.kind({ name: "blerg.Blerg", kind: "Control", lastHash: null, - pathHandlers: [ blerg.User, blerg.Tag, blerg.Feed, blerg.ExternalURLPost, blerg.Welcome ], + pathHandlers: [ blerg.User, blerg.Tag, blerg.Feed, blerg.ExternalURLPost, blerg.Welcome, blerg.AccountCenter, blerg.Recovery, blerg.EmailVerify ], handlers: { onStartSignup: "showSignupDialog", onTryLogin: "tryLogin", @@ -11,7 +14,7 @@ enyo.kind({ onPostVisibility: "postVisibilityUpdate", onReload: "sendReload", onShowChangePassword: "showChangePassword", - onClearFeedStatus: "clearFeedStatus" + onAuthFailure: "authFailure" }, components: [ {classes: "blerg-header", components: [ @@ -23,7 +26,6 @@ enyo.kind({ ]}, {name: "main", kind: "blerg.Main"}, {name: "signupDialog", kind: "blerg.SignupDialog"}, - {name: "passwdDialog", kind: "blerg.PasswdDialog"}, {name: "api", kind: "blerg.API", onLoginSuccessful: "loginSuccessful", onLoginFailed: "loginFailed", @@ -82,6 +84,7 @@ enyo.kind({ }, loginFailed: function(inSender, inEvent) { alert('Login failed'); + this.waterfall('onShowForgotPasswordLink'); this.logout(); }, logout: function(inSender, inEvent) { @@ -95,10 +98,7 @@ enyo.kind({ sendReload: function() { this.$.main.waterfall('onReload'); }, - showChangePassword: function() { - this.$.passwdDialog.show(); - }, - clearFeedStatus: function() { - this.$.controls.waterfall('onClearFeedStatus'); + authFailure: function(inSender, inEvent) { + this.logout(); } });