diff --git a/ChangeLog b/ChangeLog index 4d1bfb245..d685f8856 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,12 @@ phpMyAdmin - Changelog $Id$ $Source$ +2005-10-12 Sebastian Mendel + * css/phpmyadmin.css.php, libraries/common.lib.php, + themes/darkblue_orange/css/theme_right.css.php, + themes/original/css/theme_right.css.php: + use list for navigation tabs RFE #1290423 + 2005-10-12 Michal Čihař * libraries/get_foreign.lib.php: Fix paging. diff --git a/css/phpmyadmin.css.php b/css/phpmyadmin.css.php index 04f76e93d..03e091217 100644 --- a/css/phpmyadmin.css.php +++ b/css/phpmyadmin.css.php @@ -248,19 +248,32 @@ textarea { overflow: auto; } .nospace { margin: 0; padding: 0; } /* topmenu */ -#topmenu { +ul#topmenu { font-weight: bold; + list-style-type: none; + margin: 0; + padding: 0; +} + +ul#topmenu li { + float: left; + margin: 0; + padding: 0; + vertical-align: middle; } #topmenu img { - height: 1em; + height: 1.3em; width: auto; + vertical-align: text-bottom; + margin-right: 0.1em; } /* default tab styles */ .tab, .tabcaution, .tabactive { - margin-right: 0.1em; - margin-left: 0.1em; + display: block; + margin: 0.2em 0.2em 0 0.2em; + padding: 0.2em 0.2em 0 0.2em; white-space: nowrap; } @@ -286,36 +299,38 @@ a.tabcaution:hover { /* active tab */ a.tabactive { - border-bottom: 0.1em solid black; color: black; } #topmenu { margin-top: 0.5em; - border-bottom: 0.1em solid black; padding: 0.1em 0.3em 0.1em 0.3em; } +ul#topmenu li { + border-bottom: 1pt solid black; +} + /* default tab styles */ .tab, .tabcaution, .tabactive { - background-color: #E5E5E5; - border: 0.1em solid ; - border-bottom: 0.1em solid black; - border-radius-topleft: 0.5em; - border-radius-topright: 0.5em; - -moz-border-radius-topleft: 0.5em; - -moz-border-radius-topright: 0.5em; - padding: 0.1em 0.2em 0.1em 0.2em; + background-color: ; + border: 1pt solid ; + border-bottom: 0; + border-radius-topleft: 0.4em; + border-radius-topright: 0.4em; + -moz-border-radius-topleft: 0.4em; + -moz-border-radius-topright: 0.4em; } /* enabled hover/active tabs */ -a.tab:hover, a.tabcaution:hover, .tabactive { - margin-right: 0; - margin-left: 0; - padding: 0.3em 0.3em 0.1em 0.3em; +a.tab:hover, a.tabcaution:hover, .tabactive, .tabactive:hover { + margin: 0; + padding: 0.2em 0.4em 0.2em 0.4em; + text-decoration: none; } + a.tab:hover, .tabactive { - background-color: #CCCCCC; + background-color: ; } /* disabled drop/empty tabs */ diff --git a/libraries/common.lib.php b/libraries/common.lib.php index ec628364f..cb77feb1c 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -2330,10 +2330,23 @@ if (typeof(document.getElementById) != 'undefined' * returns a tab for tabbed navigation. * If the variables $link and $args ar left empty, an inactive tab is created * - * @param array $tab array with all options - * + * @uses array_merge() + * basename() + * $GLOBALS['strEmpty'] + * $GLOBALS['strDrop'] + * $GLOBALS['active_page'] + * $_SERVER['PHP_SELF'] + * htmlentities() + * PMA_generate_common_url() + * $GLOBALS['url_query'] + * urlencode() + * $GLOBALS['cfg']['MainPageIconic'] + * $GLOBALS['pmaThemeImage'] + * sprintf() + * trigger_error() + * E_USER_NOTICE + * @param array $tab array with all options * @return string html code for one tab, a link if valid otherwise a span - * * @access public */ function PMA_getTab( $tab ) @@ -2353,12 +2366,14 @@ if (typeof(document.getElementById) != 'undefined' // determine aditional style-class if ( empty( $tab['class'] ) ) { - if ($tab['text'] == $GLOBALS['strEmpty'] || $tab['text'] == $GLOBALS['strDrop']) { + if ( $tab['text'] == $GLOBALS['strEmpty'] + || $tab['text'] == $GLOBALS['strDrop'] ) { $tab['class'] = 'caution'; } elseif ( isset( $tab['active'] ) && $tab['active'] - || isset($GLOBALS['active_page']) && $GLOBALS['active_page'] == $tab['link'] - || basename($_SERVER['PHP_SELF']) == $tab['link'] ) + || isset( $GLOBALS['active_page'] ) + && $GLOBALS['active_page'] == $tab['link'] + || basename( $_SERVER['PHP_SELF'] ) == $tab['link'] ) { $tab['class'] = 'active'; } @@ -2367,10 +2382,13 @@ if (typeof(document.getElementById) != 'undefined' // build the link if ( ! empty( $tab['link'] ) ) { $tab['link'] = htmlentities( $tab['link'] ); - $tab['link'] = $tab['link'] . $tab['sep'] . ( empty( $GLOBALS['url_query'] ) ? PMA_generate_common_url() : $GLOBALS['url_query'] ); + $tab['link'] = $tab['link'] . $tab['sep'] + .( empty( $GLOBALS['url_query'] ) ? + PMA_generate_common_url() : $GLOBALS['url_query'] ); if ( ! empty( $tab['args'] ) ) { foreach( $tab['args'] as $param => $value ) { - $tab['link'] .= '&' . urlencode( $param ) . '=' . urlencode( $value ); + $tab['link'] .= '&' . urlencode( $param ) . '=' + . urlencode( $value ); } } } @@ -2378,20 +2396,25 @@ if (typeof(document.getElementById) != 'undefined' // display icon, even if iconic is disabled but the link-text is missing if ( ( $GLOBALS['cfg']['MainPageIconic'] || empty( $tab['text'] ) ) && isset( $tab['icon'] ) ) { - $image = '%2$s%2$s'; + $image = '%2$s%2$s'; $tab['text'] = sprintf( $image, htmlentities( $tab['icon'] ), $tab['text'] ); } // check to not display an empty link-text elseif ( empty( $tab['text'] ) ) { $tab['text'] = '?'; - trigger_error( __FILE__ . '(' . __LINE__ . '): ' . 'empty linktext in function ' . __FUNCTION__ . '()', E_USER_NOTICE ); + trigger_error( __FILE__ . '(' . __LINE__ . '): ' + . 'empty linktext in function ' . __FUNCTION__ . '()', + E_USER_NOTICE ); } if ( ! empty( $tab['link'] ) ) { - $out = '' - . $tab['text'] . ''; + $out = '' + . $tab['text'] . ''; } else { - $out = '' . $tab['text'] . ''; + $out = '' + . $tab['text'] . ''; } return $out; @@ -2400,22 +2423,25 @@ if (typeof(document.getElementById) != 'undefined' /** * returns html-code for a tab navigation * - * @param array $tabs one element per tab + * @uses PMA_getTab() + * @uses htmlentities() + * @param array $tabs one element per tab * @param string $tag_id id used for the html-tag * @return string html-code for tab-navigation */ - function PMA_getTabs( $tabs, $tag_id = 'topmenu' ) - { - $tab_navigation = '' . "\n"; - $tab_navigation .= '
' . "\n"; + function PMA_getTabs( $tabs, $tag_id = 'topmenu' ) { + $tab_navigation = + '
' . "\n" + .'
    ' . "\n"; - foreach ( $tabs as $tab ) - { - $tab_navigation .= PMA_getTab( $tab ) . "\n"; + foreach ( $tabs as $tab ) { + $tab_navigation .= '
  • ' . PMA_getTab( $tab ) . '
  • ' . "\n"; } - $tab_navigation .= '
