X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28%27user_edit%27%2C%20userid=session.user.id%29%20%7D%7D?a=blobdiff_plain;f=mw-config%2Fconfig.js;h=bb62067e2ef9c544bf38d97c106ca735b442183c;hb=05eb49e989a8e9ddda4dbfb049b6542933bc2c90;hp=ab57b7b859fc5ef13fe7911b469e6c522f3e2348;hpb=78bacc65702dccd57ea495c5e1115457edb50e2b;p=lhc%2Fweb%2Fwiklou.git diff --git a/mw-config/config.js b/mw-config/config.js index ab57b7b859..bb62067e2e 100644 --- a/mw-config/config.js +++ b/mw-config/config.js @@ -87,7 +87,7 @@ } ); // Synchronize radio button label for sitename with textbox - $label = $( 'label[for=config__NamespaceType_site-name]' ); + $label = $( 'label[for="config__NamespaceType_site-name"]' ); labelText = $label.text(); $label.text( labelText.replace( '$1', '' ) ); $( '#config_wgSitename' ).on( 'keyup change', syncText ).each( syncText ); @@ -132,19 +132,16 @@ // Disable checkboxes if the extension has dependencies $( '.mw-ext-with-dependencies input' ).prop( 'disabled', true ); - $( 'input[data-name]' ).change( function () { + $( '.config-ext-input[data-name]' ).on( 'change', function () { $( '.mw-ext-with-dependencies input' ).each( function () { - var $this = $( this ), - name = $this.data( 'name' ); + var name = this.getAttribute( 'data-name' ); if ( areReqsSatisfied( name ) ) { - // Un-disable it! - $this.prop( 'disabled', false ); + // Re-enable it! + this.disabled = false; } else { - // Disable the checkbox, and uncheck it if it is checked - $this.prop( 'disabled', true ); - if ( $this.prop( 'checked' ) ) { - $this.prop( 'checked', false ); - } + // Uncheck and disable the checkbox + this.checked = false; + this.disabled = true; } } ); } );