handlers: {
onLogin: "login",
onLogout: "logout",
- onPostVisibility: "postVisibilityUpdate"
+ onPostVisibility: "postVisibilityUpdate",
+ onShowForgotPasswordLink: "showForgotPasswordLink"
},
components: [
{name: "loggedOutControls", components: [
{name: "password", kind: "onyx.Input", placeholder: "Password", type: "password", attributes: {tabindex: 2}}
]},
]},
- {kind: "onyx.Button", content: "Login", onclick: "loginClicked", attributes: {tabindex: 3}}
+ {kind: "onyx.Button", content: "Login", onclick: "loginClicked", attributes: {tabindex: 3}},
+ {name: "forgotPassword", showing: false, style: "margin-top: 10px; text-align: left", components: [
+ {kind: "blerg.Link", content: "Forgot your password?", onNavigate: "popupForgotPasswordDialog"}
+ ]}
]}
]},
{name: "loggedInControls", showing: false, components: [
{name: "spewButton", kind: "onyx.Button", classes: "spew-button", content: "Spew It!", onclick: "spewToggle"}
]},
]},
+ {name: "forgotPasswordDialog", kind: "blerg.ForgotPasswordDialog"},
{name: "api", kind: "blerg.API",
onStatus: "gotStatus"},
{kind: "Signals",
},
login: function(inSender, inEvent) {
this.$.password.setValue('');
+ this.$.forgotPassword.hide();
// TODO: Replace with regular blur() call in future enyo
this.$.password.node.blur();
this.setLoggedIn(true);
} else if (inEvent.type == 'mentioned') {
this.gotStatus(this, {mentioned: false});
}
+ },
+ showForgotPasswordLink: function(inSender, inevent) {
+ this.$.forgotPassword.show();
+ },
+ popupForgotPasswordDialog: function() {
+ this.$.forgotPasswordDialog.setUsername(this.$.username.getValue());
+ this.$.forgotPasswordDialog.show();
}
});