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