| [ Index ] |
PHP Cross Reference of Drupal 6 (yi-drupal) |
[Summary view] [Print] [Text view]
1 2 Drupal.behaviors.openid = function (context) { 3 var $loginElements = $("#edit-name-wrapper, #edit-pass-wrapper, li.openid-link"); 4 var $openidElements = $("#edit-openid-identifier-wrapper, li.user-link"); 5 6 // This behavior attaches by ID, so is only valid once on a page. 7 if (!$("#edit-openid-identifier.openid-processed").size() && $("#edit-openid-identifier").val()) { 8 $("#edit-openid-identifier").addClass('openid-processed'); 9 $loginElements.hide(); 10 // Use .css("display", "block") instead of .show() to be Konqueror friendly. 11 $openidElements.css("display", "block"); 12 } 13 $("li.openid-link:not(.openid-processed)", context) 14 .addClass('openid-processed') 15 .click( function() { 16 $loginElements.hide(); 17 $openidElements.css("display", "block"); 18 // Remove possible error message. 19 $("#edit-name, #edit-pass").removeClass("error"); 20 $("div.messages.error").hide(); 21 // Set focus on OpenID Identifier field. 22 $("#edit-openid-identifier")[0].focus(); 23 return false; 24 }); 25 $("li.user-link:not(.openid-processed)", context) 26 .addClass('openid-processed') 27 .click(function() { 28 $openidElements.hide(); 29 $loginElements.css("display", "block"); 30 // Clear OpenID Identifier field and remove possible error message. 31 $("#edit-openid-identifier").val('').removeClass("error"); 32 $("div.messages.error").css("display", "block"); 33 // Set focus on username field. 34 $("#edit-name")[0].focus(); 35 return false; 36 }); 37 };
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Mon Jul 9 18:01:44 2012 | Cross-referenced by PHPXref 0.7 |