[Pkg-mozext-commits] [gcontactsync] 03/19: Issue #66: Next button in new account wizard with new account not always disabled.
David Prévot
taffit at moszumanska.debian.org
Thu Apr 2 17:47:17 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository gcontactsync.
commit 88736691b5847e98f9cae8e624e7ec4a43c291ce
Author: Josh Geenen <joshgeenen at gmail.com>
Date: Sun Mar 29 14:59:30 2015 -0500
Issue #66: Next button in new account wizard with new account not always disabled.
---
src/content/AccountSetupWizard.js | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/content/AccountSetupWizard.js b/src/content/AccountSetupWizard.js
index d12fc21..083488b 100644
--- a/src/content/AccountSetupWizard.js
+++ b/src/content/AccountSetupWizard.js
@@ -54,12 +54,14 @@ com.gContactSync.AccountSetupWizard = {
mAuthToken: "",
mEmailAddress: "",
mAccounts: [],
+ mBrowserLoaded: false,
/**
* Initializes the first page of the wizard.
*/
init: function AccountSetupWizard_init() {
this.updateAccountIDs();
this.addAccounts();
+ this.mBrowserLoaded = false;
},
/**
* Adds IMAP, POP3, and gContactSync accounts from the login manager to the dropdown.
@@ -124,14 +126,18 @@ com.gContactSync.AccountSetupWizard = {
* Loads the OAuth2 page and adds a listener that handles successful authentication.
*/
loadOAuthPage: function AccountSetupWizard_loadOAuthPage() {
-
var wizard = document.getElementById("newAccountWizard");
var browser = document.getElementById("browser");
var url = com.gContactSync.gdata.getOAuthURL(this.mEmailAddress);
+
+ wizard.canAdvance = false;
com.gContactSync.LOGGER.VERBOSE_LOG("Opening browser with URL: " + url);
browser.loadURI(url);
- com.gContactSync.OAuth2.init(browser, com.gContactSync.gdata.REDIRECT_URI, this.onSuccessfulAuthentication);
- wizard.canAdvance = false;
+
+ if (!this.mWizardLoaded) {
+ com.gContactSync.OAuth2.init(browser, com.gContactSync.gdata.REDIRECT_URI, this.onSuccessfulAuthentication);
+ this.mWizardLoaded = true;
+ }
},
/**
* Callback for OAuth2. Adds the refresh token to the login manager and advances the wizard.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/gcontactsync.git
More information about the Pkg-mozext-commits
mailing list