IE9 theme compatibility - gradient button

This commit is contained in:
unknown
2011-04-21 23:57:49 +07:00
committed by Piotr Przybylski
parent 467fabf5b0
commit 5610cd4651
6 changed files with 140 additions and 26 deletions

View File

@@ -11,6 +11,24 @@
if (!defined('PMA_MINIMUM_COMMON')) { if (!defined('PMA_MINIMUM_COMMON')) {
exit(); 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 */ /* general tags */
@@ -1439,10 +1457,11 @@ table#serverconnection_trg_local {
-moz-border-radius: 11px; -moz-border-radius: 11px;
-webkit-border-radius: 11px; -webkit-border-radius: 11px;
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: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#cccccc));
background: -moz-linear-gradient(top, #ffffff, #cccccc); background: -moz-linear-gradient(top, #ffffff, #cccccc);
background: -o-linear-gradient(top, #ffffff, #cccccc); background: -o-linear-gradient(top, #ffffff, #cccccc);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#cccccc'); <?php echo PMA_ieFilter(false); ?>
border: 1px solid #444444; border: 1px solid #444444;
cursor: pointer; cursor: pointer;
} }

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" ?>
<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none" version="1.0" width="100%" height="100%"
xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<linearGradient id="myLinearGradient1"
x1="0%" y1="0%"
x2="0%" y2="100%"
spreadMethod="pad">
<stop offset="0%" stop-color="#ffffff" stop-opacity="1"/>
<stop offset="100%" stop-color="#cccccc" stop-opacity="1"/>
</linearGradient>
</defs>
<rect width="100%" height="100%"
style="fill:url(#myLinearGradient1);" />
</svg>

After

Width:  |  Height:  |  Size: 614 B

View File

@@ -11,6 +11,24 @@
if (!defined('PMA_MINIMUM_COMMON')) { if (!defined('PMA_MINIMUM_COMMON')) {
exit(); 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 */ /* general tags */
@@ -199,10 +217,11 @@ div#left_tableList li {
#newtable a { #newtable a {
display: block; display: block;
padding: 1px; padding: 1px;
background-image: url(./themes/pmahomme/img/gradient.svg);
background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#cccccc)); background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#cccccc));
background: -moz-linear-gradient(top, #ffffff, #cccccc); background: -moz-linear-gradient(top, #ffffff, #cccccc);
background: -o-linear-gradient(top, #ffffff, #cccccc); background: -o-linear-gradient(top, #ffffff, #cccccc);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#cccccc'); <?php echo PMA_ieFilter(false); ?>
border: 1px solid #aaa; border: 1px solid #aaa;
-moz-border-radius: 20px; -moz-border-radius: 20px;
-webkit-border-radius: 20px; -webkit-border-radius: 20px;
@@ -214,10 +233,11 @@ div#left_tableList li {
} }
#newtable a:hover { #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: -webkit-gradient(linear, left top, left bottom, from(#cccccc), to(#dddddd)) !important;
background: -moz-linear-gradient(top, #cccccc, #dddddd) !important; background: -moz-linear-gradient(top, #cccccc, #dddddd) !important;
background: -o-linear-gradient(top, #cccccc, #dddddd) !important; background: -o-linear-gradient(top, #cccccc, #dddddd) !important;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#cccccc', endColorstr='#dddddd') !important; <?php echo PMA_ieFilter(true); ?>
} }
#newtable li a:hover { #newtable li a:hover {

View File

@@ -11,6 +11,24 @@
if (!defined('PMA_MINIMUM_COMMON')) { if (!defined('PMA_MINIMUM_COMMON')) {
exit(); 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 */ /* general tags */
@@ -98,10 +116,11 @@ a:hover {
-moz-border-radius:5px; -moz-border-radius:5px;
-webkit-border-radius:5px; -webkit-border-radius:5px;
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: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#cccccc));
background: -moz-linear-gradient(top, #ffffff, #cccccc); background: -moz-linear-gradient(top, #ffffff, #cccccc);
background: -o-linear-gradient(top, #ffffff, #cccccc); background: -o-linear-gradient(top, #ffffff, #cccccc);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#cccccc'); <?php echo PMA_ieFilter(false); ?>
} }
dfn { dfn {
@@ -117,10 +136,11 @@ th {
font-weight: bold; font-weight: bold;
color: <?php echo $GLOBALS['cfg']['ThColor']; ?>; color: <?php echo $GLOBALS['cfg']['ThColor']; ?>;
background: #f3f3f3; background: #f3f3f3;
background-image: url(./themes/pmahomme/img/gradient.svg);
background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#cccccc)); background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#cccccc));
background: -moz-linear-gradient(top, #ffffff, #cccccc); background: -moz-linear-gradient(top, #ffffff, #cccccc);
background: -o-linear-gradient(top, #ffffff, #cccccc); background: -o-linear-gradient(top, #ffffff, #cccccc);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#cccccc'); <?php echo PMA_ieFilter(false); ?>
} }
a img { a img {
@@ -189,17 +209,19 @@ input[type=submit]{
text-shadow: 0px 1px 0px #fff; text-shadow: 0px 1px 0px #fff;
background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#cccccc)); background-image: url(./themes/pmahomme/img/gradient.svg);
background: -moz-linear-gradient(top, #ffffff, #cccccc); 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); background: -o-linear-gradient(top, #ffffff, #cccccc);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#cccccc'); <?php echo PMA_ieFilter(false); ?>
} }
input[type=submit]:hover{ position: relative; input[type=submit]:hover{ position: relative;
background: -webkit-gradient(linear, left top, left bottom, from(#cccccc), to(#dddddd)); background-image: url(./themes/pmahomme/img/gradient-hover.svg);
background: -moz-linear-gradient(top, #cccccc, #dddddd); 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); background: -o-linear-gradient(top, #cccccc, #dddddd);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#cccccc', endColorstr='#dddddd'); <?php echo PMA_ieFilter(true); ?>
cursor:pointer; cursor:pointer;
} }
@@ -297,7 +319,7 @@ select[multiple] {
background: -webkit-linear-gradient(#fff, #f1f1f1 80%, #fbfbfb); background: -webkit-linear-gradient(#fff, #f1f1f1 80%, #fbfbfb);
background: -moz-linear-gradient(#fff, #f1f1f1 80%, #fbfbfb); background: -moz-linear-gradient(#fff, #f1f1f1 80%, #fbfbfb);
/* none for Opera 11.10 as <option>s always have solid white background */ /* none for Opera 11.10 as <option>s always have solid white background */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f2f2f2'); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffffff", endColorstr="#f2f2f2");
} }
/******************************************************************************/ /******************************************************************************/
@@ -351,14 +373,12 @@ button.mult_submit {
table tr.odd th, table tr.odd th,
.odd { .odd {
background: #fff; background: #fff;
filter: none;
} }
/* even items 2,4,6,8,... */ /* even items 2,4,6,8,... */
table tr.even th, table tr.even th,
.even { .even {
background: #f3f3f3; background: #f3f3f3;
filter: none;
} }
/* odd table rows 1,3,5,7,... */ /* odd table rows 1,3,5,7,... */
@@ -1321,16 +1341,18 @@ div#querywindowcontainer fieldset {
-moz-box-shadow: 1px 1px 2px rgba(0,0,0,.5); -moz-box-shadow: 1px 1px 2px rgba(0,0,0,.5);
text-shadow: #fff 0px 1px 0px; text-shadow: #fff 0px 1px 0px;
*/ */
background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#cccccc)); background-image: url(./themes/pmahomme/img/gradient.svg);
background: -moz-linear-gradient(top, #ffffff, #cccccc); 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); background: -o-linear-gradient(top, #ffffff, #cccccc);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#cccccc'); <?php echo PMA_ieFilter(false); ?>
} }
#sectionlinks a:hover, #statuslinks a:hover{ #sectionlinks a:hover, #statuslinks a:hover{
background: -webkit-gradient(linear, left top, left bottom, from(#cccccc), to(#dddddd)); background-image: url(./themes/pmahomme/img/gradient-hover.svg);
background: -moz-linear-gradient(top, #cccccc, #dddddd); 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); background: -o-linear-gradient(top, #cccccc, #dddddd);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#cccccc', endColorstr='#dddddd'); <?php echo PMA_ieFilter(true); ?>
} }
div#sqlquerycontainer { div#sqlquerycontainer {
@@ -1760,17 +1782,19 @@ table#serverconnection_trg_local {
text-shadow: 0px 1px 0px #fff; text-shadow: 0px 1px 0px #fff;
background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#cccccc)); background-image: url(./themes/pmahomme/img/gradient.svg);
background: -moz-linear-gradient(top, #ffffff, #cccccc); 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); background: -o-linear-gradient(top, #ffffff, #cccccc);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#cccccc'); <?php echo PMA_ieFilter(false); ?>
cursor: pointer; cursor: pointer;
} }
#buttonGo:hover{ #buttonGo:hover{
background: -webkit-gradient(linear, left top, left bottom, from(#cccccc), to(#dddddd)); background-image: url(./themes/pmahomme/img/gradient-hover.svg);
background: -moz-linear-gradient(top, #cccccc, #dddddd); 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); background: -o-linear-gradient(top, #cccccc, #dddddd);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#cccccc', endColorstr='#dddddd'); <?php echo PMA_ieFilter(true); ?>
} }
.format_specific_options h3 { .format_specific_options h3 {

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" ?>
<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none" version="1.0" width="100%" height="100%"
xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<linearGradient id="myLinearGradient1"
x1="0%" y1="0%"
x2="0%" y2="100%"
spreadMethod="pad">
<stop offset="0%" stop-color="#cccccc" stop-opacity="1"/>
<stop offset="100%" stop-color="#dddddd" stop-opacity="1"/>
</linearGradient>
</defs>
<rect width="100%" height="100%"
style="fill:url(#myLinearGradient1);" />
</svg>

After

Width:  |  Height:  |  Size: 614 B

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" ?>
<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none" version="1.0" width="100%" height="100%"
xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<linearGradient id="myLinearGradient1"
x1="0%" y1="0%"
x2="0%" y2="100%"
spreadMethod="pad">
<stop offset="0%" stop-color="#ffffff" stop-opacity="1"/>
<stop offset="100%" stop-color="#cccccc" stop-opacity="1"/>
</linearGradient>
</defs>
<rect width="100%" height="100%"
style="fill:url(#myLinearGradient1);" />
</svg>

After

Width:  |  Height:  |  Size: 614 B