(function( $ ) {
$( document ).ready( function() {
- // Show/hide code for help text
- $( '.config-show-help a' ).click( function() {
- $(this).parent().siblings( '.config-help-message' ).show( 'slow' );
- $(this).parent().siblings( '.config-hide-help' ).show();
- $(this).parent().hide();
- return false;
- } );
- $( '.config-hide-help a' ).click( function() {
- $(this).parent().siblings( '.config-help-message' ).hide( 'slow' );
- $(this).parent().siblings( '.config-show-help' ).show();
- $(this).parent().hide();
- return false;
- } );
+
+
+ // Set up the help system
+ $( '.mw-help-field-data' )
+ .hide()
+ .closest( '.mw-help-field-container' )
+ .find( '.mw-help-field-hint' )
+ .show()
+ .click( function() {
+ $(this)
+ .closest( '.mw-help-field-container' )
+ .find( '.mw-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?
} );
// Scroll to the bottom of upgrade log
- $( "#config-update-log" ).each( function() { this.scrollTop = this.scrollHeight; } );
+ $( '#config-live-log' ).find( '> textarea' ).each( function() { this.scrollTop = this.scrollHeight; } );
// Show/hide Creative Commons thingy
$( '.licenseRadio' ).click( function() {
$( '.enableForOther' ).click( function() {
var $textbox = $( '#' + $(this).attr( 'rel' ) );
if ( $(this).val() == 'other' ) { // FIXME: Ugh, this is ugly
- $textbox.removeAttr( 'readonly' ).closest( '.config-block' ).slideDown( 'fast' );
+ $textbox.removeProp( 'readonly' ).closest( '.config-block' ).slideDown( 'fast' );
} else {
- $textbox.attr( 'readonly', 'readonly' ).closest( '.config-block' ).slideUp( 'fast' );
+ $textbox.prop( 'readonly', true ).closest( '.config-block' ).slideUp( 'fast' );
}
} );