diff options
author | Ed Sanders <esanders@wikimedia.org> | 2019-01-08 17:40:11 +0000 |
---|---|---|
committer | Ed Sanders <esanders@wikimedia.org> | 2019-01-08 17:40:11 +0000 |
commit | b3e490bba67117ceb86d6e18c15039d65701a832 (patch) | |
tree | 93e692c6d416d3b7359ff17a2816aa2cc713bf36 /mw-config | |
parent | 8c7b635162123ef8328da309b62795d07c17fff6 (diff) | |
download | mediawikicore-b3e490bba67117ceb86d6e18c15039d65701a832.tar.gz mediawikicore-b3e490bba67117ceb86d6e18c15039d65701a832.zip |
build: Update eslint-config-wikimedia to 0.10.0
Change-Id: I2930bcabeeb7b7b2eb36063e77b26e664a691b43
Diffstat (limited to 'mw-config')
-rw-r--r-- | mw-config/config.js | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/mw-config/config.js b/mw-config/config.js index 74bdcf85b1e2..b0c5c4c83a87 100644 --- a/mw-config/config.js +++ b/mw-config/config.js @@ -18,7 +18,9 @@ $( '.config-help-field-data' ).hide() .closest( '.config-help-field-container' ).find( '.config-help-field-hint' ) .show() - .click( function () { + .on( 'click', function () { + // FIXME: Use CSS transition + // eslint-disable-next-line jquery/no-slide $( this ).closest( '.config-help-field-container' ).find( '.config-help-field-data' ) .slideToggle( 'fast' ); } ); @@ -29,11 +31,14 @@ $( document.getElementById( $( this ).attr( 'rel' ) ) ).hide(); } ); $( document.getElementById( $( '.dbRadio:checked' ).attr( 'rel' ) ) ).show(); - $( '.dbRadio' ).click( function () { + $( '.dbRadio' ).on( 'click', function () { var $checked = $( '.dbRadio:checked' ), $wrapper = $( document.getElementById( $checked.attr( 'rel' ) ) ); if ( $wrapper.is( ':hidden' ) ) { + // FIXME: Use CSS transition + // eslint-disable-next-line jquery/no-animate-toggle $( '.dbWrapper' ).hide( 'slow' ); + // eslint-disable-next-line jquery/no-animate-toggle $wrapper.show( 'slow' ); } } ); @@ -44,29 +49,38 @@ } ); // Show/hide Creative Commons thingy - $( '.licenseRadio' ).click( function () { + $( '.licenseRadio' ).on( 'click', function () { var $wrapper = $( '#config-cc-wrapper' ); if ( $( '#config__LicenseCode_cc-choose' ).is( ':checked' ) ) { + // FIXME: Use CSS transition + // eslint-disable-next-line jquery/no-animate-toggle $wrapper.show( 'slow' ); } else { + // eslint-disable-next-line jquery/no-animate-toggle $wrapper.hide( 'slow' ); } } ); // Show/hide random stuff (email, upload) - $( '.showHideRadio' ).click( function () { + $( '.showHideRadio' ).on( 'click', function () { var $wrapper = $( '#' + $( this ).attr( 'rel' ) ); if ( $( this ).is( ':checked' ) ) { + // FIXME: Use CSS transition + // eslint-disable-next-line jquery/no-animate-toggle $wrapper.show( 'slow' ); } else { + // eslint-disable-next-line jquery/no-animate-toggle $wrapper.hide( 'slow' ); } } ); - $( '.hideShowRadio' ).click( function () { + $( '.hideShowRadio' ).on( 'click', function () { var $wrapper = $( '#' + $( this ).attr( 'rel' ) ); if ( $( this ).is( ':checked' ) ) { + // FIXME: Use CSS transition + // eslint-disable-next-line jquery/no-animate-toggle $wrapper.hide( 'slow' ); } else { + // eslint-disable-next-line jquery/no-animate-toggle $wrapper.show( 'slow' ); } } ); @@ -78,12 +92,15 @@ } // Enable/disable "other" textboxes - $( '.enableForOther' ).click( function () { + $( '.enableForOther' ).on( 'click', function () { var $textbox = $( document.getElementById( $( this ).attr( 'rel' ) ) ); // FIXME: Ugh, this is ugly if ( $( this ).val() === 'other' ) { + // FIXME: Use CSS transition + // eslint-disable-next-line jquery/no-slide $textbox.prop( 'readonly', false ).closest( '.config-block' ).slideDown( 'fast' ); } else { + // eslint-disable-next-line jquery/no-slide $textbox.prop( 'readonly', true ).closest( '.config-block' ).slideUp( 'fast' ); } } ); @@ -95,11 +112,14 @@ $( '#config_wgSitename' ).on( 'keyup change', syncText ).each( syncText ); // Show/Hide memcached servers when needed - $( 'input[name$="config__MainCacheType"]' ).change( function () { + $( 'input[name$="config__MainCacheType"]' ).on( 'change', function () { var $memc = $( '#config-memcachewrapper' ); if ( $( 'input[name$="config__MainCacheType"]:checked' ).val() === 'memcached' ) { + // FIXME: Use CSS transition + // eslint-disable-next-line jquery/no-animate-toggle $memc.show( 'slow' ); } else { + // eslint-disable-next-line jquery/no-animate-toggle $memc.hide( 'slow' ); } } ); |