From a32dc0b3977b1430673a2306e32512897f1e378f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 3 Jun 2004 09:31:39 +0000 Subject: [PATCH] css improvements (design should not be changed by this, just the way how it is done) --- ChangeLog | 6 +++ css/phpmyadmin.css.php | 49 ++++++++++++++++++++ db_details_links.php | 2 + header.inc.php | 99 +++++++++------------------------------- libraries/common.lib.php | 11 +++-- server_links.inc.php | 24 ++++++---- tbl_properties_links.php | 2 + 7 files changed, 103 insertions(+), 90 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8c330b8ea..a0dd43b28 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,12 @@ phpMyAdmin - Changelog $Id$ $Source$ +2004-06-03 Michal Čihař + * db_details_links.php, header.inc.php, server_links.inc.php, + tbl_properties_links.php, css/phpmyadmin.css.php: Use classes for + heading (RFE #965542). + * libraries/common.lib.php: Add drop class also to td (RFE #946540). + 2004-06-02 Alexander M. Turek * db_details_db_info.php, tbl_properties_tbl_info.php: Table type is called "Engine" in MySQL 4.1.2 (bug #964011). diff --git a/css/phpmyadmin.css.php b/css/phpmyadmin.css.php index 7bb2dd21c..0bdcfa2a4 100644 --- a/css/phpmyadmin.css.php +++ b/css/phpmyadmin.css.php @@ -177,6 +177,11 @@ td.tab { border-radius: 2px; -moz-border-radius: 2px; } + +div.tabs { + clear: both; +} + table.tabs { border-top: none; border-right: none; @@ -475,3 +480,47 @@ textarea { margin: 0px; padding: 0px; } + +/* Heading */ + +h1 div { + display: block; + float: left; + padding: 2px 2px 5px 2px; + margin: 0px; + font-family: ; + font-size: ; + font-weight: normal; +} + +h1 div a { + + background-repeat: no-repeat; + background-position: 2px 50%; + padding-left: 20px; + +} + +h1 div a { + font-weight: bolder; +} + + +h1 div.server a { + background-image: url(../images/s_host.png); +} + +h1 div.database a { + background-image: url(../images/s_db.png); +} + +h1 div.table a { + background-image: url(../images/s_tbl.png); +} + + +div.database:before , div.table:before { + content: '>'; + padding-left: 5px; + padding-right: 5px; +} diff --git a/db_details_links.php b/db_details_links.php index 74b71b4e9..b887431ce 100644 --- a/db_details_links.php +++ b/db_details_links.php @@ -59,6 +59,7 @@ else { * Displays tab links */ +echo '
'; if ($cfg['LightTabs']) { echo ' '; } else { @@ -84,5 +85,6 @@ if (!$cfg['LightTabs']) { } else { echo '
'; } +echo '
'; ?>
diff --git a/header.inc.php b/header.inc.php index 28b5f0c37..023b2eebe 100644 --- a/header.inc.php +++ b/header.inc.php @@ -147,10 +147,13 @@ if (empty($GLOBALS['is_header_sent'])) { if (!defined('PMA_DISPLAY_HEADING')) { define('PMA_DISPLAY_HEADING', 1); } - /* replaced 2004-05-05 by mkkeck + + /** + * Display heading if needed. Design can be set in css file. + */ if (PMA_DISPLAY_HEADING) { + echo "

\n\n"; $header_url_qry = '?' . PMA_generate_common_url(); - echo '

' . "\n"; $server_info = (!empty($cfg['Server']['verbose']) ? $cfg['Server']['verbose'] : $server_info = $cfg['Server']['host'] . (empty($cfg['Server']['port']) @@ -158,88 +161,28 @@ if (empty($GLOBALS['is_header_sent'])) { : ':' . $cfg['Server']['port'] ) ); - if (isset($GLOBALS['db'])) { - echo ' ' . $GLOBALS['strDatabase'] . ' ' . htmlspecialchars($GLOBALS['db']) . '' . "\n"; + echo '
' . sprintf($GLOBALS['strServer'],'') . "\n" + . '' + . htmlspecialchars($server_info) . '' . "\n" + . '
' . "\n\n"; + + if (!empty($GLOBALS['db'])) { + echo '
' . $GLOBALS['strDatabase'] . "\n" + . '' + . htmlspecialchars($GLOBALS['db']) . '' . "\n" + . '
' . "\n\n"; + if (!empty($GLOBALS['table'])) { - echo ' - ' . $GLOBALS['strTable'] . ' ' . htmlspecialchars($GLOBALS['table']) . '' . "\n"; + echo '
' . $GLOBALS['strTable'] . "\n" + . '' + . htmlspecialchars($GLOBALS['table']) . '' . "\n" + . '
' . "\n\n"; } - echo ' ' . sprintf($GLOBALS['strRunning'], '' . htmlspecialchars($server_info) . ''); - } else { - echo ' ' . sprintf($GLOBALS['strServer'], '' . htmlspecialchars($server_info) . ''); } - echo "\n" . '

' . "\n"; + echo ''; } - /**/ - /* the new one with Icons - * 2004-05-05 by Michael Keck (mkkeck) - */ - if (PMA_DISPLAY_HEADING) { - $header_url_qry = '?' . PMA_generate_common_url(); - echo ''; - $server_info = (!empty($cfg['Server']['verbose']) - ? $cfg['Server']['verbose'] - : $server_info = $cfg['Server']['host'] . (empty($cfg['Server']['port']) - ? '' - : ':' . $cfg['Server']['port'] - ) - ); - if (isset($GLOBALS['db'])) { - if ($cfg['PropertiesIconic']){ - $host_icon_img=''; - } else { - $host_icon_img = ''; - } - echo '' - . ''; - if ($cfg['PropertiesIconic']){ - $db_icon_img=''; - } else { - $db_icon_img = ''; - } - echo ''; - echo '' - . ''; - if (!empty($GLOBALS['table'])) { - if ($cfg['PropertiesIconic']){ - $tbl_icon_img=''; - } else { - $tbl_icon_img = ''; - } - echo ''; - echo '' - . ''; - } - - } else { - if ($cfg['PropertiesIconic']){ - $host_icon_img=''; - } else { - $host_icon_img = ''; - } - echo '' - . ''; - } - echo '
' . sprintf($GLOBALS['strServer'],'') . ': ' - . '' . $host_icon_img . htmlspecialchars($server_info) . '' - . '  >  ' . $GLOBALS['strDatabase'] . ': ' - . '' - . $db_icon_img . htmlspecialchars($GLOBALS['db']) . '' - . '  >  ' . $GLOBALS['strTable'] . ': ' - . $tbl_icon_img . htmlspecialchars($GLOBALS['table']) - . '
Server: ' - . $host_icon_img - . htmlspecialchars($server_info) - . ' 

'; - } - /* end of replacement - * - */ - - echo "\n"; - /** * Sets a variable to remember headers have been sent */ diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 78dd93c39..cd4391659 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -1732,15 +1732,18 @@ if (typeof(document.getElementById) != 'undefined' global $PHP_SELF, $cfg; global $db_details_links_count_tabs; - if (!empty($class)) $class = ' class="' . $class . '"'; + if (!empty($class)) { + $class = ' class="' . $class . '"'; + $addclass = ' ' . $class; + } else { + $addclass = ''; + } if (((!isset($GLOBALS['active_page']) && basename($PHP_SELF) == $link) || $active || (isset($GLOBALS['active_page']) && $GLOBALS['active_page'] == $link) ) && ($text != $GLOBALS['strEmpty'] && $text != $GLOBALS['strDrop'])) { - $addclass = ' activetab'; - } else { - $addclass = ''; + $addclass .= ' activetab'; } $db_details_links_count_tabs++; diff --git a/server_links.inc.php b/server_links.inc.php index 2439f8279..8ec21cf4e 100644 --- a/server_links.inc.php +++ b/server_links.inc.php @@ -41,11 +41,15 @@ if (!empty($message)) { /** * Displays tab links */ -?> - - - -'; +if ($cfg['LightTabs']) { + echo ' '; +} else { + echo '
 
' . "\n" + . ' ' . "\n" + . ' '; +} + echo PMA_printTab($strDatabases, 'server_databases.php', $url_query); if ($cfg['ShowMysqlInfo']) { echo PMA_printTab($strStatus, 'server_status.php', $url_query); @@ -61,7 +65,11 @@ if ($is_superuser) { } echo PMA_printTab($strServerTabProcesslist, 'server_processlist.php', $url_query); echo PMA_printTab($strExport, 'server_export.php', $url_query); + +if (!$cfg['LightTabs']) { + echo '
 
'; +} else { + echo '
'; +} +echo ''; ?> - - -
diff --git a/tbl_properties_links.php b/tbl_properties_links.php index 5802d324a..9bf3121a5 100644 --- a/tbl_properties_links.php +++ b/tbl_properties_links.php @@ -65,6 +65,7 @@ $class7 = 'drop'; * Displays links */ +echo '
'; if ($cfg['LightTabs']) { echo ' '; } else { @@ -89,5 +90,6 @@ if (!$cfg['LightTabs']) { } else { echo '
'; } +echo '
'; ?>