X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki.special.recentchanges.js;h=310832defb8419bed5c7c39da26f21791046531f;hb=09e7569e9d5d277bbc44d3a45a0f573ae66808a4;hp=88858834a71e0435ff6c693db64f54c776c7a84b;hpb=0601f359eb5fb2bf9ea28a4277d8f20c3e66a248;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/mediawiki.special.recentchanges.js b/resources/src/mediawiki.special.recentchanges.js index 88858834a7..310832defb 100644 --- a/resources/src/mediawiki.special.recentchanges.js +++ b/resources/src/mediawiki.special.recentchanges.js @@ -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 () { @@ -18,15 +18,15 @@ 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(); + // Bind to change event of the checkboxes. + // The initial state is already set in HTML. $select.on( 'change', rc.updateCheckboxes ); } };