The branch, master has been updated
       via  b0897692413e047b469f868c62ce0daf477d6615 (commit)
       via  21ac63902db10f40de45dfc642564ba113e24a9f (commit)
       via  5610cd4651531b667619e420f5329f8090bd2393 (commit)
      from  467fabf5b0af395dd8f38be8b0610033ca434d9d (commit)


- Log -----------------------------------------------------------------
commit b0897692413e047b469f868c62ce0daf477d6615
Author: Piotr Przybylski <[email protected]>
Date:   Fri Apr 22 21:24:34 2011 +0200

    Added SVG gradient generator instead of using one file for each gradient

commit 21ac63902db10f40de45dfc642564ba113e24a9f
Author: Piotr Przybylski <[email protected]>
Date:   Fri Apr 22 20:22:45 2011 +0200

    Make PMA_ieFilter simpler and more generic

commit 5610cd4651531b667619e420f5329f8090bd2393
Author: unknown <Aris@.(none)>
Date:   Thu Apr 21 23:57:49 2011 +0700

    IE9 theme compatibility - gradient button

-----------------------------------------------------------------------

Summary of changes:
 themes/original/css/theme_right.css.php |   11 +++++-
 themes/pmahomme/css/theme_left.css.php  |   15 ++++++-
 themes/pmahomme/css/theme_right.css.php |   67 ++++++++++++++++++++-----------
 themes/svg_gradient.php                 |   25 +++++++++++
 4 files changed, 92 insertions(+), 26 deletions(-)
 create mode 100644 themes/svg_gradient.php

diff --git a/themes/original/css/theme_right.css.php 
b/themes/original/css/theme_right.css.php
index 778b332..9f944e8 100644
--- a/themes/original/css/theme_right.css.php
+++ b/themes/original/css/theme_right.css.php
@@ -11,6 +11,13 @@
 if (!defined('PMA_MINIMUM_COMMON')) {
     exit();
 }
+
+function PMA_ieFilter($start_color, $end_color)
+{
+    return PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 6 && 
PMA_USR_BROWSER_VER <= 8
+        ? 'filter:  
progid:DXImageTransform.Microsoft.gradient(startColorstr="' . $start_color . 
'", endColorstr="' . $end_color . '");'
+        : '';
+}
 ?>
 
/******************************************************************************/
 /* general tags */
@@ -1439,10 +1446,12 @@ table#serverconnection_trg_local  {
     -moz-border-radius: 11px;
     -webkit-border-radius: 11px;
     border-radius: 11px;
+    background-image: url(./themes/svg_gradient.php?from=ffffff&to=cccccc);
+    background-size: 100% 100%;
     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');
+    <?php echo PMA_ieFilter('#ffffff', '#cccccc'); ?>
     border: 1px solid #444444;
     cursor: pointer;
 }
diff --git a/themes/pmahomme/css/theme_left.css.php 
b/themes/pmahomme/css/theme_left.css.php
index cd37a5a..467e70a 100644
--- a/themes/pmahomme/css/theme_left.css.php
+++ b/themes/pmahomme/css/theme_left.css.php
@@ -11,6 +11,13 @@
 if (!defined('PMA_MINIMUM_COMMON')) {
     exit();
 }
+
+function PMA_ieFilter($start_color, $end_color)
+{
+    return PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 6 && 
PMA_USR_BROWSER_VER <= 8
+        ? 'filter:  
progid:DXImageTransform.Microsoft.gradient(startColorstr="' . $start_color . 
'", endColorstr="' . $end_color . '");'
+        : '';
+}
 ?>
 
/******************************************************************************/
 /* general tags */
@@ -199,10 +206,12 @@ div#left_tableList li {
 #newtable a {
     display: block;
     padding: 1px;
+    background-image: url(./themes/svg_gradient.php?from=ffffff&to=cccccc);
+    background-size: 100% 100%;
     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');
+    <?php echo PMA_ieFilter('#ffffff', '#cccccc'); ?>
     border: 1px solid #aaa;
     -moz-border-radius: 20px;
     -webkit-border-radius: 20px;
@@ -214,10 +223,12 @@ div#left_tableList li {
 }
 
 #newtable a:hover {
+    background-image: url(./themes/svg_gradient.php?from=cccccc&to=dddddd);
+    background-size: 100% 100%;
     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;
+    <?php echo PMA_ieFilter('#cccccc', '#dddddd'); ?>
 }
 
 #newtable li a:hover {
diff --git a/themes/pmahomme/css/theme_right.css.php 
b/themes/pmahomme/css/theme_right.css.php
index 9795b30..2107354 100644
--- a/themes/pmahomme/css/theme_right.css.php
+++ b/themes/pmahomme/css/theme_right.css.php
@@ -11,6 +11,13 @@
 if (!defined('PMA_MINIMUM_COMMON')) {
     exit();
 }
