X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/fiche.php?a=blobdiff_plain;f=mw-config%2Fconfig.js;h=acb9664aee1cbe01c56d225a8924cafbd3e4900a;hb=9b00306abe57ff7b9f92728c664e60a29eb1791b;hp=fb637f79067f06ba9028c0d82145360228f095e9;hpb=10973705e0429fc6d909c4995f55179381c906b7;p=lhc%2Fweb%2Fwiklou.git diff --git a/mw-config/config.js b/mw-config/config.js index fb637f7906..acb9664aee 100644 --- a/mw-config/config.js +++ b/mw-config/config.js @@ -4,7 +4,7 @@ function syncText() { var value = $( this ).val() - .replace( /[\[\]\{\}|#<>%+? ]/g, '_' ) + .replace( /[\[\]{}|#<>%+? ]/g, '_' ) // eslint-disable-line no-useless-escape .replace( /&/, '&' ) .replace( /__+/g, '_' ) .replace( /^_+/, '' ) @@ -14,17 +14,13 @@ } // Set up the help system - $( '.config-help-field-data' ) - .hide() - .closest( '.config-help-field-container' ) - .find( '.config-help-field-hint' ) - .show() - .click( function () { - $( this ) - .closest( '.config-help-field-container' ) - .find( '.config-help-field-data' ) - .slideToggle( 'fast' ); - } ); + $( '.config-help-field-data' ).hide() + .closest( '.config-help-field-container' ).find( '.config-help-field-hint' ) + .show() + .click( function () { + $( this ).closest( '.config-help-field-container' ).find( '.config-help-field-data' ) + .slideToggle( 'fast' ); + } ); // Show/hide code for DB-specific options // FIXME: Do we want slow, fast, or even non-animated (instantaneous) showing/hiding here? @@ -83,7 +79,7 @@ var $textbox = $( document.getElementById( $( this ).attr( 'rel' ) ) ); // FIXME: Ugh, this is ugly if ( $( this ).val() === 'other' ) { - $textbox.removeProp( 'readonly' ).closest( '.config-block' ).slideDown( 'fast' ); + $textbox.prop( 'readonly', false ).closest( '.config-block' ).slideDown( 'fast' ); } else { $textbox.prop( 'readonly', true ).closest( '.config-block' ).slideUp( 'fast' ); } @@ -96,9 +92,9 @@ $( '#config_wgSitename' ).on( 'keyup change', syncText ).each( syncText ); // Show/Hide memcached servers when needed - $( 'input[name$="config_wgMainCacheType"]' ).change( function () { + $( 'input[name$="config__MainCacheType"]' ).change( function () { var $memc = $( '#config-memcachewrapper' ); - if ( $( 'input[name$="config_wgMainCacheType"]:checked' ).val() === 'memcached' ) { + if ( $( 'input[name$="config__MainCacheType"]:checked' ).val() === 'memcached' ) { $memc.show( 'slow' ); } else { $memc.hide( 'slow' );