diff --git a/browserid/static/dialog/controllers/authenticate_controller.js b/browserid/static/dialog/controllers/authenticate_controller.js index 7d337bc41bc9f5c918b6828997ec5d4213574268..edd353dcccbf23b398e4f2f3ad877c59f686f7e7 100644 --- a/browserid/static/dialog/controllers/authenticate_controller.js +++ b/browserid/static/dialog/controllers/authenticate_controller.js @@ -1,5 +1,5 @@ -/*jshint brgwser:true, jQuery: true, forin: true, laxbreak:true */ -/*global Channel:true, CryptoStubs:true, alert:true, errorOut:true, setupChannel:true, getEmails:true, clearEmails: true, console: true, _: true, pollTimeout: true, addEmail: true, removeEmail:true, BrowserIDNetwork: true, BrowserIDWait:true, BrowserIDErrors: true, PageController: true */ +/*jshint brgwser:true, jQuery: true, forin: true, laxbreak:true */ +/*global Channel:true, CryptoStubs:true, alert:true, errorOut:true, setupChannel:true, getEmails:true, clearEmails: true, console: true, _: true, pollTimeout: true, addEmail: true, removeEmail:true, BrowserIDNetwork: true, BrowserIDWait:true, BrowserIDErrors: true, PageController: true */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * @@ -52,7 +52,7 @@ "#forgotpassword click": function(event) { this.close("authenticate:forgotpassword"); }, - + "#create click": function(event) { this.close("authenticate:createuser"); }, @@ -72,13 +72,13 @@ BrowserIDIdentities.authenticateAndSync(email, pass, function(authenticated) { if (authenticated) { self.doWait(BrowserIDWait.authentication); - } else { - self.find("#nosuchaccount").hide().fadeIn(400); } }, function(authenticated) { if (authenticated) { self.close("authenticate:authenticated"); + } else { + self.find("#nosuchaccount").hide().fadeIn(400); } }, self.getErrorDialog(BrowserIDErrors.authentication)); }