r86920 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86919‎ | r86920 | r86921 >
Date:23:24, 25 April 2011
Author:nimishg
Status:deferred
Tags:
Comment:
bugfix for non-anonymous login link
Modified paths:
  • /trunk/extensions/CustomUserSignup/modules/AccountCreationUserBucket.js (modified) (history)

Diff [purge]

Index: trunk/extensions/CustomUserSignup/modules/AccountCreationUserBucket.js
@@ -1,4 +1,3 @@
2 -
32 //checks
43 if(typeof(MW) == "undefined"){ MW={};}
54 if(!MW.activeCampaigns){ MW.activeCampaigns ={}; }
@@ -31,16 +30,32 @@
3231
3332 "ACP1": function(){
3433 //change to NiceMsg1 campaign
35 - $j("#pt-anonlogin a").attr("href", $j("#pt-anonlogin a").attr("href") + "&campaign=ACP1" );
 34+ $j("#pt-anonlogin a").each(function(){
 35+ $j(this).attr("href", $j(this).attr("href") + "&campaign=ACP1" );
 36+ });
 37+ $j("#pt-login a").each(function(){
 38+ $j(this).attr("href", $j(this).attr("href") + "&campaign=ACP1" );
 39+ });
 40+
3641 },
3742 "ACP2": function(){
3843 //change to NiceMsg2 campaign
39 - $j("#pt-anonlogin a").attr("href", $j("#pt-anonlogin a").attr("href") + "&campaign=ACP2" );
 44+ $j("#pt-anonlogin a").each(function(){
 45+ $j(this).attr("href", $j(this).attr("href") + "&campaign=ACP2" );
 46+ });
 47+ $j("#pt-login a").each(function(){
 48+ $j(this).attr("href", $j(this).attr("href") + "&campaign=ACP2" );
 49+ });
4050 },
4151
4252 "ACP3": function(){
4353 //change to NiceMsg2 campaign
44 - $j("#pt-anonlogin a").attr("href", $j("#pt-anonlogin a").attr("href") + "&campaign=ACP3" );
 54+ $j("#pt-anonlogin a").each(function(){
 55+ $j(this).attr("href", $j(this).attr("href") + "&campaign=ACP3" );
 56+ });
 57+ $j("#pt-login a").each(function(){
 58+ $j(this).attr("href", $j(this).attr("href") + "&campaign=ACP3" );
 59+ });
4560 },
4661
4762 // "allActive" is reserved.

Status & tagging log