aboutsummaryrefslogtreecommitdiff
path: root/underlays
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-05-08 15:57:39 -0400
committerJoey Hess <joey@kitenet.net>2010-05-08 15:57:39 -0400
commitc3e9215e1fcb604c3ee01119fdf7cf13724c3812 (patch)
treed52efb71b310fdd70a7f7e2799132605d4fd4391 /underlays
parentf735e2d1b3ced6dc1e246e61be0256302ff5eb14 (diff)
downloadikiwiki-c3e9215e1fcb604c3ee01119fdf7cf13724c3812.tar
ikiwiki-c3e9215e1fcb604c3ee01119fdf7cf13724c3812.tar.gz
moved non-openid signin form into same page as openid selector; show/hide as buttons are pressed
Diffstat (limited to 'underlays')
-rw-r--r--underlays/openid-selector/ikiwiki/openid/openid-jquery.js27
1 files changed, 21 insertions, 6 deletions
diff --git a/underlays/openid-selector/ikiwiki/openid/openid-jquery.js b/underlays/openid-selector/ikiwiki/openid/openid-jquery.js
index 59a59c084..bf14fd3d5 100644
--- a/underlays/openid-selector/ikiwiki/openid/openid-jquery.js
+++ b/underlays/openid-selector/ikiwiki/openid/openid-jquery.js
@@ -82,8 +82,9 @@ var openid = {
input_id: null,
provider_url: null,
provider_id: null,
+ localsignin_id: null,
- init: function(input_id, localloginurl) {
+ init: function(input_id, localsignin_id) {
var openid_btns = $('#openid_btns');
@@ -105,13 +106,14 @@ var openid = {
openid_btns.append(this.getBoxHTML(providers_small[id], 'small'));
}
}
- if (localloginurl != "") {
+ if (localsignin_id != "") {
+ this.localsignin_id=localsignin_id;
openid_btns.append(
- '<a href="' + localloginurl + '"' +
+ '<a href="javascript: openid.signin(\'localsignin\');"' +
' style="background: #FFF" ' +
- 'class="openid_small_btn">' +
+ 'class="localsignin openid_small_btn">' +
'<img alt="" width="16" height="16" src="favicon.ico" />' +
- ' Local Account' +
+ ' other' +
'</a>'
);
}
@@ -143,7 +145,20 @@ var openid = {
},
/* Provider image click */
signin: function(box_id, onload) {
-
+
+ if (box_id == 'localsignin') {
+ this.highlight(box_id);
+ $('#openid_input_area').empty();
+ $('#'+this.localsignin_id).show();
+ this.setCookie(box_id);
+ return;
+ }
+ else {
+ if (this.localsignin_id) {
+ $('#'+this.localsignin_id).hide();
+ }
+ }
+
var provider = providers[box_id];
if (! provider) {
return;