Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects_2_3step.js |
— | — | @@ -158,10 +158,18 @@ |
159 | 159 | } ); |
160 | 160 | // reset the amount field when "other" is changed |
161 | 161 | $( "#other-amount" ).keyup( function() { |
162 | | - if ( $( '#input_amount_other' ).is(':checked') ) { |
| 162 | + if ( $( '#input_amount_other' ).is( ':checked' ) ) { |
163 | 163 | setAmount( $( this ) ); |
164 | 164 | } |
165 | 165 | } ); |
| 166 | + // change the amount when "other" is focused |
| 167 | + $( "#other-amount" ).focus( function() { |
| 168 | + $( '#input_amount_other' ).attr( 'checked', true ); |
| 169 | + var otherAmount = $( 'input#other-amount' ).val(); |
| 170 | + if ( otherAmount && !isNaN( otherAmount ) ) { |
| 171 | + setAmount( $( 'input#other-amount' ) ); |
| 172 | + } |
| 173 | + } ); |
166 | 174 | |
167 | 175 | // show the CVV help image on click |
168 | 176 | $( "#where" ).click( function() { |
Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects.bt.js |
— | — | @@ -72,10 +72,18 @@ |
73 | 73 | } ); |
74 | 74 | // reset the amount field when "other" is changed |
75 | 75 | $( "#other-amount" ).keyup( function() { |
76 | | - if ( $( '#input_amount_other' ).is(':checked') ) { |
| 76 | + if ( $( '#input_amount_other' ).is( ':checked' ) ) { |
77 | 77 | setAmount( $( this ) ); |
78 | 78 | } |
79 | 79 | } ); |
| 80 | + // change the amount when "other" is focused |
| 81 | + $( "#other-amount" ).focus( function() { |
| 82 | + $( '#input_amount_other' ).attr( 'checked', true ); |
| 83 | + var otherAmount = $( 'input#other-amount' ).val(); |
| 84 | + if ( otherAmount && !isNaN( otherAmount ) ) { |
| 85 | + setAmount( $( 'input#other-amount' ) ); |
| 86 | + } |
| 87 | + } ); |
80 | 88 | |
81 | 89 | $( "#step1header" ).click( function() { |
82 | 90 | $( "#step1wrapper" ).slideDown(); |
Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects2nd.js |
— | — | @@ -106,10 +106,18 @@ |
107 | 107 | } ); |
108 | 108 | // reset the amount field when "other" is changed |
109 | 109 | $( "#other-amount" ).keyup( function() { |
110 | | - if ( $( '#input_amount_other' ).is(':checked') ) { |
| 110 | + if ( $( '#input_amount_other' ).is( ':checked' ) ) { |
111 | 111 | setAmount( $( this ) ); |
112 | 112 | } |
113 | 113 | } ); |
| 114 | + // change the amount when "other" is focused |
| 115 | + $( "#other-amount" ).focus( function() { |
| 116 | + $( '#input_amount_other' ).attr( 'checked', true ); |
| 117 | + var otherAmount = $( 'input#other-amount' ).val(); |
| 118 | + if ( otherAmount && !isNaN( otherAmount ) ) { |
| 119 | + setAmount( $( 'input#other-amount' ) ); |
| 120 | + } |
| 121 | + } ); |
114 | 122 | |
115 | 123 | $( "#step1header" ).click( function() { |
116 | 124 | // show the correct sections |
Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects2nd-US.js |
— | — | @@ -98,10 +98,18 @@ |
99 | 99 | } ); |
100 | 100 | // reset the amount field when "other" is changed |
101 | 101 | $( "#other-amount" ).keyup( function() { |
102 | | - if ( $( '#input_amount_other' ).is(':checked') ) { |
| 102 | + if ( $( '#input_amount_other' ).is( ':checked' ) ) { |
103 | 103 | setAmount( $( this ) ); |
104 | 104 | } |
105 | 105 | } ); |
| 106 | + // change the amount when "other" is focused |
| 107 | + $( "#other-amount" ).focus( function() { |
| 108 | + $( '#input_amount_other' ).attr( 'checked', true ); |
| 109 | + var otherAmount = $( 'input#other-amount' ).val(); |
| 110 | + if ( otherAmount && !isNaN( otherAmount ) ) { |
| 111 | + setAmount( $( 'input#other-amount' ) ); |
| 112 | + } |
| 113 | + } ); |
106 | 114 | |
107 | 115 | $( "#step1header" ).click( function() { |
108 | 116 | // show the correct sections |