[JobQueue] Added missing delete query.
[mediawiki.git] / resources / mediawiki.special / mediawiki.special.recentchanges.js
blob3cba9d3972e650da5f31736042519bb84c6dc7bf
1 /**
2 * JavaScript for Special:RecentChanges
3 */
4 ( function ( mw, $ ) {
5 var rc,
6 $checkboxes,
7 $select;
9 rc = {
11 /**
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 );
23 init: function () {
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 );
33 $( rc.init );
35 mw.special.recentchanges = rc;
37 }( mediaWiki, jQuery ) );