Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects_2_3step.js |
— | — | @@ -72,13 +72,7 @@ |
73 | 73 | $( 'input#other-amount' ).val( previousAmount ); |
74 | 74 | } |
75 | 75 | } |
76 | | - // For when people switch back to Other from another value |
77 | | - $( '#input_amount_other' ).click( function() { |
78 | | - var otherAmount = $( 'input#other-amount' ).val(); |
79 | | - if ( otherAmount ) { |
80 | | - setAmount( $( 'input#other-amount' ) ); |
81 | | - } |
82 | | - } ); |
| 76 | + |
83 | 77 | $( "#cc" ).click( function() { |
84 | 78 | /* safety check for people who hit the back button */ |
85 | 79 | checkedValue = $( "input[name='amountRadio']:checked" ).val(); |
— | — | @@ -148,6 +142,14 @@ |
149 | 143 | displayCreditCardForm(); |
150 | 144 | } |
151 | 145 | } ); |
| 146 | + |
| 147 | + // For when people switch back to Other from another value |
| 148 | + $( '#input_amount_other' ).click( function() { |
| 149 | + var otherAmount = $( 'input#other-amount' ).val(); |
| 150 | + if ( otherAmount ) { |
| 151 | + setAmount( $( 'input#other-amount' ) ); |
| 152 | + } |
| 153 | + } ); |
152 | 154 | // Set selected amount to amount |
153 | 155 | $( 'input[name="amountRadio"]' ).click( function() { |
154 | 156 | if ( !isNaN( $( this ).val() ) ) { |
— | — | @@ -156,7 +158,9 @@ |
157 | 159 | } ); |
158 | 160 | // reset the amount field when "other" is changed |
159 | 161 | $( "#other-amount" ).keyup( function() { |
160 | | - setAmount( $( this ) ); |
| 162 | + if ( $( '#input_amount_other' ).is(':checked') ) { |
| 163 | + setAmount( $( this ) ); |
| 164 | + } |
161 | 165 | } ); |
162 | 166 | |
163 | 167 | // show the CVV help image on click |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects.bt.js |
— | — | @@ -57,13 +57,24 @@ |
58 | 58 | showAmount( $( 'input[name="amount"]' ) ); |
59 | 59 | } |
60 | 60 | |
| 61 | + // For when people switch back to Other from another value |
| 62 | + $( '#input_amount_other' ).click( function() { |
| 63 | + var otherAmount = $( 'input#other-amount' ).val(); |
| 64 | + if ( otherAmount ) { |
| 65 | + setAmount( $( 'input#other-amount' ) ); |
| 66 | + } |
| 67 | + } ); |
61 | 68 | // Set selected amount to amount |
62 | 69 | $( 'input[name="amountRadio"]' ).click( function() { |
63 | | - setAmount( $( this ) ); |
| 70 | + if ( !isNaN( $( this ).val() ) ) { |
| 71 | + setAmount( $( this ) ); |
| 72 | + } |
64 | 73 | } ); |
65 | 74 | // reset the amount field when "other" is changed |
66 | | - $( "#other-amount" ).change( function() { |
67 | | - setAmount( $( this ) ); |
| 75 | + $( "#other-amount" ).keyup( function() { |
| 76 | + if ( $( '#input_amount_other' ).is(':checked') ) { |
| 77 | + setAmount( $( this ) ); |
| 78 | + } |
68 | 79 | } ); |
69 | 80 | |
70 | 81 | $( "#step1header" ).click( function() { |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects2nd.js |
— | — | @@ -83,18 +83,30 @@ |
84 | 84 | showAmount( $( 'input[name="amount"]' ) ); |
85 | 85 | } |
86 | 86 | |
| 87 | + // For when people switch back to Other from another value |
| 88 | + $( '#input_amount_other' ).click( function() { |
| 89 | + var otherAmount = $( 'input#other-amount' ).val(); |
| 90 | + if ( otherAmount ) { |
| 91 | + setAmount( $( 'input#other-amount' ) ); |
| 92 | + } |
| 93 | + } ); |
87 | 94 | // Set selected amount to amount |
88 | 95 | $( 'input[name="amountRadio"]' ).click( function() { |
89 | | - setAmount( $( this ) ); |
| 96 | + if ( !isNaN( $( this ).val() ) ) { |
| 97 | + setAmount( $( this ) ); |
| 98 | + } |
90 | 99 | } ); |
91 | 100 | // reset the amount field when "other" is changed |
92 | | - $( "#other-amount" ).change( function() { |
93 | | - setAmount( $( this ) ); |
| 101 | + $( "#other-amount" ).keyup( function() { |
| 102 | + if ( $( '#input_amount_other' ).is(':checked') ) { |
| 103 | + setAmount( $( this ) ); |
| 104 | + } |
94 | 105 | } ); |
95 | 106 | |
96 | 107 | $( "#step1header" ).click( function() { |
97 | 108 | // show the correct sections |
98 | 109 | $( "#step1wrapper" ).slideDown(); |
| 110 | + $( "#step2wrapper" ).slideDown(); |
99 | 111 | $( "#step3wrapper" ).slideUp(); |
100 | 112 | $( "#change-amount" ).hide(); |
101 | 113 | } ); |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects2nd-US.js |
— | — | @@ -82,19 +82,31 @@ |
83 | 83 | } else { |
84 | 84 | showAmount( $( 'input[name="amount"]' ) ); |
85 | 85 | } |
86 | | - |
| 86 | + |
| 87 | + // For when people switch back to Other from another value |
| 88 | + $( '#input_amount_other' ).click( function() { |
| 89 | + var otherAmount = $( 'input#other-amount' ).val(); |
| 90 | + if ( otherAmount ) { |
| 91 | + setAmount( $( 'input#other-amount' ) ); |
| 92 | + } |
| 93 | + } ); |
87 | 94 | // Set selected amount to amount |
88 | 95 | $( 'input[name="amountRadio"]' ).click( function() { |
89 | | - setAmount( $( this ) ); |
| 96 | + if ( !isNaN( $( this ).val() ) ) { |
| 97 | + setAmount( $( this ) ); |
| 98 | + } |
90 | 99 | } ); |
91 | 100 | // reset the amount field when "other" is changed |
92 | | - $( "#other-amount" ).change( function() { |
93 | | - setAmount( $( this ) ); |
| 101 | + $( "#other-amount" ).keyup( function() { |
| 102 | + if ( $( '#input_amount_other' ).is(':checked') ) { |
| 103 | + setAmount( $( this ) ); |
| 104 | + } |
94 | 105 | } ); |
95 | 106 | |
96 | 107 | $( "#step1header" ).click( function() { |
97 | 108 | // show the correct sections |
98 | 109 | $( "#step1wrapper" ).slideDown(); |
| 110 | + $( "#step2wrapper" ).slideDown(); |
99 | 111 | $( "#step3wrapper" ).slideUp(); |
100 | 112 | $( "#change-amount" ).hide(); |
101 | 113 | } ); |
Property changes on: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface |
___________________________________________________________________ |
Modified: svn:mergeinfo |
102 | 114 | Merged /trunk/extensions/DonationInterface:r103067 |