diff --git a/ChangeLog b/ChangeLog index c8a981977..90ee3b017 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,6 +13,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA - bug #2280904 [export] do not include view name in export - rfe #1688975 [display] enable copying of auto increment by default - bug #2355753 [core] do not bail out creating session on any PHP warning +- bug #2355925 [display] properly update tooltips in navigation frame 3.1.0.0 (2008-11-28) + [auth] Support for Swekey hardware authentication, diff --git a/index.php b/index.php index 4ea0a4f36..3a41563d3 100644 --- a/index.php +++ b/index.php @@ -127,6 +127,8 @@ header('Content-Type: text/html; charset=' . $GLOBALS['charset']); var token = ''; var text_dir = ''; var pma_absolute_uri = ''; + var pma_text_default_tab = ''; + var pma_text_left_default_tab = ''; // for content and navigation frames diff --git a/js/common.js b/js/common.js index 770050a12..e1de64a54 100644 --- a/js/common.js +++ b/js/common.js @@ -439,9 +439,13 @@ function updateTableTitle( table_link_id, new_title ) { //alert('updateTableTitle'); if ( window.parent.frame_navigation.document.getElementById(table_link_id) ) { var left = window.parent.frame_navigation.document; - left.getElementById(table_link_id).title = new_title; - new_title = left.getElementById('icon_' + table_link_id).alt + ': ' + new_title; - left.getElementById('quick_' + table_link_id).title = new_title; + + var link = left.getElementById(table_link_id); + link.title = window.parent.pma_text_default_tab + ': ' + new_title; + + var link = left.getElementById('quick_' + table_link_id); + link.title = window.parent.pma_text_left_default_tab + ': ' + new_title; + return true; } diff --git a/libraries/common.lib.php b/libraries/common.lib.php index fe67a9f94..e12e572ad 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -2661,4 +2661,35 @@ function PMA_duplicateFirstNewline($string){ return $string; } +/** + * get the action word corresponding to a script name + * in order to display it as a title in navigation panel + * + * @uses switch() + * @uses $GLOBALS + * @param string a valid value for $cfg['LeftDefaultTabTable'] + * or $cfg['DefaultTabTable'] + */ +function PMA_getTitleForTarget($target) { + switch ($target) { + case 'tbl_structure.php': + $message = 'strStructure'; + break; + case 'tbl_sql.php': + $message = 'strSQL'; + break; + case 'tbl_select.php': + $message = 'strSearch'; + break; + case 'tbl_change.php': + $message = 'strInsert'; + break; + case 'sql.php': + $message = 'strBrowse'; + break; + default: + $message = ''; + } + return $GLOBALS[$message]; +} ?> diff --git a/navigation.php b/navigation.php index 70928a0bd..d63ca475f 100644 --- a/navigation.php +++ b/navigation.php @@ -605,10 +605,11 @@ function PMA_displayTableList($tables, $visible = false, } echo '' . "\n"; } elseif (is_array($table)) { + $link_title = PMA_getTitleForTarget($GLOBALS['cfg']['LeftDefaultTabTable']); // quick access icon next to each table name echo '
  • ' . "\n"; echo '' . "\n"; + .' width="10" height="10" alt="' . htmlspecialchars($link_title) . '" />' . "\n"; // link for the table name itself $href = $GLOBALS['cfg']['DefaultTabTable'] . '?' @@ -642,38 +643,6 @@ function PMA_displayTableList($tables, $visible = false, echo ''; } -/** - * get the action word corresponding to a script name - * in order to display it as a title in navigation panel - * - * @uses switch() - * @uses $GLOBALS - * @param string a valid value for $cfg['LeftDefaultTabTable'] - * or $cfg['DefaultTabTable'] - */ -function PMA_getTitleForTarget($target) { - switch ($target) { - case 'tbl_structure.php': - $message = 'strStructure'; - break; - case 'tbl_sql.php': - $message = 'strSQL'; - break; - case 'tbl_select.php': - $message = 'strSearch'; - break; - case 'tbl_change.php': - $message = 'strInsert'; - break; - case 'sql.php': - $message = 'strBrowse'; - break; - default: - $message = ''; - } - return $GLOBALS[$message]; -} - echo '' . "\n"; PMA_exitNavigationFrame();