dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add structure test to ensure PSR-4 autoloader covers everything
[lhc/web/wiklou.git]
/
mw-config
/
config.js
diff --git
a/mw-config/config.js
b/mw-config/config.js
index
ab57b7b
..
99290f4
100644
(file)
--- a/
mw-config/config.js
+++ b/
mw-config/config.js
@@
-73,7
+73,9
@@
// Hide "other" textboxes by default
// Should not be done in CSS for javascript disabled compatibility
// Hide "other" textboxes by default
// Should not be done in CSS for javascript disabled compatibility
- $( '.enabledByOther' ).closest( '.config-block' ).hide();
+ if ( !$( '#config__NamespaceType_other' ).is( ':checked' ) ) {
+ $( '.enabledByOther' ).closest( '.config-block' ).hide();
+ }
// Enable/disable "other" textboxes
$( '.enableForOther' ).click( function () {
// Enable/disable "other" textboxes
$( '.enableForOther' ).click( function () {
@@
-87,7
+89,7
@@
} );
// Synchronize radio button label for sitename with textbox
} );
// 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 );
labelText = $label.text();
$label.text( labelText.replace( '$1', '' ) );
$( '#config_wgSitename' ).on( 'keyup change', syncText ).each( syncText );
@@
-132,19
+134,16
@@
// Disable checkboxes if the extension has dependencies
$( '.mw-ext-with-dependencies input' ).prop( 'disabled', true );
// 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 () {
$( '.mw-ext-with-dependencies input' ).each( function () {
- var $this = $( this ),
- name = $this.data( 'name' );
+ var name = this.getAttribute( 'data-name' );
if ( areReqsSatisfied( name ) ) {
if ( areReqsSatisfied( name ) ) {
- //
Un-dis
able it!
-
$this.prop( 'disabled', false )
;
+ //
Re-en
able it!
+
this.disabled = false
;
} else {
} 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;
}
} );
} );
}
} );
} );