2 * JavaScript for Special:RecentChanges
5 var rc, $checkboxes, $select;
8 * @class mw.special.recentchanges
13 * Handler to disable/enable the namespace selector checkboxes when the
14 * special 'all' namespace is selected/unselected respectively.
16 updateCheckboxes: function () {
17 // The option element for the 'all' namespace has an empty value
18 var isAllNS = $select.val() === '';
20 // Iterates over checkboxes and propagate the selected option
21 $checkboxes.prop( 'disabled', isAllNS );
25 $select = $( '#namespace' );
26 $checkboxes = $( '#nsassociated, #nsinvert' );
28 // Bind to change event, and trigger once to set the initial state of the checkboxes.
29 rc.updateCheckboxes();
30 $select.change( rc.updateCheckboxes );
38 }( mediaWiki, jQuery ) );