*/
protected $tabIndex = 1;
+ /**
+ * Numeric index of the help box
+ *
+ * @var int
+ */
+ protected $helpBoxId = 1;
+
/**
* Name of the page we're on
*
$args = array_map( 'htmlspecialchars', $args );
$text = wfMessage( $msg, $args )->useDatabase( false )->plain();
$html = $this->parse( $text, true );
+ $id = 'helpBox-' . $this->helpBoxId++;
return "<div class=\"config-help-field-container\">\n" .
- "<span class=\"config-help-field-hint\" title=\"" .
+ "<input type=\"checkbox\" class=\"config-help-field-checkbox\" id=\"$id\" />" .
+ "<label class=\"config-help-field-hint\" for=\"$id\" title=\"" .
wfMessage( 'config-help-tooltip' )->escaped() . "\">" .
- wfMessage( 'config-help' )->escaped() . "</span>\n" .
+ wfMessage( 'config-help' )->escaped() . "</label>\n" .
"<div class=\"config-help-field-data\">" . $html . "</div>\n" .
"</div>\n";
}
display: none;
}
+.config-help-field-checkbox {
+ display: none;
+}
+
/* tooltip styles */
.config-help-field-hint {
- display: none;
margin-left: 2px;
- margin-bottom: -8px;
padding: 0 0 0 15px;
/* @embed */
background-image: url( images/help-question.gif );
margin-left: 20px;
}
+.config-help-field-checkbox:not( :checked ) ~ .config-help-field-data {
+ display: none;
+}
+
#p-logo a {
background-image: url( images/installer-logo.png );
}
$label.text( labelText.replace( '$1', value ) );
}
- // Set up the help system
- $( '.config-help-field-data' ).hide()
- .closest( '.config-help-field-container' ).find( '.config-help-field-hint' )
- .show()
- .on( 'click', function () {
- // FIXME: Use CSS transition
- // eslint-disable-next-line no-jquery/no-slide
- $( 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?
$( '.dbRadio' ).each( function () {