tooltip function / replacement for alert box on hints

This commit is contained in:
Michael Keck
2005-01-20 16:35:53 +00:00
parent fb814cd6ef
commit 27afa33d33
5 changed files with 32 additions and 2 deletions

View File

@@ -144,7 +144,7 @@ if (isset($GLOBALS['userlink']) && $GLOBALS['userlink']) {
?>
<?php include('./config.footer.inc.php'); ?>
<script type="text/javascript" language="javascript" src="libraries/tooltip.js"></script>
</body>
</html>

View File

@@ -148,6 +148,7 @@ if (empty($GLOBALS['is_header_sent'])) {
}
?>
<body bgcolor="<?php echo $GLOBALS['cfg']['RightBgColor'] . '"' . $bkg_img; ?>>
<div id="TooltipContainer" name="TooltipContainer" onmouseover="holdTooltip();" onmouseout="swapTooltip('default');"></div>
<?php
include('./config.header.inc.php');

View File

@@ -556,7 +556,8 @@ if ($is_minimum_common == FALSE) {
*/
function PMA_showHint($hint_message)
{
return '<img class="lightbulb" src="' . $GLOBALS['pmaThemeImage'] . 'b_tipp.png" width="16" height="16" border="0" alt="' . $hint_message . '" title="' . $hint_message . '" align="middle" onclick="alert(\'' . PMA_jsFormat($hint_message, FALSE) . '\');" />';
//return '<img class="lightbulb" src="' . $GLOBALS['pmaThemeImage'] . 'b_tipp.png" width="16" height="16" border="0" alt="' . $hint_message . '" title="' . $hint_message . '" align="middle" onclick="alert(\'' . PMA_jsFormat($hint_message, FALSE) . '\');" />';
return '<img class="lightbulb" src="' . $GLOBALS['pmaThemeImage'] . 'b_tipp.png" width="16" height="16" border="0" alt="Tip" title="Tip" align="middle" onmouseover="pmaTooltip(\'' . PMA_jsFormat($hint_message, FALSE) . '\'); return false;" onmouseout="swapTooltip(\'default\'); return false;" />';
}
/**

View File

@@ -525,4 +525,18 @@ img, input, select, button {
font-size: 11px;
}
<?php } ?>
#TooltipContainer {
position: absolute;
z-index: 99;
width: 250px;
height: 50px;
overflow: auto;
visibility: hidden;
background-color: #ffffcc;
color: #006600;
border: 1px solid #000000;
padding: 5px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
}
/* end of some new styles added 20047-05-05 by Michael Keck (mkkeck) */

View File

@@ -282,3 +282,17 @@ img, input, select, button {
font-size: 12px;
}
<?php } // end of isDom ?>
#TooltipContainer {
position: absolute;
z-index: 99;
width: 250px;
height: 50px;
overflow: auto;
visibility: hidden;
background-color: #ffffcc;
color: #006600;
border: 1px solid #000000;
padding: 5px;
font-family: <?php echo $right_font_family; ?>;
font-size: <?php echo $font_size; ?>;
}