Improved on r74282 and r74333 in response to CR comments.
authorTrevor Parscal <tparscal@users.mediawiki.org>
Wed, 6 Oct 2010 19:05:59 +0000 (19:05 +0000)
committerTrevor Parscal <tparscal@users.mediawiki.org>
Wed, 6 Oct 2010 19:05:59 +0000 (19:05 +0000)
resources/jquery/jquery.placeholder.js
resources/mediawiki/mediawiki.specials.preferences.js

index 407b1a9..f445224 100644 (file)
@@ -16,7 +16,7 @@ jQuery.fn.placeholder = function( text ) {
        // Otherwise, use a combination of blur and focus event handlers and a placeholder class
        else {
                jQuery(this).each( function() {
-                       $input = jQuery(this);
+                       var $input = jQuery(this);
                        $input
                                // Show on blur if empty
                                .bind( 'blur', function() {
index 9122a11..e6760fc 100644 (file)
@@ -2,14 +2,14 @@
  * JavaScript for Special:Preferences
  */
 
-$( '#prefsubmit' ).attr( 'id', 'prefcontrol' ).end()
+$( '#prefsubmit' ).attr( 'id', 'prefcontrol' );
 $( '#preferences' )
        .addClass( 'jsprefs' )
        .before( $( '<ul id="preftoc"></ul>' ) )
-       .find( '> fieldset' )
+       .children( 'fieldset' )
        .hide()
        .addClass( 'prefsection' )
-       .find( '> legend' )
+       .children( 'legend' )
        .addClass( 'mainLegend' )
        .each( function( i ) {
                $(this).parent().attr( 'id', 'prefsection-' + i );