bug #546011 (Navigation tooltips)
This commit is contained in:
@@ -821,6 +821,31 @@ if (!defined('PMA_COMMON_LIB_INCLUDED')){
|
||||
<!--
|
||||
window.parent.frames['nav'].location.replace('<?php echo $reload_url; ?>');
|
||||
//-->
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
// Corrects the tooltip text via JS if required
|
||||
else if (isset($GLOBALS['table']) && $GLOBALS['cfg']['ShowTooltip'] && PMA_MYSQL_INT_VERSION >= 32303) {
|
||||
$result = mysql_query('SHOW TABLE STATUS FROM ' . PMA_backquote($GLOBALS['db']));
|
||||
while ($tmp = mysql_fetch_array($result, MYSQL_ASSOC)) {
|
||||
if ($tmp['Name'] == $GLOBALS['table']) {
|
||||
if (empty($tmp['Comment'])) {
|
||||
$tooltip = '';
|
||||
} else {
|
||||
$tooltip = $tmp['Comment'] . ' ';
|
||||
}
|
||||
$tooltip .= '(' . $tmp['Rows'] . ' ' . $GLOBALS['strRows'] . ')';
|
||||
unset($tmp);
|
||||
break;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<script type="text/javascript" language="javascript1.2">
|
||||
<!--
|
||||
if (typeof(document.getElementById) != 'undefined') {
|
||||
window.parent.frames['nav'].document.getElementById('a_tbl_<?php echo htmlspecialchars($GLOBALS['table']); ?>').title = '<?php echo $tooltip; ?>';
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
Reference in New Issue
Block a user