http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97947

Revision: 97947
Author:   pgehres
Date:     2011-09-23 19:09:46 +0000 (Fri, 23 Sep 2011)
Log Message:
-----------
Fixes for r97836: jQuery selectors with valid syntax as well as proper path for 
csshover.min.htc on payments cluster

Modified Paths:
--------------
    
trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_1.html
    
trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_1a.html
    
trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_2.html
    
trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_2_3step.html

Modified: 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_1.html
===================================================================
--- 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_1.html
 2011-09-23 18:56:51 UTC (rev 97946)
+++ 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_1.html
 2011-09-23 19:09:46 UTC (rev 97947)
@@ -1,6 +1,6 @@
 <!-- load styles from original first steps -->
 <link rel="stylesheet" 
href="@script_path/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/css/lp1.css"
 />
-<!--[if lt IE 7]><style 
type="text/css">body{behavior:url("/w/skins-1.17/vector/csshover.min.htc")}</style><![endif]-->
+<!--[if lt IE 7]><style 
type="text/css">body{behavior:url("@script_path/skins/vector/csshover.min.htc")}</style><![endif]-->
 <!-- start Webitects styles -->
 <link rel="stylesheet" 
href="@script_path/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/css/Webitects.css"
 />
 <style type="text/css">
@@ -247,7 +247,7 @@
                                $("#accordion").accordion( "activate" , 1 );
                                
                                //we have clearly selected an amount before, 
