Index: branches/new-installer/phase3/skins/common/config.js |
— | — | @@ -16,6 +16,8 @@ |
17 | 17 | |
18 | 18 | // Show/hide code for DB-specific options |
19 | 19 | // FIXME: Do we want slow, fast, or even non-animated (instantaneous) showing/hiding here? |
| 20 | + $( '.dbRadio' ).each( function() { $( '#' + $(this).attr( 'rel' ) ).hide(); } ); |
| 21 | + $( '#' + $( '.dbRadio:checked' ).attr( 'rel' ) ).show(); |
20 | 22 | $( '.dbRadio' ).click( function() { |
21 | 23 | var $checked = $( '.dbRadio:checked' ); |
22 | 24 | var $wrapper = $( '#' + $checked.attr( 'rel' ) ); |
— | — | @@ -59,10 +61,9 @@ |
60 | 62 | $label = $( 'label[for=config__NamespaceType_site-name]' ); |
61 | 63 | labelText = $label.text(); |
62 | 64 | $label.text( labelText.replace( '$1', '' ) ); |
63 | | - $( '#config_wgSitename' ).bind( 'keyup change', function() { sync( $(this) ); } ); |
64 | | - sync( $( '#config_wgSitename' ) ); |
65 | | - function sync( $e ) { |
66 | | - var value = $e.val() |
| 65 | + $( '#config_wgSitename' ).bind( 'keyup change', syncText ).each( syncText ); |
| 66 | + function syncText() { |
| 67 | + var value = $(this).val() |
67 | 68 | .replace( /[\[\]\{\}|#<>%+? ]/g, '_' ) |
68 | 69 | .replace( /&/, '&' ) |
69 | 70 | .replace( /__+/g, '_' ) |