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