mediawiki.legacy.config: use own help-field styling
authorOri Livneh <ori@wikimedia.org>
Sat, 15 Aug 2015 04:24:26 +0000 (21:24 -0700)
committerOri Livneh <ori@wikimedia.org>
Sat, 15 Aug 2015 04:28:37 +0000 (21:28 -0700)
Instead of using .mw-help-field-container from mediawiki.legacy to style help
tooltips, use a class that is specific to the WebInstaller and which is styled
in its stylesheet. This allows us to stop embedding it in mediawiki.legacy
(which is loaded on every page).

The CSS is copied directly from the styles for mw-help-field-container et al.
in mediawiki.legacy.

Change-Id: I8e092e9d2c91b5f70499d93c1134f43f2e96348c

includes/installer/WebInstaller.php
mw-config/config.css

index 4930826..74904f1 100644 (file)
@@ -696,11 +696,11 @@ class WebInstaller extends Installer {
                $text = wfMessage( $msg, $args )->useDatabase( false )->plain();
                $html = $this->parse( $text, true );
 
-               return "<div class=\"mw-help-field-container\">\n" .
-                       "<span class=\"mw-help-field-hint\" title=\"" .
+               return "<div class=\"config-help-field-container\">\n" .
+                       "<span class=\"config-help-field-hint\" title=\"" .
                        wfMessage( 'config-help-tooltip' )->escaped() . "\">" .
                        wfMessage( 'config-help' )->escaped() . "</span>\n" .
-                       "<span class=\"mw-help-field-data\">" . $html . "</span>\n" .
+                       "<span class=\"config-help-field-data\">" . $html . "</span>\n" .
                        "</div>\n";
        }
 
index 17b2039..0e0b304 100644 (file)
        overflow: hidden;
        min-width: 20em;
 }
+
+/* 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);
+       background-position: left center;
+       background-repeat: no-repeat;
+       cursor: pointer;
+       font-size: .8em;
+       text-decoration: underline;
+       color: #0645ad;
+}
+
+.config-help-field-hint:hover {
+       /* @embed */
+       background-image: url(images/help-question-hover.gif);
+}
+
+.config-help-field-data {
+       display: block;
+       background-color: #d6f3ff;
+       padding: 5px 8px 4px 8px;
+       border: 1px solid #5dc9f4;
+       margin-left: 20px;
+}