Support Google and Yahoo login without the user needing to know that OpenID is in...
[citadel.git] / webcit / static / authmethods.js
index 3362a5185b5ed256d9846fd77a06859c5f3565c3..85e9626dbdc4e534219c4aed9bb8b37e3a3159db 100644 (file)
@@ -58,6 +58,8 @@ function authtoggle(show_which_div) {
        $('authbox_userpass').style.display = 'none';
        $('authbox_newuser').style.display = 'none';
        $('authbox_openid').style.display = 'none';
+       $('authbox_google').style.display = 'none';
+       $('authbox_yahoo').style.display = 'none';
        $(show_which_div).style.display = 'block';
 }
 
@@ -182,3 +184,27 @@ function openid_onkeypress(e) {
 }
 
 
+/****************** GOOGLE ***********************/
+
+/*
+ * Attempt login with Google, called from modal dialog
+ */
+function ajax_try_google() {
+       $('login_errmsg').innerHTML = "";
+       openid_url = encodeURI("https://www.google.com/accounts/o8/id");
+       do_auth_popout("openid_login?openid_url=" + openid_url);
+}
+
+
+/****************** GOOGLE ***********************/
+
+/*
+ * Attempt login with Google, called from modal dialog
+ */
+function ajax_try_yahoo() {
+       $('login_errmsg').innerHTML = "";
+       openid_url = encodeURI("http://yahoo.com");
+       do_auth_popout("openid_login?openid_url=" + openid_url);
+}
+
+