Remove search preferences from Special:Preferences JavaScript
authorsaper <saper@saper.info>
Sat, 31 Oct 2015 20:15:05 +0000 (21:15 +0100)
committersaper <saper@saper.info>
Sat, 31 Oct 2015 20:26:27 +0000 (21:26 +0100)
Search preferences are now handled by Special:Search, not
by Special:Preferences

Bug: T54817
Change-Id: I8faabbed190a46397b35f630c031fc1b4bb6e3e1

resources/src/mediawiki.special/mediawiki.special.preferences.js

index 0fda3dc..9ab47b3 100644 (file)
@@ -6,8 +6,7 @@
                var $preftoc, $preferences, $fieldsets, $legends,
                        hash, labelFunc,
                        $tzSelect, $tzTextbox, $localtimeHolder, servertime,
-                       $checkBoxes, allowCloseWindow,
-                       notif;
+                       allowCloseWindow, notif;
 
                labelFunc = function () {
                        return this.id.replace( /^mw-prefsection/g, 'preftab' );
                        } );
                }
 
-               // To disable all 'namespace' checkboxes in Search preferences
-               // when 'Search in all namespaces' checkbox is ticked.
-               $checkBoxes = $( '#mw-htmlform-advancedsearchoptions input[id^=mw-input-wpsearchnamespaces]' );
-               if ( $( '#mw-input-wpsearcheverything' ).prop( 'checked' ) ) {
-                       $checkBoxes.prop( 'disabled', true );
-               }
-               $( '#mw-input-wpsearcheverything' ).change( function () {
-                       $checkBoxes.prop( 'disabled', $( this ).prop( 'checked' ) );
-               } );
-
                // Set up a message to notify users if they try to leave the page without
                // saving.
                $( '#mw-prefs-form' ).data( 'origdata', $( '#mw-prefs-form' ).serialize() );