Skip to content
Browse files

All of the hard-coded images that are also available as a CSS sprite …

…replaced by their sprite counterparts.

Remove unused css styles for iconic view for ul items.
Update the CSS file in the "original" theme.
  • Loading branch information...
1 parent c88420a commit bc47ff43b9862bf14cf6023c8ffd34534209b00c @hisamith hisamith committed Mar 5, 2013
Showing with 32 additions and 220 deletions.
  1. +26 −3 libraries/Message.class.php
  2. +3 −109 themes/original/css/common.css.php
  3. +3 −108 themes/pmahomme/css/common.css.php
View
29 libraries/Message.class.php
@@ -78,7 +78,7 @@ class PMA_Message
PMA_Message::NOTICE => 'notice',
PMA_Message::ERROR => 'error',
);
-
+
/**
* The message number
*
@@ -638,7 +638,10 @@ public function getMessage()
$message = $string;
}
}
-
+
+ if ($this->isDisplayed()) {
+ $message = $this->getMessageWithIcon($message);
+ }
if (count($this->getParams()) > 0) {
$message = PMA_Message::format($message, $this->getParams());
}
@@ -651,7 +654,7 @@ public function getMessage()
return $message;
}
-
+
/**
* returns PMA_Message::$string
*
@@ -720,5 +723,25 @@ public function isDisplayed($isDisplayed = false)
return $this->isDisplayed;
}
+
+ /**
+ * Returns the message with corresponding image icon
+ *
+ * @param string $message the message(s)
+ * @return string message with icon
+ */
+ public function getMessageWithIcon($message){
+ $image = '';
+ if('error' == $this->getLevel()){
+ $image = 's_error.png';
+ } elseif('success' == $this->getLevel()){
+ $image = 's_success.png';
+ } else {
+ $image = 's_notice.png';
+ }
+ $message = PMA_Message::notice(PMA_Util::getImage($image))." ".$message;
+ return $message;
+
+ }
}
?>
View
112 themes/original/css/common.css.php
@@ -487,15 +487,6 @@
h1.success,
div.success {
border-color: #00FF00;
- background-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_success.png');?>);
- background-repeat: no-repeat;
- <?php if ($GLOBALS['text_dir'] === 'ltr') { ?>
- background-position: 5px 50%;
- padding: 0.2em 0.2em 0.2em 25px;
- <?php } else { ?>
- background-position: 99% 50%;
- padding: 0.2em 35px 0.2em 0.2em;
- <?php } ?>
}
.success h1 {
border-color: #00FF00;
@@ -508,15 +499,6 @@
h1.notice,
div.notice {
border-color: #FFD700;
- background-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_notice.png');?>);
- background-repeat: no-repeat;
- <?php if ($GLOBALS['text_dir'] === 'ltr') { ?>
- background-position: 5px 50%;
- padding: 0.2em 0.2em 0.2em 25px;
- <?php } else { ?>
- background-position: 99% 50%;
- padding: 0.2em 35px 0.2em 0.2em;
- <?php } ?>
}
.notice h1 {
border-color: #FFD700;
@@ -530,15 +512,6 @@
h1.error,
div.error {
border-color: #ff0000;
- background-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_error.png');?>);
- background-repeat: no-repeat;
- <?php if ($GLOBALS['text_dir'] === 'ltr') { ?>
- background-position: 5px 50%;
- padding: 0.2em 0.2em 0.2em 25px;
- <?php } else { ?>
- background-position: 99% 50%;
- padding: 0.2em 35px 0.2em 0.2em;
- <?php } ?>
}
div.error h1 {
border-color: #ff0000;
@@ -1279,90 +1252,15 @@
}
/* END main page */
-
/* iconic view for ul items */
-li#li_create_database {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('b_newdb.png');?>);
-}
-
-li#li_select_lang {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_lang.png');?>);
-}
-
-li#li_select_mysql_collation {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_asci.png');?>);
-}
-
-li#li_select_theme {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_theme.png');?>);
-}
-
-li#li_user_info {
- /* list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_rights.png');?>); */
-}
-li#li_mysql_status {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_status.png');?>);
+li.no_bullets {
+ list-style-type:none !important;
+ margin-left: -25px !important; //align with other list items which have bullets
}
-li#li_mysql_variables {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_vars.png');?>);
-}
-
-li#li_mysql_processes {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_process.png');?>);
-}
-
-li#li_mysql_collations {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_asci.png');?>);
-}
-
-li#li_mysql_engines {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('b_engine.png');?>);
-}
-
-li#li_mysql_binlogs {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_tbl.png');?>);
-}
-
-li#li_mysql_databases {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_db.png');?>);
-}
-
-li#li_export {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('b_export.png');?>);
-}
-
-li#li_import {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('b_import.png');?>);
-}
-
-li#li_change_password {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_passwd.png');?>);
-}
-
-li#li_log_out {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_loggoff.png');?>);
-}
-
-li#li_mysql_privilegs {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_rights.png');?>);
-}
-
-li#li_switch_dbstats {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('b_dbstatistics.png');?>);
-}
-
-li#li_flush_privileges {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_reload.png');?>);
-}
-
-li#li_user_preferences {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('b_tblops.png');?>);
-}
/* END iconic view for ul items */
-
#body_browse_foreigners {
background: <?php echo $GLOBALS['cfg']['NaviBackground']; ?>;
margin: .5em .5em 0 .5em;
@@ -1490,10 +1388,6 @@
display: none;
}
-#li_select_server {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_host.png');?>);
-}
-
#list_server {
list-style-image: none;
}
View
111 themes/pmahomme/css/common.css.php
@@ -701,7 +701,7 @@
background-repeat: no-repeat;
<?php if ($GLOBALS['text_dir'] === 'ltr') { ?>
background-position: 10px 50%;
- padding: 10px 10px 10px 25px;
+ padding: 10px 10px 10px 10px;
<?php } else { ?>
background-position: 99% 50%;
padding: 10px 35px 10px 10px;
@@ -729,14 +729,7 @@
h1.success,
div.success {
- border-color: #a2d246;
- background-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_success.png');?>);
- background-repeat: no-repeat;
- <?php if ($GLOBALS['text_dir'] === 'ltr') { ?>
- background-position: 5px 50%;
- <?php } else { ?>
- background-position: 99% 50%;
- <?php } ?>
+ border-color: #a2d246;
}
.success h1 {
border-color: #00FF00;
@@ -750,13 +743,6 @@
h1.notice,
div.notice {
border-color: #3a6c7e;
- background-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_notice.png');?>);
- background-repeat: no-repeat;
- <?php if ($GLOBALS['text_dir'] === 'ltr') { ?>
- background-position: 5px 50%;
- <?php } else { ?>
- background-position: 99% 50%;
- <?php } ?>
}
.notice h1 {
@@ -771,14 +757,7 @@
h1.error,
div.error {
- border-color: #333;
- background-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_error.png');?>);
- background-repeat: no-repeat;
- <?php if ($GLOBALS['text_dir'] === 'ltr') { ?>
- background-position: 5px 50%;
- <?php } else { ?>
- background-position: 99% 50%;
- <?php } ?>
+ border-color: #333;
}
div.error h1 {
@@ -1657,88 +1636,8 @@
margin-left: -25px !important; //align with other list items which have bullets
}
-li#li_create_database {
- //list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('b_newdb.png');?>);
-}
-
-li#li_select_lang {
- //list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_lang.png');?>);
-}
-
-li#li_select_mysql_collation {
- //list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_asci.png');?>);
-}
-
-li#li_select_theme {
- //list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_theme.png');?>);
-}
-
-li#li_user_info {
- /* list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_rights.png');?>); */
-}
-
-li#li_mysql_status {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_status.png');?>);
-}
-
-li#li_mysql_variables {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_vars.png');?>);
-}
-
-li#li_mysql_processes {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_process.png');?>);
-}
-
-li#li_mysql_collations {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_asci.png');?>);
-}
-
-li#li_mysql_engines {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('b_engine.png');?>);
-}
-
-li#li_mysql_binlogs {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_tbl.png');?>);
-}
-
-li#li_mysql_databases {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_db.png');?>);
-}
-
-li#li_export {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('b_export.png');?>);
-}
-
-li#li_import {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('b_import.png');?>);
-}
-
-li#li_change_password {
- //list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_passwd.png');?>);
-}
-
-li#li_log_out {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_loggoff.png');?>);
-}
-
-li#li_mysql_privilegs {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_rights.png');?>);
-}
-
-li#li_switch_dbstats {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('b_dbstatistics.png');?>);
-}
-
-li#li_flush_privileges {
- list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_reload.png');?>);
-}
-
-li#li_user_preferences {
- //list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('b_tblops.png');?>);
-}
/* END iconic view for ul items */
-
#body_browse_foreigners {
background: <?php echo $GLOBALS['cfg']['NaviBackground']; ?>;
margin: .5em .5em 0 .5em;
@@ -1880,10 +1779,6 @@
display: none;
}
-#li_select_server {
- //list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_host.png');?>);
-}
-
#list_server {
list-style-image: none;
}

0 comments on commit bc47ff4

Please sign in to comment.
Something went wrong with that request. Please try again.