improved tabs background and bottom border

This commit is contained in:
Marc Delisle
2007-07-23 23:46:20 +00:00
parent 877863d33a
commit 4fb8aad588
3 changed files with 18 additions and 5 deletions

View File

@@ -1589,15 +1589,18 @@ function PMA_getTab($tab)
E_USER_NOTICE); E_USER_NOTICE);
} }
$out = '<li' . ($tab['class'] == 'active' ? ' class="active"' : '') . '>';
if (!empty($tab['link'])) { if (!empty($tab['link'])) {
$out = '<a class="tab' . htmlentities($tab['class']) . '"' $out .= '<a class="tab' . htmlentities($tab['class']) . '"'
.' href="' . $tab['link'] . '" ' . $tab['attr'] . '>' .' href="' . $tab['link'] . '" ' . $tab['attr'] . '>'
. $tab['text'] . '</a>'; . $tab['text'] . '</a>';
} else { } else {
$out = '<span class="tab' . htmlentities($tab['class']) . '">' $out .= '<span class="tab' . htmlentities($tab['class']) . '">'
. $tab['text'] . '</span>'; . $tab['text'] . '</span>';
} }
$out .= '</li>';
return $out; return $out;
} // end of the 'PMA_getTab()' function } // end of the 'PMA_getTab()' function
@@ -1617,7 +1620,7 @@ function PMA_getTabs($tabs, $tag_id = 'topmenu')
.'<ul id="' . htmlentities($tag_id) . '">' . "\n"; .'<ul id="' . htmlentities($tag_id) . '">' . "\n";
foreach ($tabs as $tab) { foreach ($tabs as $tab) {
$tab_navigation .= '<li>' . PMA_getTab($tab) . '</li>' . "\n"; $tab_navigation .= PMA_getTab($tab) . "\n";
} }
$tab_navigation .= $tab_navigation .=

View File

@@ -655,7 +655,12 @@ a.tabcaution:hover,
a.tab:hover, a.tab:hover,
.tabactive { .tabactive {
background-color: <?php echo $GLOBALS['cfg']['BgTwo']; ?>; background-color: <?php echo $GLOBALS['cfg']['MainBackground']; ?>;
}
/* to be able to cancel the bottom border, use <li class="active"> */
ul#topmenu li.active {
border-bottom: 1pt solid <?php echo $GLOBALS['cfg']['MainBackground']; ?>;
} }
/* disabled drop/empty tabs */ /* disabled drop/empty tabs */

View File

@@ -627,7 +627,12 @@ a.tabcaution:hover,
a.tab:hover, a.tab:hover,
.tabactive { .tabactive {
background-color: <?php echo $GLOBALS['cfg']['BgTwo']; ?>; background-color: <?php echo $GLOBALS['cfg']['MainBackground']; ?>;
}
/* to be able to cancel the bottom border, use <li class="active"> */
ul#topmenu li.active {
border-bottom: 1pt solid <?php echo $GLOBALS['cfg']['MainBackground']; ?>;
} }
/* disabled drop/empty tabs */ /* disabled drop/empty tabs */