diff --git a/ChangeLog b/ChangeLog
index f9b70ec4b..6ae589650 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,8 @@ $Source$
* querywindow.php: Fix javascript error (bug #946823).
* tbl_query_box.php: Stray
(bug #946530).
* querywindow.php, tbl_query_box.php: A bit more XHTML validity.
+ * css/phpmyadmin.css.php, libraries/common.lib.php: Make tabs CSS styled
+ (RFE #946540).
2004-05-03 Garvin Hicking
* left.php: Bug #946501 - Nested table now also work with aliased
diff --git a/css/phpmyadmin.css.php b/css/phpmyadmin.css.php
index 85ec60e87..6bf578cde 100644
--- a/css/phpmyadmin.css.php
+++ b/css/phpmyadmin.css.php
@@ -310,3 +310,32 @@ button {
/* buttons in some browsers (eg. Konqueror) are block elements, this breaks design */
display: inline;
}
+
+/* Tabs */
+
+/* For both light and non light */
+.tab {
+ white-space: nowrap;
+ font-weight: bolder;
+}
+
+/* For non light */
+td.tab {
+ width: 64px;
+ text-align: center;
+ background-color: #dfdfdf;
+}
+
+td.tab a {
+ display: block;
+}
+
+/* For light */
+div.tab {
+}
+
+/* Highlight active tab */
+td.activetab {
+ background-color: silver;
+}
+
diff --git a/libraries/common.lib.php b/libraries/common.lib.php
index 09d2c3472..225035ce5 100644
--- a/libraries/common.lib.php
+++ b/libraries/common.lib.php
@@ -1668,50 +1668,37 @@ if (typeof(document.getElementById) != 'undefined'
global $PHP_SELF, $cfg;
global $db_details_links_count_tabs;
- if ($class != '') $class .= ' ';
+ if (!empty($class)) $class = ' class="' . $class . '"';
if (((!isset($GLOBALS['active_page']) && basename($PHP_SELF) == $link) ||
$active ||
(isset($GLOBALS['active_page']) && $GLOBALS['active_page'] == $link)
) && ($text != $GLOBALS['strEmpty'] && $text != $GLOBALS['strDrop'])) {
- $bgcolor = 'silver';
+ $addclass = ' activetab';
} else {
- $bgcolor = '#DFDFDF';
+ $addclass = '';
}
$db_details_links_count_tabs++;
- if (!empty($attr)) {
- if ($cfg['LightTabs']) {
- $attr = ' ' . $attr;
- } else {
- $attr = ' style="display:block" ' . $attr;
- }
- } else {
- if ($cfg['LightTabs']) {
- $attr = ' ';
- } else {
- $attr = ' style="display:block" ';
- }
- }
if ($cfg['LightTabs']) {
$out = '';
if (strlen($link) > 0) {
- $out .= ''
- . '' . $text . '';
+ $out .= ''
+ . '' . $text . '';
} else {
- $out .= '' . $text . '';
+ $out .= '' . $text . '';
}
$out = '[ ' . $out . ' ] ';
} else {
$out = "\n" . ' '
- . ''
+ . ' | '
. "\n" . ' ';
if (strlen($link) > 0) {
- $out .= ''
- . '' . $text . '';
+ $out .= ''
+ . $text . '';
} else {
- $out .= '' . $text . '';
+ $out .= $text;
}
$out .= "\n" . ' '
. ' | '