make sure it is shown
-                               showAmount( $("input[name=amount]") );
+                               showAmount( $('input[name="amount"]') );
                                
                                // hacks for IE6/IE7
                                        if (jQuery.browser.msie && 
jQuery.browser.version.substr(0,1)<9){
@@ -266,7 +266,7 @@
                            
                            $("#cc").click(function(){              
                                if ( 
validateAmount(document.paypalcontribution) ){
-                                       showAmount( $("input[name=amount]") );
+                                       showAmount( $('input[name="amount"]') );
                                                
$("#accordion").accordion("activate", 1);
                                                $("#change-amount").show();
                                                
@@ -287,7 +287,7 @@
                            $("#pp").click(function(){  
                                if ( 
validateAmount(document.paypalcontribution) ){
                                        // set the action to go to PayPal
-                                       $("input[name=gateway]").val("paypal");
+                                       
$('input[name="gateway"]').val("paypal");
                                        document.paypalcontribution.action = 
"https://wikimediafoundation.org/wiki/Special:ContributionTracking/en";;
                                                $("#loading").html("<img 
src='@script_path/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/images/loading-green.gif'
 /> Redirecting to PayPal…");
                                        document.paypalcontribution.submit();
@@ -295,12 +295,12 @@
                            });
                            $("#submitcreditcard").click(function(){            
                                
                                // set country to US
-                               $("input[name=country]").val("US");
+                               $('input[name="country"]').val("US");
                                                            
                                if ( validate_form(document.paypalcontribution) 
){
                                        // set expiration date
-                                       $("input[name=expiration]").val(
-                                               $("select[name=mos]").val() + 
$("select[name=year]").val().substring(2,4)
+                                       $('input[name="expiration"]').val(
+                                               $('select[name="mos"]').val() + 
$('select[name="year"]').val().substring(2,4)
                                        )
                                        
                                        document.paypalcontribution.action = 
"@action";
@@ -315,9 +315,9 @@
                            function showAmount(e){ 
$("#selected-amount").html("($" + e.val() + ")"); }
                            
                            // Set selected amount to amount
-                           $("input[name=amountRadio]").click(function(){ 
setAmount($(this)); });
+                           $('input[name="amountRadio"]').click(function(){ 
setAmount($(this)); });
                            $("#other-amount").change(function(){ 
setAmount($(this)); });
-                           function setAmount(e){ 
$("input[name=amount]").val(e.val()); }
+                           function setAmount(e){ 
$('input[name="amount"]').val(e.val()); }
                            
                            // Security codes
                            $("#where").click(function(){
@@ -330,20 +330,20 @@
                                        'USD' : 1
                                    };
                                var error = true;
-                                               var amount = 
$("input[name=amount]").val(); // get the amount
+                                               var amount = 
$('input[name="amount"]').val(); // get the amount
                                        var otherAmount = amount // create a 
working copy
                                        otherAmount = 
otherAmount.replace(/[,.](\d)$/, '\:$10');
                                        otherAmount = 
otherAmount.replace(/[,.](\d)(\d)$/, '\:$1$2');
                                        otherAmount = 
otherAmount.replace(/[,.]/g, '');
                                        otherAmount = otherAmount.replace(/:/, 
'.');
                                        amount = otherAmount; // idk, reset 
amount to working copy amount
-                                       $("input[name=amount]").val(amount); // 
set the new amount back into the form
+                                       $('input[name="amount"]').val(amount); 
// set the new amount back into the form
                                        
                                        // Check amount is a real number, sets 
error as true (good) if no issues
                                        error = ( amount == null || isNaN( 
amount ) || amount.value <= 0 );
                                        // Check amount is at least the minimum
                                        var currency = 'USD'; // hard-coded for 
these forms and tests
-                                       $("input[name=currency]").val(currency);
+                                       
$('input[name="currency"]').val(currency);
                                        if ( typeof( minimums[currency] ) == 
'undefined' ) {
                                                minimums[currency] = 1;
                                        }

Modified: 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_1a.html
===================================================================
--- 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_1a.html
        2011-09-23 18:56:51 UTC (rev 97946)
+++ 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_1a.html
        2011-09-23 19:09:46 UTC (rev 97947)
@@ -1,6 +1,6 @@
 <!-- load styles from original first steps -->
 <link rel="stylesheet" 
href="@script_path/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/css/lp1.css"
 />
-<!--[if lt IE 7]><style 
type="text/css">body{behavior:url("/w/skins-1.17/vector/csshover.min.htc")}</style><![endif]-->
+<!--[if lt IE 7]><style 
type="text/css">body{behavior:url("@script_path/skins/vector/csshover.min.htc")}</style><![endif]-->
 <!-- start Webitects styles -->
 <link rel="stylesheet" 
href="@script_path/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/css/Webitects.css"
 />
 <style type="text/css">
@@ -248,7 +248,7 @@
                                $("#accordion").accordion( "activate" , 1 );
                                
                                //we have clearly selected an amount before, 
make sure it is shown
-                               showAmount( $("input[name=amount]") );
+                               showAmount( $('input[name="amount"]') );
                                
                                // hacks for IE6/IE7
                                        if (jQuery.browser.msie && 
jQuery.browser.version.substr(0,1)<9){
@@ -267,7 +267,7 @@
                            
                            $("#cc").click(function(){              
                                if ( 
validateAmount(document.paypalcontribution) ){
-                                       showAmount( $("input[name=amount]") );
+                                       showAmount( $('input[name="amount"]') );
                                                
$("#accordion").accordion("activate", 1);
                                                $("#change-amount").show();
                                                
@@ -288,7 +288,7 @@
                            $("#pp").click(function(){  
                                if ( 
validateAmount(document.paypalcontribution) ){
                                        // set the action to go to PayPal
-                                       $("input[name=gateway]").val("paypal");
+                                       
$('input[name="gateway"]').val("paypal");
                                        document.paypalcontribution.action = 
"https://wikimediafoundation.org/wiki/Special:ContributionTracking/en";;
                                                $("#loading").html("<img 
src='@script_path/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/images/loading-green.gif'
 /> Redirecting to PayPal…");
                                        document.paypalcontribution.submit();
@@ -296,11 +296,11 @@
                            });
                            $("#submitcreditcard").click(function(){            
                                
                                // set country to US
-                               $("input[name=country]").val("US");
+                               $('input[name="country"]').val("US");
                                                            
                                if ( validate_form(document.paypalcontribution) 
){
                                        // set expiration date
-                                       $("input[name=expiration]").val(
+                                       $('input[name="expiration"]').val(
                                                $("select[name=mos]").val() + 
$("select[name=year]").val().substring(2,4)
                                        )
                                        
@@ -316,9 +316,9 @@
                            function showAmount(e){ 
$("#selected-amount").html("($" + e.val() + ")"); }
                            
                            // Set selected amount to amount
-                           $("input[name=amountRadio]").click(function(){ 
setAmount($(this)); });
+                           $('input[name="amountRadio"]').click(function(){ 
setAmount($(this)); });
                            $("#other-amount").change(function(){ 
setAmount($(this)); });
-                           function setAmount(e){ 
$("input[name=amount]").val(e.val()); }
+                           function setAmount(e){ 
$('input[name="amount"]').val(e.val()); }
                            
                            // Security codes
                            $("#where").click(function(){
@@ -331,20 +331,20 @@
                                        'USD' : 1
                                    };
                                var error = true;
-                                               var amount = 
$("input[name=amount]").val(); // get the amount
+                                               var amount = 
$('input[name="amount"]').val(); // get the amount
                                        var otherAmount = amount // create a 
working copy
                                        otherAmount = 
otherAmount.replace(/[,.](\d)$/, '\:$10');
                                        otherAmount = 
otherAmount.replace(/[,.](\d)(\d)$/, '\:$1$2');
                                        otherAmount = 
otherAmount.replace(/[,.]/g, '');
                                        otherAmount = otherAmount.replace(/:/, 
'.');
                                        amount = otherAmount; // idk, reset 
amount to working copy amount
-                                       $("input[name=amount]").val(amount); // 
set the new amount back into the form
+                                       $('input[name="amount"]').val(amount); 
// set the new amount back into the form
                                        
                                        // Check amount is a real number, sets 
error as true (good) if no issues
                                        error = ( amount == null || isNaN( 
amount ) || amount.value <= 0 );
                                        // Check amount is at least the minimum
                                        var currency = 'USD'; // hard-coded for 
these forms and tests
-                                       $("input[name=currency]").val(currency);
+                                       
$('input[name="currency"]').val(currency);
                                        if ( typeof( minimums[currency] ) == 
'undefined' ) {
                                                minimums[currency] = 1;
                                        }

Modified: 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_2.html
===================================================================
--- 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_2.html
 2011-09-23 18:56:51 UTC (rev 97946)
+++ 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_2.html
 2011-09-23 19:09:46 UTC (rev 97947)
@@ -1,6 +1,6 @@
 <!-- load styles from original first steps -->
 <link rel="stylesheet" 
href="@script_path/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/css/lp1.css"
 />
-<!--[if lt IE 7]><style 
type="text/css">body{behavior:url("/w/skins-1.17/vector/csshover.min.htc")}</style><![endif]-->
+<!--[if lt IE 7]><style 
type="text/css">body{behavior:url("@script_path/skins/vector/csshover.min.htc")}</style><![endif]-->
 <!-- start Webitects styles -->
 <link rel="stylesheet" 
href="@script_path/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/css/Webitects.css"
 />
 <style type="text/css">
@@ -204,7 +204,7 @@
                     </div>
                 </form>
                 <div id="where-content">
-                           <hr>
+                           <hr />
                            <h3>Where your donation goes</h3>
                            <p><strong>Technology:</strong> Servers, bandwidth, 
maintenance, development. Wikipedia is the #5 website in the world and it runs 
on a fraction of what other top websites spend.</p>
                            <p><strong>People:</strong> The other top 10 
website have thousands of employees. We have fewer than 100, making your 
donation a great investment in a highly-efficient not-for-profit 
organization.</p>
@@ -255,7 +255,7 @@
                        }
                        if( count > 0 ){
                                // show the second step with the error
-                               showAmount( $("input[name=amount]") );
+                               showAmount( $('input[name="amount"]') );
                                        // show second step
                                $(".hideamountclass").slideUp();
                            $("#step2wrapper").slideDown();
@@ -273,7 +273,7 @@
                            
                            $("#cc").click(function(){
                                if ( 
validateAmount(document.paypalcontribution) ){
-                                       showAmount( $("input[name=amount]") );
+                                       showAmount( $('input[name="amount"]') );
                                                // show second step
                                        $(".hideamountclass").slideUp();
                                    $("#step2wrapper").slideDown();
@@ -291,7 +291,7 @@
                            $("#pp").click(function(){
                                if ( 
validateAmount(document.paypalcontribution) ){
                                        // set the action to go to PayPal
-                                       $("input[name=gateway]").val("paypal");
+                                       
$('input[name="gateway"]').val("paypal");
                                        document.paypalcontribution.action = 
"https://wikimediafoundation.org/wiki/Special:ContributionTracking/en";;
                                                $("#loading").html("<img 
src='@script_path/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/images/loading-white.gif'
 /> Redirecting to PayPal…");
                                        document.paypalcontribution.submit();
@@ -299,12 +299,12 @@
                            });
                            $("#submitcreditcard").click(function(){
                                // set country to US
-                               $("input[name=country]").val("US");
+                               $('input[name="country"]').val("US");
                                                            
                                if ( validate_form(document.paypalcontribution) 
){
                                        // set expiration date
-                                       $("input[name=expiration]").val(
-                                               $("select[name=mos]").val() + 
$("select[name=year]").val().substring(2,4)
+                                       $('input[name="expiration"]').val(
+                                               $('select[name="mos"]').val() + 
$('select[name="year"]').val().substring(2,4)
                                        );
                                        
                                        document.paypalcontribution.action = 
"@action";
@@ -319,9 +319,9 @@
                            function showAmount(e){ 
$("#selected-amount").html("($" + e.val() + ")"); }
                            
                            // Set selected amount to amount
-                           $("input[name=amountRadio]").click(function(){ 
setAmount($(this)); });
+                           $('input[name="amountRadio"]').click(function(){ 
setAmount($(this)); });
                            $("#other-amount").change(function(){ 
setAmount($(this)); });
-                           function setAmount(e){ 
$("input[name=amount]").val(e.val()); }
+                           function setAmount(e){ 
$('input[name="amount"]').val(e.val()); }
                            
                            // Security codes
                            $("#where").click(function(){
@@ -334,20 +334,20 @@
                                        'USD' : 1
                                    };
                                var error = true;
-                                               var amount = 
$("input[name=amount]").val(); // get the amount
+                                               var amount = 
$('input[name="amount"]').val(); // get the amount
                                        var otherAmount = amount // create a 
working copy
                                        otherAmount = 
otherAmount.replace(/[,.](\d)$/, '\:$10');
                                        otherAmount = 
otherAmount.replace(/[,.](\d)(\d)$/, '\:$1$2');
                                        otherAmount = 
otherAmount.replace(/[,.]/g, '');
                                        otherAmount = otherAmount.replace(/:/, 
'.');
                                        amount = otherAmount; // idk, reset 
amount to working copy amount
-                                       $("input[name=amount]").val(amount); // 
set the new amount back into the form
+                                       $('input[name="amount"]').val(amount); 
// set the new amount back into the form
                                        
                                        // Check amount is a real number, sets 
error as true (good) if no issues
                                        error = ( amount == null || isNaN( 
amount ) || amount.value <= 0 );
                                        // Check amount is at least the minimum
                                        var currency = 'USD'; // hard-coded for 
these forms and tests
-                                       $("input[name=currency]").val(currency);
+                                       
$('input[name="currency"]').val(currency);
                                        if ( typeof( minimums[currency] ) == 
'undefined' ) {
                                                minimums[currency] = 1;
                                        }

Modified: 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_2_3step.html
===================================================================
--- 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_2_3step.html
   2011-09-23 18:56:51 UTC (rev 97946)
+++ 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_2_3step.html
   2011-09-23 19:09:46 UTC (rev 97947)
@@ -1,6 +1,6 @@
 <!-- load styles from original first steps -->
 <link rel="stylesheet" 
href="@script_path/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/css/lp1.css"
 />
-<!--[if lt IE 7]><style 
type="text/css">body{behavior:url("/w/skins-1.17/vector/csshover.min.htc")}</style><![endif]-->
+<!--[if lt IE 7]><style 
type="text/css">body{behavior:url("@script_path/skins/vector/csshover.min.htc")}</style><![endif]-->
 <!-- start Webitects styles -->
 <link rel="stylesheet" 
href="@script_path/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/css/Webitects.css"
 />
 <style type="text/css">
@@ -216,7 +216,7 @@
                     <input type="hidden" value="@owa_ref" name="owa_ref"/>
                 </form>
                 <div id="where-content">
-                           <hr>
+                           <hr />
                            <h3>Where your donation goes</h3>
                            <p><strong>Technology:</strong> Servers, bandwidth, 
maintenance, development. Wikipedia is the #5 website in the world and it runs 
on a fraction of what other top websites spend.</p>
                            <p><strong>People:</strong> The other top 10 
website have thousands of employees. We have fewer than 100, making your 
donation a great investment in a highly-efficient not-for-profit 
organization.</p>
@@ -342,7 +342,7 @@
                                if ( validate_cc() ){
                                        // set the hidden expiration date input 
from the two selects
                                        $('input[name="expiration"]').val(
-                                               $("select[name=mos]").val() + 
$('select[name="year"]').val().substring(2,4)
+                                               $('select[name="mos"]').val() + 
$('select[name="year"]').val().substring(2,4)
                                        );
                                        document.paypalcontribution.action = 
"@action";
                                        document.paypalcontribution.submit();
@@ -412,7 +412,7 @@
                 });
                 // set the hidden amount input to the value of the selected 
element
                            function setAmount(e){
-                    $("input[name=amount]").val( e.val() );
+                    $('input[name="amount"]').val( e.val() );
                 }
                            
                            // show the CVV help image on click


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to