bug #2355925 [display] properly update tooltips in navigation frame
This commit is contained in:
@@ -15,6 +15,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,
|
||||
|
@@ -128,6 +128,8 @@ header('Content-Type: text/html; charset=' . $GLOBALS['charset']);
|
||||
var token = '<?php echo PMA_escapeJsString($_SESSION[' PMA_token ']); ?>';
|
||||
var text_dir = '<?php echo PMA_escapeJsString($GLOBALS['text_dir']); ?>';
|
||||
var pma_absolute_uri = '<?php echo PMA_escapeJsString($GLOBALS['cfg']['PmaAbsoluteUri']); ?>';
|
||||
var pma_text_default_tab = '<?php echo PMA_escapeJsString(PMA_getTitleForTarget($GLOBALS['cfg']['DefaultTabTable'])); ?>';
|
||||
var pma_text_left_default_tab = '<?php echo PMA_escapeJsString(PMA_getTitleForTarget($GLOBALS['cfg']['LeftDefaultTabTable'])); ?>';
|
||||
|
||||
// for content and navigation frames
|
||||
|
||||
|
10
js/common.js
10
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;
|
||||
}
|
||||
|
||||
|
@@ -2662,4 +2662,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];
|
||||
}
|
||||
?>
|
||||
|
@@ -606,10 +606,11 @@ function PMA_displayTableList($tables, $visible = false,
|
||||
}
|
||||
echo '</li>' . "\n";
|
||||
} elseif (is_array($table)) {
|
||||
$link_title = PMA_getTitleForTarget($GLOBALS['cfg']['LeftDefaultTabTable']);
|
||||
// quick access icon next to each table name
|
||||
echo '<li>' . "\n";
|
||||
echo '<a title="'
|
||||
. htmlspecialchars(PMA_getTitleForTarget($GLOBALS['cfg']['LeftDefaultTabTable']))
|
||||
. htmlspecialchars($link_title)
|
||||
. ': ' . htmlspecialchars($table['Comment'])
|
||||
.' (' . PMA_formatNumber($table['Rows'], 0) . ' ' . $GLOBALS['strRows'] . ')"'
|
||||
.' id="quick_' . htmlspecialchars($table_db . '.' . $table['Name']) . '"'
|
||||
@@ -625,7 +626,7 @@ function PMA_displayTableList($tables, $visible = false,
|
||||
echo ' src="' . $GLOBALS['pmaThemeImage'] . 'b_sbrowse.png"';
|
||||
}
|
||||
echo ' id="icon_' . htmlspecialchars($table_db . '.' . $table['Name']) . '"'
|
||||
.' width="10" height="10" alt="' . $GLOBALS['strBrowse'] . '" /></a>' . "\n";
|
||||
.' width="10" height="10" alt="' . htmlspecialchars($link_title) . '" /></a>' . "\n";
|
||||
|
||||
// link for the table name itself
|
||||
$href = $GLOBALS['cfg']['DefaultTabTable'] . '?'
|
||||
@@ -643,38 +644,6 @@ function PMA_displayTableList($tables, $visible = false,
|
||||
echo '</ul>';
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 '</div>' . "\n";
|
||||
|
||||
PMA_exitNavigationFrame();
|
||||
|
Reference in New Issue
Block a user