From 5610cd4651531b667619e420f5329f8090bd2393 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 21 Apr 2011 23:57:49 +0700 Subject: [PATCH] IE9 theme compatibility - gradient button --- themes/original/css/theme_right.css.php | 21 +++++++- themes/original/img/gradient.svg | 17 ++++++ themes/pmahomme/css/theme_left.css.php | 24 ++++++++- themes/pmahomme/css/theme_right.css.php | 70 +++++++++++++++++-------- themes/pmahomme/img/gradient-hover.svg | 17 ++++++ themes/pmahomme/img/gradient.svg | 17 ++++++ 6 files changed, 140 insertions(+), 26 deletions(-) create mode 100644 themes/original/img/gradient.svg create mode 100644 themes/pmahomme/img/gradient-hover.svg create mode 100644 themes/pmahomme/img/gradient.svg diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php index 778b33204..399bad580 100644 --- a/themes/original/css/theme_right.css.php +++ b/themes/original/css/theme_right.css.php @@ -11,6 +11,24 @@ if (!defined('PMA_MINIMUM_COMMON')) { exit(); } + +function PMA_ieFilter($is_hover) { + $retval = ''; + if (PMA_USR_BROWSER_AGENT == "IE") { + $ver = intval(PMA_USR_BROWSER_VER); + if ($ver >= 6 && $ver <= 8) { + if ($is_hover) { + $start_color = '#cccccc'; + $end_color = '#dddddd'; + } else { + $start_color = '#ffffff'; + $end_color = '#cccccc'; + } + $retval = 'filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="' . $start_color . '", endColorstr="' . $end_color . '");'; + } + } + return $retval; +} ?> /******************************************************************************/ /* general tags */ @@ -1439,10 +1457,11 @@ table#serverconnection_trg_local { -moz-border-radius: 11px; -webkit-border-radius: 11px; border-radius: 11px; + background-image: url(./themes/original/img/gradient.svg); background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#cccccc)); background: -moz-linear-gradient(top, #ffffff, #cccccc); background: -o-linear-gradient(top, #ffffff, #cccccc); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#cccccc'); + border: 1px solid #444444; cursor: pointer; } diff --git a/themes/original/img/gradient.svg b/themes/original/img/gradient.svg new file mode 100644 index 000000000..1bb079abf --- /dev/null +++ b/themes/original/img/gradient.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + diff --git a/themes/pmahomme/css/theme_left.css.php b/themes/pmahomme/css/theme_left.css.php index cd37a5af0..e321c2e14 100644 --- a/themes/pmahomme/css/theme_left.css.php +++ b/themes/pmahomme/css/theme_left.css.php @@ -11,6 +11,24 @@ if (!defined('PMA_MINIMUM_COMMON')) { exit(); } + +function PMA_ieFilter($is_hover) { + $retval = ''; + if (PMA_USR_BROWSER_AGENT == "IE") { + $ver = intval(PMA_USR_BROWSER_VER); + if ($ver >= 6 && $ver <= 8) { + if ($is_hover) { + $start_color = '#cccccc'; + $end_color = '#dddddd'; + } else { + $start_color = '#ffffff'; + $end_color = '#cccccc'; + } + $retval = 'filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="' . $start_color . '", endColorstr="' . $end_color . '");'; + } + } + return $retval; +} ?> /******************************************************************************/ /* general tags */ @@ -199,10 +217,11 @@ div#left_tableList li { #newtable a { display: block; padding: 1px; + background-image: url(./themes/pmahomme/img/gradient.svg); background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#cccccc)); background: -moz-linear-gradient(top, #ffffff, #cccccc); background: -o-linear-gradient(top, #ffffff, #cccccc); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#cccccc'); + border: 1px solid #aaa; -moz-border-radius: 20px; -webkit-border-radius: 20px; @@ -214,10 +233,11 @@ div#left_tableList li { } #newtable a:hover { + background-image: url(./themes/pmahomme/img/gradient-hover.svg); background: -webkit-gradient(linear, left top, left bottom, from(#cccccc), to(#dddddd)) !important; background: -moz-linear-gradient(top, #cccccc, #dddddd) !important; background: -o-linear-gradient(top, #cccccc, #dddddd) !important; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#cccccc', endColorstr='#dddddd') !important; + } #newtable li a:hover { diff --git a/themes/pmahomme/css/theme_right.css.php b/themes/pmahomme/css/theme_right.css.php index 9795b30f4..65ebed8a4 100644 --- a/themes/pmahomme/css/theme_right.css.php +++ b/themes/pmahomme/css/theme_right.css.php @@ -11,6 +11,24 @@ if (!defined('PMA_MINIMUM_COMMON')) { exit(); } + +function PMA_ieFilter($is_hover) { + $retval = ''; + if (PMA_USR_BROWSER_AGENT == "IE") { + $ver = intval(PMA_USR_BROWSER_VER); + if ($ver >= 6 && $ver <= 8) { + if ($is_hover) { + $start_color = '#cccccc'; + $end_color = '#dddddd'; + } else { + $start_color = '#ffffff'; + $end_color = '#cccccc'; + } + $retval = 'filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="' . $start_color . '", endColorstr="' . $end_color . '");'; + } + } + return $retval; +} ?> /******************************************************************************/ /* general tags */ @@ -98,10 +116,11 @@ a:hover { -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; + background-image: url(./themes/pmahomme/img/gradient.svg); background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#cccccc)); background: -moz-linear-gradient(top, #ffffff, #cccccc); background: -o-linear-gradient(top, #ffffff, #cccccc); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#cccccc'); + } dfn { @@ -117,10 +136,11 @@ th { font-weight: bold; color: ; background: #f3f3f3; + background-image: url(./themes/pmahomme/img/gradient.svg); background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#cccccc)); background: -moz-linear-gradient(top, #ffffff, #cccccc); background: -o-linear-gradient(top, #ffffff, #cccccc); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#cccccc'); + } a img { @@ -189,17 +209,19 @@ input[type=submit]{ text-shadow: 0px 1px 0px #fff; - background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#cccccc)); - background: -moz-linear-gradient(top, #ffffff, #cccccc); + background-image: url(./themes/pmahomme/img/gradient.svg); + background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#cccccc)); + background: -moz-linear-gradient(top, #ffffff, #cccccc); background: -o-linear-gradient(top, #ffffff, #cccccc); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#cccccc'); + } input[type=submit]:hover{ position: relative; - background: -webkit-gradient(linear, left top, left bottom, from(#cccccc), to(#dddddd)); - background: -moz-linear-gradient(top, #cccccc, #dddddd); + background-image: url(./themes/pmahomme/img/gradient-hover.svg); + background: -webkit-gradient(linear, left top, left bottom, from(#cccccc), to(#dddddd)); + background: -moz-linear-gradient(top, #cccccc, #dddddd); background: -o-linear-gradient(top, #cccccc, #dddddd); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#cccccc', endColorstr='#dddddd'); + cursor:pointer; } @@ -297,7 +319,7 @@ select[multiple] { background: -webkit-linear-gradient(#fff, #f1f1f1 80%, #fbfbfb); background: -moz-linear-gradient(#fff, #f1f1f1 80%, #fbfbfb); /* none for Opera 11.10 as