bug #546011 (Navigation tooltips)

This commit is contained in:
Alexander M. Turek
2002-05-09 22:11:43 +00:00
parent a1e5592bbb
commit f00d5856d8
3 changed files with 33 additions and 4 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$
$Source$
2002-05-10 Alexander M. Turek <rabus@users.sourceforge.net>
* left.php3, libraries/common.lib.php3:
Fixed bug #546011 (Navigation tooltips).
2002-05-08 Marc Delisle <lem9@users.sourceforge.net>
* Documentation.html: update example for foreign_display_field
* display_tbl.lib.php3: more room for record number

View File

@@ -270,7 +270,7 @@ if ($num_dbs > 1) {
<nobr><img src="images/spacer.gif" border="0" width="9" height="9" alt="" />
<a target="phpmain" href="sql.php3?<?php echo $common_url_query; ?>&amp;table=<?php echo urlencode($table); ?>&amp;sql_query=<?php echo urlencode('SELECT * FROM ' . PMA_backquote($table)); ?>&amp;pos=0&amp;goto=tbl_properties.php3">
<img src="images/browse.gif" width="8" height="8" border="0" alt="<?php echo "$strBrowse: $table"; ?>" title="<?php echo "$strBrowse: $table"; ?>" /></a><bdo dir="<?php echo $text_dir; ?>">&nbsp;</bdo>
<a class="tblItem" title="<?php echo $url_title; ?>" target="phpmain" href="tbl_properties.php3?<?php echo $common_url_query; ?>&amp;table=<?php echo urlencode($table); ?>">
<a class="tblItem" id="a_tbl_<?php echo $table; ?>" title="<?php echo $url_title; ?>" target="phpmain" href="tbl_properties.php3?<?php echo $common_url_query; ?>&amp;table=<?php echo urlencode($table); ?>">
<?php echo $table; ?></a></nobr><br />
<?php
} // end for $t (tables list)
@@ -298,9 +298,9 @@ if ($num_dbs > 1) {
$table_list .= ' <nobr><a target="phpmain" href="sql.php3?' . $common_url_query . '&amp;table=' . urlencode($table) . '&amp;sql_query=' . urlencode('SELECT * FROM ' . PMA_backquote($table)) . '&amp;pos=0&amp;goto=tbl_properties.php3">' . "\n";
$table_list .= ' <img src="images/browse.gif" width="8" height="8" border="0" alt="' . $strBrowse . ': ' . $table . '" title="' . $strBrowse . ': ' . $table . '" /></a><bdo dir="' . $text_dir . '">&nbsp;</bdo>' . "\n";
if (PMA_USR_BROWSER_AGENT == 'IE') {
$table_list .= ' <span class="tblItem"><a class="tblItem" title="' . $url_title . '" target="phpmain" href="tbl_properties.php3?' . $common_url_query . '&amp;table=' . urlencode($table) . '">' . $table . '</a></span></nobr><br />' . "\n";
$table_list .= ' <span class="tblItem"><a class="tblItem" id="a_tbl_' . $table . '" title="' . $url_title . '" target="phpmain" href="tbl_properties.php3?' . $common_url_query . '&amp;table=' . urlencode($table) . '">' . $table . '</a></span></nobr><br />' . "\n";
} else {
$table_list .= ' <a class="tblItem" title="' . $url_title . '" target="phpmain" href="tbl_properties.php3?' . $common_url_query . '&amp;table=' . urlencode($table) . '">' . $table . '</a></nobr><br />' . "\n";
$table_list .= ' <a class="tblItem" id="a_tbl_' . $table . '" title="' . $url_title . '" target="phpmain" href="tbl_properties.php3?' . $common_url_query . '&amp;table=' . urlencode($table) . '">' . $table . '</a></nobr><br />' . "\n";
}
} // end for $t (tables list)
@@ -414,7 +414,7 @@ else if ($num_dbs == 1) {
?>
<nobr><a target="phpmain" href="sql.php3?<?php echo $common_url_query; ?>&amp;table=<?php echo urlencode($table); ?>&amp;sql_query=<?php echo urlencode('SELECT * FROM ' . PMA_backquote($table)); ?>&amp;pos=0&amp;goto=tbl_properties.php3">
<img src="images/browse.gif" width="8" height="8" border="0" alt="<?php echo "$strBrowse: $table"; ?>" title="<?php echo "$strBrowse: $table"; ?>" /></a><bdo dir="<?php echo $text_dir; ?>">&nbsp;</bdo>
<a class="tblItem" title="<?php echo $url_title; ?>" target="phpmain" href="tbl_properties.php3?<?php echo $common_url_query; ?>&amp;table=<?php echo urlencode($table); ?>">
<a class="tblItem" id="a_tbl_<?php echo $table; ?>" title="<?php echo $url_title; ?>" target="phpmain" href="tbl_properties.php3?<?php echo $common_url_query; ?>&amp;table=<?php echo urlencode($table); ?>">
<?php echo $table; ?></a></nobr><br />
<?php
} // end for $j (tables list)

View File

@@ -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
}