Bind .logout click on fragment load (bug 804341)

If we don't do this, the logout button on the settings page won't
ever clean up the Persona state and you'll get relogged.
This commit is contained in:
Matt Basta 2012-10-26 11:58:02 -07:00
Родитель 4194ea1c8f
Коммит 034adc79e2
1 изменённых файлов: 8 добавлений и 6 удалений

Просмотреть файл

@ -14,12 +14,14 @@ $("#login form").submit(function(e) {
action = $this.attr('action') + format("?to={0}", window.location.pathname);
$this.attr('action', action);
});
$(".logout").bind('click', function(e) {
// NOTE: Real logout operations happen on the action of the Logout
// link/button. This just tells Persona to clean up it's data.
if (navigator.id) {
navigator.id.logout();
}
z.page.on('fragmentloaded', function() {
$(".logout").bind('click', function(e) {
// NOTE: Real logout operations happen on the action of the Logout
// link/button. This just tells Persona to clean up it's data.
if (navigator.id) {
navigator.id.logout();
}
});
});
function gotVerifiedEmail(assertion) {
if (assertion) {