r53085 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53084‎ | r53085 | r53086 >
Date:23:01, 10 July 2009
Author:catrope
Status:deferred
Tags:
Comment:
OptIn: Fix animation for other reason textbox
Modified paths:
  • /trunk/extensions/UsabilityInitiative/OptIn/OptIn.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/OptIn/OptIn.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/OptIn/SpecialOptIn.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/OptIn/OptIn.php
@@ -28,7 +28,7 @@
2929 $wgOptInAlwaysShowPersonalLink = false;
3030 $wgOptInNeverShowPersonalLink = false;
3131
32 -$wgOptInStyleVersion = 4;
 32+$wgOptInStyleVersion = 5;
3333
3434 // Preferences to set when users opt in
3535 // array( prefname => value )
Index: trunk/extensions/UsabilityInitiative/OptIn/SpecialOptIn.php
@@ -240,15 +240,16 @@
241241 );
242242 }
243243 $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+ )
253254 )
254255 );
255256 }
Index: trunk/extensions/UsabilityInitiative/OptIn/OptIn.js
@@ -1,12 +1,12 @@
22 /* JavaScript for OptIn extension */
33
44 $( document ).ready( function() {
5 - $( '.optin-other-select' ).hide();
 5+ $( '.optin-other-select' ).parent().hide();
66 $( 'select.optin-need-other' ).change( function() {
77 if( $(this).val() == 'other' )
8 - $( '#' + $(this).attr( 'id' ) + '-other' ).slideDown( 'fast' );
 8+ $( '#' + $(this).attr( 'id' ) + '-other' ).parent().slideDown( 'fast' );
99 else
10 - $( '#' + $(this).attr( 'id' ) + '-other' ).slideUp( 'fast' );
 10+ $( '#' + $(this).attr( 'id' ) + '-other' ).parent().slideUp( 'fast' );
1111 });
1212
1313 $( '.optin-other-radios, .optin-other-checks' ).click( function() {

Status & tagging log