Index: trunk/extensions/UsabilityInitiative/OptIn/OptIn.php |
— | — | @@ -28,7 +28,7 @@ |
29 | 29 | $wgOptInAlwaysShowPersonalLink = false; |
30 | 30 | $wgOptInNeverShowPersonalLink = false; |
31 | 31 | |
32 | | -$wgOptInStyleVersion = 4; |
| 32 | +$wgOptInStyleVersion = 5; |
33 | 33 | |
34 | 34 | // Preferences to set when users opt in |
35 | 35 | // array( prefname => value ) |
Index: trunk/extensions/UsabilityInitiative/OptIn/SpecialOptIn.php |
— | — | @@ -240,15 +240,16 @@ |
241 | 241 | ); |
242 | 242 | } |
243 | 243 | $retval .= Xml::closeElement( 'select' ); |
244 | | - if ( isset( $question['other'] ) ) { |
245 | | - $retval .= ' '; |
246 | | - $retval .= Xml::input( |
247 | | - "survey-$id-other", |
248 | | - false, |
249 | | - false, |
250 | | - array( |
251 | | - 'class' => 'optin-other-select', |
252 | | - 'id' => "survey-$id-other" |
| 244 | + if ( isset( $question['other'] ) ) {; |
| 245 | + $retval .= Xml::tags( 'div', array(), |
| 246 | + Xml::input( |
| 247 | + "survey-$id-other", |
| 248 | + false, |
| 249 | + false, |
| 250 | + array( |
| 251 | + 'class' => 'optin-other-select', |
| 252 | + 'id' => "survey-$id-other" |
| 253 | + ) |
253 | 254 | ) |
254 | 255 | ); |
255 | 256 | } |
Index: trunk/extensions/UsabilityInitiative/OptIn/OptIn.js |
— | — | @@ -1,12 +1,12 @@ |
2 | 2 | /* JavaScript for OptIn extension */ |
3 | 3 | |
4 | 4 | $( document ).ready( function() { |
5 | | - $( '.optin-other-select' ).hide(); |
| 5 | + $( '.optin-other-select' ).parent().hide(); |
6 | 6 | $( 'select.optin-need-other' ).change( function() { |
7 | 7 | if( $(this).val() == 'other' ) |
8 | | - $( '#' + $(this).attr( 'id' ) + '-other' ).slideDown( 'fast' ); |
| 8 | + $( '#' + $(this).attr( 'id' ) + '-other' ).parent().slideDown( 'fast' ); |
9 | 9 | else |
10 | | - $( '#' + $(this).attr( 'id' ) + '-other' ).slideUp( 'fast' ); |
| 10 | + $( '#' + $(this).attr( 'id' ) + '-other' ).parent().slideUp( 'fast' ); |
11 | 11 | }); |
12 | 12 | |
13 | 13 | $( '.optin-other-radios, .optin-other-checks' ).click( function() { |