summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordavid_garcia_garcia2015-05-11 19:41:31 (GMT)
committer Douglas G Reith2015-05-11 19:41:31 (GMT)
commit92765c20cb85f694a52b9450af4d266ab4dc4032 (patch)
tree9784ef83ead260cb72ec81e62ac91390ce4a69c0
parent725824fa6ffc7f82c03c4a082f8d06f094454ef3 (diff)
Issue #1342262 by david_garcia: Fixes Drupal.behaviors.unifiedLogin conflicts with Ajax callsHEAD7.x-1.x
-rw-r--r--logintoboggan.unifiedlogin.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/logintoboggan.unifiedlogin.js b/logintoboggan.unifiedlogin.js
index c788b86..d8980f9 100644
--- a/logintoboggan.unifiedlogin.js
+++ b/logintoboggan.unifiedlogin.js
@@ -3,13 +3,13 @@
Drupal.behaviors.unifiedLogin = {
- attach: function (context) {
+ attach: function (context, settings) {
// Attach behaviors to the links so that they show/hide forms appropriately.
- $('.toboggan-unified #register-link').click(function() {
+ $('.toboggan-unified #register-link', context).click(function() {
$(this).addClass('lt-active').blur();
- $('.toboggan-unified #login-link').removeClass('lt-active');
- $('.toboggan-unified #register-form').show();
- $('.toboggan-unified #login-form').hide();
+ $('.toboggan-unified #login-link', context).removeClass('lt-active');
+ $('.toboggan-unified #register-form', context).show();
+ $('.toboggan-unified #login-form', context).hide();
$.ajax({
url: "/user/register",
success: function(data) {
@@ -20,11 +20,11 @@ Drupal.behaviors.unifiedLogin = {
});
return false;
});
- $('.toboggan-unified #login-link').click(function() {
+ $('.toboggan-unified #login-link', context).click(function () {
$(this).addClass('lt-active').blur();
- $('.toboggan-unified #register-link').removeClass('lt-active');
- $('.toboggan-unified #login-form').show();
- $('.toboggan-unified #register-form').hide();
+ $('.toboggan-unified #register-link', context).removeClass('lt-active');
+ $('.toboggan-unified #login-form', context).show();
+ $('.toboggan-unified #register-form', context).hide();
$.ajax({
url: "/user/login",
success: function(data) {
@@ -36,13 +36,13 @@ Drupal.behaviors.unifiedLogin = {
return false;
});
- switch(Drupal.settings.LoginToboggan.unifiedLoginActiveForm) {
+ switch(settings.LoginToboggan.unifiedLoginActiveForm) {
case 'register':
- $('.toboggan-unified #register-link').click();
+ $('.toboggan-unified #register-link', context).click();
break;
case 'login':
default:
- $('.toboggan-unified #login-link').click();
+ $('.toboggan-unified #login-link', context).click();
break;
}
}