+
+function PMA_ieFilter($start_color, $end_color)
+{
+    return PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 6 && 
PMA_USR_BROWSER_VER <= 8
+        ? 'filter:  
progid:DXImageTransform.Microsoft.gradient(startColorstr="' . $start_color . 
'", endColorstr="' . $end_color . '");'
+        : '';
+}
 ?>
 
/******************************************************************************/
 /* general tags */
@@ -98,10 +105,12 @@ a:hover {
     -moz-border-radius:5px;
     -webkit-border-radius:5px;
     border-radius:5px;
+    background-image: url(./themes/svg_gradient.php?from=ffffff&to=cccccc);
+    background-size: 100% 100%;
     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');
+    <?php echo PMA_ieFilter('#ffffff', '#cccccc'); ?>
 }
 
 dfn {
@@ -117,10 +126,12 @@ th {
     font-weight:        bold;
     color:              <?php echo $GLOBALS['cfg']['ThColor']; ?>;
     background:         #f3f3f3;
+    background-image: url(./themes/svg_gradient.php?from=ffffff&to=cccccc);
+    background-size: 100% 100%;
     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');
+    <?php echo PMA_ieFilter('#ffffff', '#cccccc'); ?>
 }
 
 a img {
@@ -189,17 +200,21 @@ 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/svg_gradient.php?from=ffffff&to=cccccc);
+    background-size: 100% 100%;
+    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');
+    <?php echo PMA_ieFilter('#ffffff', '#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/svg_gradient.php?from=cccccc&to=dddddd);
+    background-size: 100% 100%;
+    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');
+    <?php echo PMA_ieFilter('#cccccc', '#dddddd'); ?>
     cursor:pointer;
 }
 
@@ -297,7 +312,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 <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 +366,12 @@ button.mult_submit {
 table tr.odd th,
 .odd {
     background: #fff;
-    filter: none;
 }
 
 /* even items 2,4,6,8,... */
 table tr.even th,
 .even {
     background: #f3f3f3;
-    filter: none;
 }
 
 /* odd table rows 1,3,5,7,... */
@@ -1321,16 +1334,20 @@ div#querywindowcontainer fieldset {
        -moz-box-shadow: 1px 1px 2px rgba(0,0,0,.5);
        text-shadow: #fff 0px 1px 0px;
     */
-       background: -webkit-gradient(linear, left top, left bottom, 
from(#ffffff), to(#cccccc));
-       background: -moz-linear-gradient(top,  #ffffff,  #cccccc);
+    background-image: url(./themes/svg_gradient.php?from=ffffff&to=cccccc);
+    background-size: 100% 100%;
+    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');
+    <?php echo PMA_ieFilter('#ffffff', '#cccccc'); ?>
 }
 #sectionlinks a:hover, #statuslinks a:hover{
-       background: -webkit-gradient(linear, left top, left bottom, 
from(#cccccc), to(#dddddd));
-       background: -moz-linear-gradient(top,  #cccccc,  #dddddd);
+    background-image: url(./themes/svg_gradient.php?from=cccccc&to=dddddd);
+    background-size: 100% 100%;
+    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');
+    <?php echo PMA_ieFilter('#cccccc', '#dddddd'); ?>
 }
 
 div#sqlquerycontainer {
@@ -1760,17 +1777,21 @@ table#serverconnection_trg_local  {
 
        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/svg_gradient.php?from=ffffff&to=cccccc);
+    background-size: 100% 100%;
+    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');
+    <?php echo PMA_ieFilter('#ffffff', '#cccccc'); ?>
     cursor: pointer;
 }
 #buttonGo:hover{
-       background: -webkit-gradient(linear, left top, left bottom, 
from(#cccccc), to(#dddddd));
-       background: -moz-linear-gradient(top,  #cccccc,  #dddddd);
+    background-image: url(./themes/svg_gradient.php?from=cccccc&to=dddddd);
+    background-size: 100% 100%;
+    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');
+    <?php echo PMA_ieFilter('#cccccc', '#dddddd'); ?>
 }
 
 .format_specific_options h3 {
diff --git a/themes/svg_gradient.php b/themes/svg_gradient.php
new file mode 100644
index 0000000..a5d89c6
--- /dev/null
+++ b/themes/svg_gradient.php
@@ -0,0 +1,25 @@
+<?php
+header('Content-Type: image/svg+xml');
+header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 3600) . ' GMT');
+
+function get_color($get_name, $default)
+{
+    // get color from GET args, only alphanumeric chcracters
+    $opts = array('options' => array('regexp' => '/^[a-z0-9]+$/i'));
+    $color = filter_input(INPUT_GET, $get_name, FILTER_VALIDATE_REGEXP, $opts);
+    if (preg_match('/^[a-f0-9]{6}$/', $color)) {
+        return '#' . $color;
+    }
+    return $color ? $color : $default;
+}
+?>
+<?php echo '<?xml version="1.0" ?>' ?>
+<svg xmlns="http://www.w3.org/2000/svg"; preserveAspectRatio="none" 
version="1.0" width="100%" height="100%">
+    <defs>
+        <linearGradient id="linear-gradient" x1="0%" y1="0%" x2="0%" y2="100%">
+            <stop offset="0%" stop-color="<?php echo get_color('from', 
'white') ?>" stop-opacity="1" />
+            <stop offset="100%" stop-color="<?php echo get_color('to', 
'black') ?>" stop-opacity="1" />
+        </linearGradient>
+    </defs>
+    <rect width="100%" height="100%" style="fill:url(#linear-gradient);" />
+</svg>


hooks/post-receive
-- 
phpMyAdmin

------------------------------------------------------------------------------
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been 
demonstrated beyond question. Learn why your peers are replacing JEE 
containers with lightweight application servers - and what you can gain 
from the move. http://p.sf.net/sfu/vmware-sfemails
_______________________________________________
Phpmyadmin-git mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/phpmyadmin-git

Reply via email to