' . "\n"; - $tab_navigation .= '' . "\n\n"; + $tab_navigation .= + '' . "\n" + .'
' + .'
' . "\n"; return $tab_navigation; } diff --git a/themes/darkblue_orange/css/theme_right.css.php b/themes/darkblue_orange/css/theme_right.css.php index 4a1afecbe..0d006e23c 100644 --- a/themes/darkblue_orange/css/theme_right.css.php +++ b/themes/darkblue_orange/css/theme_right.css.php @@ -202,17 +202,36 @@ button.mult_submit { /* topmenu */ -#topmenu { +ul#topmenu { font-weight: bold; + list-style-type: none; + margin: 0; + padding: 0; +} + +ul#topmenu li { + float: left; + margin: 0; + padding: 0; + vertical-align: middle; +} + +#topmenu img { + height: 1.3em; + width: auto; + vertical-align: text-bottom; + margin-right: 0.1em; } /* default tab styles */ .tab, .tabcaution, .tabactive { - margin-right: 0.1em; - margin-left: 0.1em; + display: block; + margin: 0.2em 0.2em 0 0.2em; + padding: 0.2em 0.2em 0 0.2em; + white-space: nowrap; } -/* disbaled tabs */ +/* disabled tabs */ span.tab { color: #666666; } @@ -234,36 +253,38 @@ a.tabcaution:hover { /* active tab */ a.tabactive { - border-bottom: 0.1em solid black; color: black; } #topmenu { margin-top: 0.5em; - border-bottom: 0.1em solid black; padding: 0.1em 0.3em 0.1em 0.3em; } +ul#topmenu li { + border-bottom: 1pt solid black; +} + /* default tab styles */ .tab, .tabcaution, .tabactive { - background-color: #E5E5E5; - border: 0.1em solid silver; - border-bottom: 0.1em solid black; - border-radius-topleft: 0.5em; - border-radius-topright: 0.5em; - -moz-border-radius-topleft: 0.5em; - -moz-border-radius-topright: 0.5em; - padding: 0.1em 0.2em 0.1em 0.2em; + background-color: ; + border: 1pt solid ; + border-bottom: 0; + border-radius-topleft: 0.4em; + border-radius-topright: 0.4em; + -moz-border-radius-topleft: 0.4em; + -moz-border-radius-topright: 0.4em; } /* enabled hover/active tabs */ -a.tab:hover, a.tabcaution:hover, .tabactive { - margin-right: 0; - margin-left: 0; - padding: 0.3em 0.3em 0.1em 0.3em; +a.tab:hover, a.tabcaution:hover, .tabactive, .tabactive:hover { + margin: 0; + padding: 0.2em 0.4em 0.2em 0.4em; + text-decoration: none; } + a.tab:hover, .tabactive { - background-color: #CCCCCC; + background-color: ; } /* disabled drop/empty tabs */ diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php index f40c1c415..08fd6ea00 100644 --- a/themes/original/css/theme_right.css.php +++ b/themes/original/css/theme_right.css.php @@ -113,19 +113,37 @@ button.mult_submit { hr{ color: #666666; background-color: #666666; border: 0; height: 1px; } - /* topmenu */ -#topmenu { +ul#topmenu { font-weight: bold; + list-style-type: none; + margin: 0; + padding: 0; +} + +ul#topmenu li { + float: left; + margin: 0; + padding: 0; + vertical-align: middle; +} + +#topmenu img { + height: 1.3em; + width: auto; + vertical-align: text-bottom; + margin-right: 0.1em; } /* default tab styles */ .tab, .tabcaution, .tabactive { - margin-right: 0.1em; - margin-left: 0.1em; + display: block; + margin: 0.2em 0.2em 0 0.2em; + padding: 0.2em 0.2em 0 0.2em; + white-space: nowrap; } -/* disbaled tabs */ +/* disabled tabs */ span.tab { color: #666666; } @@ -147,36 +165,38 @@ a.tabcaution:hover { /* active tab */ a.tabactive { - border-bottom: 0.1em solid black; color: black; } #topmenu { margin-top: 0.5em; - border-bottom: 0.1em solid black; padding: 0.1em 0.3em 0.1em 0.3em; } +ul#topmenu li { + border-bottom: 1pt solid black; +} + /* default tab styles */ .tab, .tabcaution, .tabactive { - background-color: #E5E5E5; - border: 0.1em solid silver; - border-bottom: 0.1em solid black; - border-radius-topleft: 0.5em; - border-radius-topright: 0.5em; - -moz-border-radius-topleft: 0.5em; - -moz-border-radius-topright: 0.5em; - padding: 0.1em 0.2em 0.1em 0.2em; + background-color: ; + border: 1pt solid ; + border-bottom: 0; + border-radius-topleft: 0.4em; + border-radius-topright: 0.4em; + -moz-border-radius-topleft: 0.4em; + -moz-border-radius-topright: 0.4em; } /* enabled hover/active tabs */ -a.tab:hover, a.tabcaution:hover, .tabactive { - margin-right: 0; - margin-left: 0; - padding: 0.3em 0.3em 0.1em 0.3em; +a.tab:hover, a.tabcaution:hover, .tabactive, .tabactive:hover { + margin: 0; + padding: 0.2em 0.4em 0.2em 0.4em; + text-decoration: none; } + a.tab:hover, .tabactive { - background-color: #CCCCCC; + background-color: ; } /* disabled drop/empty tabs */ @@ -186,7 +206,6 @@ span.tab, span.tabcaution { /* end topmenu */ - /* Warning showing div with right border and optional icon */ div.errorhead {