diff --git a/grid/css/theme_left.css.php b/grid/css/theme_left.css.php index 25149abec3..0d22b134c2 100644 --- a/grid/css/theme_left.css.php +++ b/grid/css/theme_left.css.php @@ -1,4 +1,4 @@ -getImgPath(); -} else { - $GridImgPath = $_SESSION['PMA_Theme']->getImgPath(); +if (!defined('PMA_MINIMUM_COMMON')) exit(); // illegal execution path + +$GridImgPath = version_compare(PMA_VERSION,'2.11','lt') ? '../' : ''; +$GridImgPath .= $_SESSION['PMA_Theme']->getImgPath(); + +if(version_compare(PMA_VERSION,'2.9','lt')) { + echo 'html,table{font-size:', $GLOBALS['cfg']['FontSize'], '}'; } -if($iPmaVersion < 20900) { - echo 'html, -table{font-size:', $GLOBALS['cfg']['FontSize'],'} -'; +// Whether to activate the Navi marker (bug pma < 2.11) +if (empty($GLOBALS['cfg']['LeftMarkerEnable'])) { + $GLOBALS['cfg']['LeftMarkerEnable'] = $GLOBALS['cfg']['LeftPointerEnable']; } -/** general **/ -echo '/*theme "Grid-2.9d" Navi 20070211 windkiel pma 2.8..2.1x*/ -*{margin:0;padding:0}';//1st: general reset and corrected later, if needed (f.e. hr) + +if (!$GLOBALS['cfg']['LeftMarkerEnable'] ) { // init in config.default + $GLOBALS['cfg']['NaviMarkedBackground'] = $GLOBALS['cfg']['NaviBackground']; +} + +/** (left) navigation.php **/ echo ' -body{background:', $GLOBALS['cfg']['NaviBackground'], - ';color:', $GLOBALS['cfg']['NaviColor'], - ';padding:.2em'; +*{margin:0;padding:0}'; //general reset and defined later if needed (f.e. hr) + +// top left +echo ' +body{margin:.2em .3em;background:', $GLOBALS['cfg']['NaviBackground'], + ';color:', $GLOBALS['cfg']['NaviColor']; +// ';padding:.2em'; + if (!empty($GLOBALS['cfg']['FontFamily'])) { echo ';font-family:', $GLOBALS['cfg']['FontFamily']; } echo '} -hr{margin:5px 0 5px} +hr{margin:.5em 0 .3em;color:', $GLOBALS['cfg']['NaviColor'], + ';background:', $GLOBALS['cfg']['NaviColor'], ';border:0;height:1px} a img{border:0} form{display:inline} select{width:100%} button{display:inline}'; // buttons in some browsers (eg. Konqueror) are block elements,this breaks design /* * * * classes * * * * * * * * * * * * * */ -/* -specific elements div#pmalogo{background:', $GLOBALS['cfg']['NaviLinkBackground'], '} -div#pmalogo, -*/ +// specific elements div#pmalogo{background:', $GLOBALS['cfg']['NaviLinkBackground'], '} div#pmalogo, -/* leave some space between icons and text: */ echo ' +/* leave some space between icons and text: + * ??? div#databaseList a{text-decoration:underline} +*/ +echo ' .icon{vertical-align:middle;margin:0 .1em 0 .1em} -div#leftframelinks{padding-top:5px;text-align:center} -div#leftframelinks a img.icon{padding:.1em;border:0} +div#leftframelinks{text-align:center} +div#leftframelinks a img.icon{padding:.2em;border:0} div#leftframelinks, -div#databaseList{margin-bottom:.5em;padding-bottom:.5em;border-bottom:1px solid ', $GLOBALS['cfg']['NaviColor'], '} -div#pmalogo{text-align:center;'; -if($iPmaVersion > 20900) { - echo 'background:', $GLOBALS['cfg']['NaviLinkBackground']; -} else { - echo 'border-bottom:1px solid ', $GLOBALS['cfg']['NaviColor']; -} -echo "}\n"; -if( ($GLOBALS['cfg']['LeftDisplayServers'])&&($GLOBALS['cfg']['LeftFrameLight']) ){ +div#databaseList{margin-bottom:.3em;padding-bottom:.3em;border-bottom:1px solid ', $GLOBALS['cfg']['NaviColor'], '} +div#pmalogo{text-align:center;';//padding:.7em; +echo ($iPmaVersion > 20900) ? 'background:' . $GLOBALS['cfg']['NaviBackground'] : + 'border-bottom:1px solid ' . $GLOBALS['cfg']['NaviColor']; +echo '} +'; + +if( $GLOBALS['cfg']['LeftDisplayServers'] && $GLOBALS['cfg']['LeftFrameLight'] ){ echo 'div#databaseList{text-align:left} -'; // looks nicer if LeftDisplayServers==true +'; // looks nicer if LeftDisplayServers==true - 2do: r2l char sets }; -if($GLOBALS['cfg']['LeftPointerEnable']){ - echo 'div#leftframelinks a:hover{background:', $GLOBALS['cfg']['NaviPointerBackground'], -';color:', $GLOBALS['cfg']['NaviPointerColor'], '} -'; -} -/*1px solid echo $GLOBALS['cfg']['NaviColor']; top links */ - -/* serverlist */ ?> -#body_leftFrame #list_server{list-style-image: url("s_host.png");list-style-position: inside;list-style-type:none} -#body_leftFrame #list_server li{font-size:} - -div#left_tableList ul{list-style-type:none;list-style-position:outside;font-size:;background:} +/***** serverlist *****/ +echo ' +#body_leftFrame #list_server{list-style-image:url("', $GridImgPath,'s_host.png");', + 'list-style-position: inside;list-style-type:none} +#body_leftFrame #list_server li{font-size:', $GLOBALS['cfg']['NaviFontPercentage'], '} +div#left_tableList ul{list-style-type:none;line-height:110%;list-style-position:outside;font-size:', + $GLOBALS['cfg']['NaviFontPercentage'], ';background:', $GLOBALS['cfg']['NaviBackground'], '} div#left_tableList ul ul{font-size:100%} -div#left_tableList a{text-decoration:none;color:} - +div#left_tableList a{text-decoration:none;color:', $GLOBALS['cfg']['NaviLinkColor'], '} a, -div#left_tableList a{padding:0 2px 0 2px} - -a:hover, -div#left_tableList a:hover{background:;color:;text-decoration:underline} - -div#left_tableList a:hover{text-decoration:underline} - - + +echo ( $GLOBALS['cfg']['LeftPointerEnable'] ) +? 'a:hover, +div#left_tableList a:hover{background:' . $GLOBALS['cfg']['NaviPointerBackground'] . + ';color:' . $GLOBALS['cfg']['NaviPointerColor'] . + ';text-decoration:underline}' +: 'div#left_tableList a:hover{text-decoration:underline}'; + +if ( $GLOBALS['cfg']['LeftMarkerEnable'] && $GLOBALS['cfg']['NaviMarkedColor'] ) { + echo ' +div#left_tableList ul li.marked{background:', $GLOBALS['cfg']['NaviMarkedBackground'], + ';color:', $GLOBALS['cfg']['NaviMarkedColor'], '}'; +} + +echo ' div#left_tableList img{vertical-align:middle} -div#left_tableList ul ul{padding-left:1px;border-left:1px solid ;padding-bottom:1px;border-bottom:1px solid } +div#left_tableList ul ul{padding:.2em;border-left:1px solid ', $GLOBALS['cfg']['NaviColor'], // __ table sep. + ';border-bottom:1px solid ', $GLOBALS['cfg']['NaviColor'], '}'; +?> diff --git a/grid/css/theme_right.css.php b/grid/css/theme_right.css.php index 3643344501..f2214e2a8d 100644 --- a/grid/css/theme_right.css.php +++ b/grid/css/theme_right.css.php @@ -12,26 +12,19 @@ // unplanned execution path if(!defined('PMA_MINIMUM_COMMON')) exit(); -$parts = explode('.', PMA_VERSION );// f.e. 2.11.0-dev -$last = explode('-', $parts[2]); // 2.8.2.4«last part ignored -$iPmaVersion = 10000 * $parts[0] + 100 * $parts[1] + $last[0]; -// new pma 2.11 style image paths: -if($iPmaVersion < 21100) { -// old style (causing problems with some MS products) : - $GridImgPath = '../' . $_SESSION['PMA_Theme']->getImgPath(); -} else { - $GridImgPath = $_SESSION['PMA_Theme']->getImgPath(); -} -echo' -/** general tags "Grid-2.9d" right 20070211 windkiel pma 2.8 .. 2.1x */'; +$GridImgPath = version_compare(PMA_VERSION,'2.11','lt') ? '../' : ''; +$GridImgPath .= $_SESSION['PMA_Theme']->getImgPath(); -if($iPmaVersion < 20900) { - echo ' -html, +if(version_compare(PMA_VERSION,'2.9','lt')) { + //needed for pma2.8 only (if E_NOTICE=1 , but no effect) : + $GLOBALS['cfg']['BgcolorOne'] = '#f7f7f7'; + $GLOBALS['cfg']['BgcolorTwo'] = '#fff'; + echo 'html, table{font-size:', $GLOBALS['cfg']['FontSize'],'} td, th{color:', $GLOBALS['cfg']['MainColor'], '}'; } + $listImgUrl = 'list-style-image:url("'. $GridImgPath; //.....xxx.png") echo' body{padding:0;margin:.4em;color:', $GLOBALS['cfg']['MainColor'],';background:', $GLOBALS['cfg']['MainBackgroundColor']; @@ -47,11 +40,11 @@ pre, code{font-family:', $GLOBALS['cfg']['FontFamilyFixed'], '} '; ?> -input{padding:0 .3em;font-size:100%} +input{padding:0 .2em;font-size:100%} h1{font-size:140%;font-weight:bold;margin:0 .8em 0 .8em} h2{font-size:120%;font-weight:bold} h3{font-weight:bold} -a{padding:.1em .1em} +a{padding:1px} a:link, a:visited, a:active{text-decoration:none;color:} @@ -65,9 +58,8 @@ th{font-weight:bold;color:;background:< a img{border:0} hr{color:;background:;border:0;height:1px} -form{padding:0;margin:0;display:inline} -textarea{overflow:visible; 0) echo 'height:8em;'; ?> -} +form{padding:0;margin:1px;display:inline} +textarea{overflow:visible;height:em} fieldset{margin:1em 0 1px 1px;border: solid 1px;padding:.5em;background:} fieldset fieldset{margin:.8em} @@ -79,7 +71,7 @@ button{display:inline} table{margin:1px;border-collapse:collapse} table caption, table th, -table td{padding:0 2px 0 2px;vertical-align:top; background-image:url("s_notice.png"); background-repeat:no-repeat; -background-position:10px 50%;padding:10px 10px 10px 36px;background-position:99% 50%;padding:10px 5% 10px 10px;background-position:1em 50%;padding:1em 1em 1em 3.6em;background-position:99% 50%;padding:1em 5% 1em 1em; padding:.5em;} .notice h1{border-bottom:1px solid #FFD700;font-weight:bold;text-align:;margin:0 0 .2em 0} @@ -185,9 +177,9 @@ h1.warning, div.warning{margin:.5em 0 .5em 0;border:1px solid #c00; background-image:url("s_warn.png");background-repeat:no-repeat; -background-position:10px 50%;padding:10px 10px 10px 36px; +background-position:1em 50%;padding:1em 1em 1em 3.6em; -background-position:99% 50%;padding:10px 5% 10px 10px; +background-position:99% 50%;padding:1em 5% 1em 1em; padding:.5em; @@ -200,9 +192,9 @@ div.error{margin:.5em 0 .5em 0;border:1px solid #f00; background-image:url("s_error.png");background-repeat:no-repeat; -background-position:10px 50%;padding:10px 10px 10px 36px; +background-position:1em 50%;padding:1em 1em 1em 3.6em; -background-position:99% 50%;padding:10px 5% 10px 10px; padding:.5em; @@ -214,9 +206,9 @@ fieldset.confirmation legend{border-left:1px solid #f00;border-right:1px solid # background-image:url("s_really.png");background-repeat:no-repeat; -background-position:5px 50%;padding:.2em .2em .2em 25px; +background-position:.5em 50%;padding:.2em .2em .2em 2.5em; -background-position:97% 50%;padding:.2em 25px .2em .2em; +background-position:97% 50%;padding:.2em 2.5em .2em .2em; } .tblcomment{font-size:90%;font-weight:normal;color:#009} @@ -273,12 +265,7 @@ echo /* default tab styles */ $GLOBALS['cfg']['BgTwo']; ?>;border-bottom:0; 0){ /*FF..*/ echo '-moz-border-radius-topleft:.6em;-moz-border-radius-topright:.6em'; } -/** -MSIE: -Sebastian removed the wrong lines from "original" :( -neither border-radius-topleft nor border-top-left-radius is css compliant -http://blogs.msdn.com/ie/archive/2005/06/23/431980.aspx -**/ +/** MSIE 6: http://blogs.msdn.com/ie/archive/2005/06/23/431980.aspx **/ ?>} a.tab:hover, a.tabcaution:hover, @@ -367,8 +354,9 @@ div#serverstatus table tbody td.descr a:after, div#serverstatus table .tblFooters a:after{content:']'} -body#bodyquerywindow{margin:0;padding:0;background-image:none;background:#F5F5F5} +/* querywindow -image:none;??-color: */ ?> +body#bodyquerywindow{margin:0;padding:0;background:} div#querywindowcontainer{margin:0;padding:0;width:100%} div#querywindowcontainer fieldset{margin-top:0} ;margin:.5em .5em 0 .5em} #bodyquerywindow{background: \ No newline at end of file +?> diff --git a/grid/layout.inc.php b/grid/layout.inc.php index 58211012d6..e6e41593e0 100644 --- a/grid/layout.inc.php +++ b/grid/layout.inc.php @@ -1,93 +1,104 @@ '#808000', + 'comment' => '#808000', 'comment_mysql' => '', 'comment_ansi' => '', - 'comment_c' => '', - 'digit' => '', - 'digit_hex' => 'teal', + 'comment_c' => '', + 'digit' => '', + 'digit_hex' => 'teal', 'digit_integer' => 'teal', - 'digit_float' => 'aqua', - 'punct' => 'fuchsia', - 'alpha' => '', + 'digit_float' => 'aqua', + 'punct' => 'fuchsia', + 'alpha' => '', 'alpha_columnType' => '#F90', 'alpha_columnAttrib' => 'blue', 'alpha_reservedWord' => '#909', @@ -174,9 +178,74 @@ $GLOBALS['cfg']['SQP']['fmtColor'] = array( 'alpha_identifier' => 'black', 'alpha_charset' => '#6495ed', 'alpha_variable' => '#800000', - 'quote' => '#008000', + 'quote' => '#008000', 'quote_double' => '', 'quote_single' => '', 'quote_backtick' => '' ); -?> \ No newline at end of file + +// Settings from .../phpmyadmin/config.inc.php +// See libraries/config.default.php for similar settings + +// ~~~~~~~ alternate COLOR/FONT SETS choosable in config.inc.php ~~~~~~~~~~~ +// (default settings from above are simply overridden) +if (isset($GLOBALS['cfg']['customGrid'])) +{ + if('old' == $GLOBALS['cfg']['customGrid']) + { + $GLOBALS['cfg']['NaviBackground'] = '#efefef'; + $GLOBALS['cfg']['MainBackgroundColor'] = '#ddd'; + $GLOBALS['cfg']['BrowseMarkerBackground']= '#ee9'; + $GLOBALS['cfg']['TblBorderColor'] = '#ddddde'; + } + elseif('originalColors' == $GLOBALS['cfg']['customGrid']) + { + $GLOBALS['cfg']['NaviBackground'] = '#D0DCE0'; + $GLOBALS['cfg']['NaviPointerColor'] = '#000'; + $GLOBALS['cfg']['NaviPointerBackground'] = '#99C'; + $GLOBALS['cfg']['NaviMarkedColor'] = '#000'; + $GLOBALS['cfg']['NaviMarkedBackground']= '#99c'; + $GLOBALS['cfg']['MainColor'] = '#000'; + $GLOBALS['cfg']['MainBackgroundColor'] = '#F5F5F5';//'MainBackground' + $GLOBALS['cfg']['BrowsePointerColor'] = '#000'; + $GLOBALS['cfg']['BrowsePointerBackground'] = '#CFC'; + $GLOBALS['cfg']['BrowseMarkerColor'] = '#000'; + $GLOBALS['cfg']['BrowseMarkerBackground'] = '#FC9'; + $GLOBALS['cfg']['FontFamily'] = 'sans-serif'; + $GLOBALS['cfg']['FontFamilyFixed'] = 'monospace'; + $GLOBALS['cfg']['Border'] = 0; + $GLOBALS['cfg']['ThBackground'] = '#D3DCE3'; + $GLOBALS['cfg']['ThColor'] = '#000'; + $GLOBALS['cfg']['BgOne'] = '#E5E5E5'; + $GLOBALS['cfg']['BgTwo'] = '#D5D5D5'; + $GLOBALS['cfg']['QueryWindowWidth'] = 600; + $GLOBALS['cfg']['QueryWindowHeight'] = 400; + } + elseif('tan' == $GLOBALS['cfg']['customGrid']) + { + $GLOBALS['cfg']['FontFamily'] = 'verdana,sans-serif'; + $GLOBALS['cfg']['NaviBackground'] = '#dfc7a0';//white looks ugly,'#e7e7e7';// like IE6 scrollbar Am.:gray Br.:grey + $GLOBALS['cfg']['NaviLinkColor'] = '#00a'; + $GLOBALS['cfg']['NaviLinkBackground'] = '#fff'; + $GLOBALS['cfg']['NaviPointerColor'] = '#00f'; + $GLOBALS['cfg']['NaviPointerBackground'] = '#fff'; //'#d9f5ff'; //~cyan/tuerkis + $GLOBALS['cfg']['NaviMarkedColor'] = '#000'; + $GLOBALS['cfg']['NaviMarkedBackground']= '#ff9'; + $GLOBALS['cfg']['NaviFontPercentage'] = '90%'; + + $GLOBALS['cfg']['MainBackgroundColor'] = '#edb'; //~tan + $GLOBALS['cfg']['MainGridColor'] = '#eeddbc'; + $GLOBALS['cfg']['MainLinkColor'] = '#00c'; + $GLOBALS['cfg']['MainLinkBackground'] = '#fff'; + + $GLOBALS['cfg']['BrowsePointerColor'] = '#000'; + $GLOBALS['cfg']['BrowsePointerBackground'] = '#cfc'; + $GLOBALS['cfg']['BrowseMarkerColor'] = '#000'; + $GLOBALS['cfg']['BrowseMarkerBackground'] = '#ffb'; + $GLOBALS['cfg']['ThBackground'] = '#dca'; // ff9 too yellowish + $GLOBALS['cfg']['ThColor'] = '#000'; + $GLOBALS['cfg']['BgOne'] = '#fffcfa';#fffaf5 a bit too reddish + $GLOBALS['cfg']['BgTwo'] = '#fff'; + } +} +?>