X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=mw-config%2Fconfig.js;h=acb9664aee1cbe01c56d225a8924cafbd3e4900a;hp=8b2d6e5ab466c7087574a028cafc433d5f122421;hb=445622563fa96719542cdcf6d781e2a8fe8f4e5e;hpb=8ab6c38d4f03986cd4b581a93d6402371f4cf801 diff --git a/mw-config/config.js b/mw-config/config.js index 8b2d6e5ab4..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' ); }