1 /* JavaScript for Special:RecentChanges */
4 var checkboxes
= [ 'nsassociated', 'nsinvert' ];
6 mw
.special
.recentchanges
= {
17 $( 'select#namespace' )
18 .change( rc
.updateCheckboxes
)
19 // Trigger once set the initial statuses of the checkboxes.
24 * Handler to disable/enable the namespace selector checkboxes when the
25 * special 'all' namespace is selected/unselected respectively.
27 updateCheckboxes: function() {
28 // The 'all' namespace is the FIRST in the list.
29 var isAllNS
= mw
.special
.recentchanges
.$select
.find( 'option' ).first().is( ':selected' );
31 // Iterates over checkboxes and propagate the selected option
32 $.map( checkboxes
, function( id
) {
33 $( '#'+id
).attr( 'disabled', isAllNS
);
38 mw
.special
.recentchanges
.init();