Merge "Make the XML dump schema version configurable."
[lhc/web/wiklou.git] / resources / src / mediawiki.special.recentchanges.js
index 29c0fea..310832d 100644 (file)
@@ -1,7 +1,7 @@
 /*!
  * JavaScript for Special:RecentChanges
  */
-( function ( mw, $ ) {
+( function () {
        var rc, $checkboxes, $select;
 
        /**
@@ -10,7 +10,7 @@
         */
        rc = {
                /**
-                * Handler to disable/enable the namespace selector checkboxes when the
+                * Handler to hide/show the namespace selector checkboxes when the
                 * special 'all' namespace is selected/unselected respectively.
                 */
                updateCheckboxes: function () {
                        var isAllNS = $select.val() === '';
 
                        // Iterates over checkboxes and propagate the selected option
-                       $checkboxes.prop( 'disabled', isAllNS );
+                       $checkboxes.toggleClass( 'mw-input-hidden', isAllNS );
                },
 
                init: function () {
                        $select = $( '#namespace' );
-                       $checkboxes = $( '#nsassociated, #nsinvert' );
+                       $checkboxes = $( '#nsassociated, #nsinvert' ).closest( '.mw-input-with-label' );
 
-                       // Bind to change event, and trigger once to set the initial state of the checkboxes.
-                       rc.updateCheckboxes();
-                       $select.change( rc.updateCheckboxes );
+                       // Bind to change event of the checkboxes.
+                       // The initial state is already set in HTML.
+                       $select.on( 'change', rc.updateCheckboxes );
                }
        };
 
@@ -35,4 +35,4 @@
 
        module.exports = rc;
 
-}( mediaWiki, jQuery ) );
+}() );