[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_3_2-16722-ga0309eb
Michal Čihař
nijel at users.sourceforge.net
Mon Aug 22 15:36:03 CEST 2011
The branch, master has been updated
via a0309eb384af0b4a92b8a13aba0f8e9df04178e3 (commit)
via d15abfb25b6d103670aa627fb88c7545b0937429 (commit)
via 0705c6a87fb36195027f34d23c50dc04aab00ffb (commit)
via ccbefbb5ef143816992fc71a278f555e9d3687cf (commit)
via a2485d0379f4496cee0b7a37790f7bef8890849c (commit)
from 5b8bb36168161fd92cfb63f9dddeab3e10a23bf5 (commit)
- Log -----------------------------------------------------------------
commit a0309eb384af0b4a92b8a13aba0f8e9df04178e3
Author: Michal Čihař <michal at cihar.com>
Date: Mon Aug 22 15:35:46 2011 +0200
Fix function name
commit d15abfb25b6d103670aa627fb88c7545b0937429
Author: Michal Čihař <michal at cihar.com>
Date: Mon Aug 22 15:35:32 2011 +0200
Fold PMA_ieFilter into PMA_css_Gradied
commit 0705c6a87fb36195027f34d23c50dc04aab00ffb
Author: Michal Čihař <michal at cihar.com>
Date: Mon Aug 22 15:10:41 2011 +0200
Convert left CSS to use new helper as well
commit ccbefbb5ef143816992fc71a278f555e9d3687cf
Author: Michal Čihař <michal at cihar.com>
Date: Mon Aug 22 15:09:21 2011 +0200
Adjust calling convention, do not include # in color
commit a2485d0379f4496cee0b7a37790f7bef8890849c
Author: Michal Čihař <michal at cihar.com>
Date: Mon Aug 22 15:05:45 2011 +0200
Use new function for gradient instead of doing it manually
-----------------------------------------------------------------------
Summary of changes:
libraries/theme.lib.php | 29 ++++++------
themes/original/css/theme_right.css.php | 7 +--
themes/pmahomme/css/theme_left.css.php | 24 ++-------
themes/pmahomme/css/theme_right.css.php | 77 ++++--------------------------
4 files changed, 32 insertions(+), 105 deletions(-)
diff --git a/libraries/theme.lib.php b/libraries/theme.lib.php
index 9155a6d..7c773c9 100644
--- a/libraries/theme.lib.php
+++ b/libraries/theme.lib.php
@@ -6,19 +6,10 @@
* @package phpMyAdmin
*/
-
-/**
- * Gradient filter for IE.
- */
-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 . '");'
- : '';
-}
-
/**
* Remove filter for IE.
+ *
+ * @return string CSS code.
*/
function PMA_ieClearFilter() {
return PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 6 && PMA_USR_BROWSER_VER <= 8
@@ -28,16 +19,24 @@ function PMA_ieClearFilter() {
/**
* Generates code for CSS gradient using various browser extensions.
+ *
+ * @param string $start_color Color of gradient start, hex value without #
+ * @param string $end_color Color of gradient end, hex value without #
+ *
+ * @return string CSS code.
*/
-function PMA_css_Gradied($start_color, $end_color)
+function PMA_css_gradient($start_color, $end_color)
{
$result = array();
$result[] = 'background-image: url(./themes/svg_gradient.php?from=' . $start_color . '&to=' . $end_color . ');';
$result[] = 'background-size: 100% 100%;';
- $result[] = 'background: -webkit-gradient(linear, left top, left bottom, from(' . $start_color . '), to(' . $end_color . '));';
- $result[] = 'background: -moz-linear-gradient(top, ' . $start_color . ', ' . $end_color . ');';
- $result[] = 'background: -o-linear-gradient(top, ' . $start_color . ', ' . $end_color . ');';
+ $result[] = 'background: -webkit-gradient(linear, left top, left bottom, from(#' . $start_color . '), to(#' . $end_color . '));';
+ $result[] = 'background: -moz-linear-gradient(top, #' . $start_color . ', #' . $end_color . ');';
+ $result[] = 'background: -o-linear-gradient(top, #' . $start_color . ', #' . $end_color . ');';
$result[] = PMA_ieFilter($start_color, $end_color);
+ if (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 6 && PMA_USR_BROWSER_VER <= 8) {
+ $result[] = 'filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#' . $start_color . '", endColorstr="#' . $end_color . '");';
+ }
return implode("\n", $result);
}
diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php
index c69c18e..69d01c1 100644
--- a/themes/original/css/theme_right.css.php
+++ b/themes/original/css/theme_right.css.php
@@ -1671,12 +1671,7 @@ 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);
- <?php echo PMA_ieFilter('#ffffff', '#cccccc'); ?>
+ <?php echo PMA_css_gradient('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 e6b586c..65df208 100644
--- a/themes/pmahomme/css/theme_left.css.php
+++ b/themes/pmahomme/css/theme_left.css.php
@@ -12,12 +12,10 @@ 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 . '");'
- : '';
-}
+/**
+ * Theme helpers.
+ */
+require 'libraries/theme.lib.php';
?>
/******************************************************************************/
/* general tags */
@@ -247,12 +245,7 @@ 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);
- <?php echo PMA_ieFilter('#ffffff', '#cccccc'); ?>
+ <?php echo PMA_css_gradient('ffffff', 'cccccc'); ?>
border: 1px solid #aaa;
-moz-border-radius: 20px;
-webkit-border-radius: 20px;
@@ -264,12 +257,7 @@ 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;
- <?php echo PMA_ieFilter('#cccccc', '#dddddd'); ?>
+ <?php echo PMA_css_gradient('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 996f259..9e25638 100644
--- a/themes/pmahomme/css/theme_right.css.php
+++ b/themes/pmahomme/css/theme_right.css.php
@@ -105,12 +105,7 @@ 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);
- <?php echo PMA_ieFilter('#ffffff', '#cccccc'); ?>
+ <?php echo PMA_css_gradient('ffffff', 'cccccc'); ?>
}
dfn {
@@ -126,12 +121,7 @@ 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);
- <?php echo PMA_ieFilter('#ffffff', '#cccccc'); ?>
+ <?php echo PMA_css_gradient('ffffff', 'cccccc'); ?>
}
a img {
@@ -200,21 +190,11 @@ input[type=submit]{
text-shadow: 0 1px 0 #fff;
- 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);
- <?php echo PMA_ieFilter('#ffffff', '#cccccc'); ?>
+ <?php echo PMA_css_gradient('ffffff', 'cccccc'); ?>
}
input[type=submit]:hover{position: relative;
- 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);
- <?php echo PMA_ieFilter('#cccccc', '#dddddd'); ?>
+ <?php echo PMA_css_gradient('cccccc', 'dddddd'); ?>
cursor:pointer;
}
@@ -309,12 +289,7 @@ select{
}
select[multiple] {
- background: #fff;
- background: -webkit-gradient(linear, center top, center bottom, from(#fff), color-stop(0.8, #f1f1f1), to(#fbfbfb));
- 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");
+ <?php echo PMA_css_gradient('ffffff', 'f2f2f2'); ?>
}
/* Icon sprites */
@@ -1623,20 +1598,10 @@ div#profilingchart {
-moz-box-shadow: 1px 1px 2px rgba(0,0,0,.5);
text-shadow: #fff 0 1px 0;
*/
- 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);
- <?php echo PMA_ieFilter('#ffffff', '#cccccc'); ?>
+ <?php echo PMA_css_gradient('ffffff', 'cccccc'); ?>
}
#sectionlinks a:hover, .buttonlinks a:hover, a.button: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));
- background: -moz-linear-gradient(top, #cccccc, #dddddd);
- background: -o-linear-gradient(top, #cccccc, #dddddd);
- <?php echo PMA_ieFilter('#cccccc', '#dddddd'); ?>
+ <?php echo PMA_css_gradient('cccccc', 'dddddd'); ?>
}
div#sqlquerycontainer {
@@ -2053,21 +2018,11 @@ input[type=text].invalid_value,
text-shadow: 0 1px 0 #fff;
- 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);
- <?php echo PMA_ieFilter('#ffffff', '#cccccc'); ?>
+ <?php echo PMA_css_gradient('ffffff', 'cccccc'); ?>
cursor: pointer;
}
#buttonGo: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));
- background: -moz-linear-gradient(top, #cccccc, #dddddd);
- background: -o-linear-gradient(top, #cccccc, #dddddd);
- <?php echo PMA_ieFilter('#cccccc', '#dddddd'); ?>
+ <?php echo PMA_css_gradient('cccccc', 'dddddd'); ?>
}
.format_specific_options h3 {
@@ -2902,12 +2857,7 @@ span.cm-number {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
- background-image: url(./themes/svg_gradient.php?from=eeeeee&to=cccccc);
- background-size: 100% 100%;
- background: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), to(#cccccc));
- background: -moz-linear-gradient(top, #eeeeee, #cccccc);
- background: -o-linear-gradient(top, #eeeeee, #cccccc);
- <?php echo PMA_ieFilter('#eeeeee', '#cccccc'); ?>
+ <?php echo PMA_css_gradient('eeeeee', 'cccccc'); ?>
}
.navigation td {
@@ -2944,12 +2894,7 @@ span.cm-number {
cursor: pointer;
text-shadow: none;
- background-image: url(./themes/svg_gradient.php?from=333333&to=555555);
- background-size: 100% 100%;
- background: -webkit-gradient(linear, left top, left bottom, from(#333333), to(#555555));
- background: -moz-linear-gradient(top, #333333, #555555);
- background: -o-linear-gradient(top, #333333, #555555);
- <?php echo PMA_ieFilter('#333333', '#555555'); ?>
+ <?php echo PMA_css_gradient('333333', '555555'); ?>
}
.navigation select {
hooks/post-receive
--
phpMyAdmin
More information about the Git
mailing list