From aa8b20a89caaea6f63c2d719765eb78fb04062b4 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Wed, 18 Feb 2009 00:37:47 -0700 Subject: [PATCH] Use CSS images for dimpaction buttons --- imp/lib/DIMP.php | 7 +++---- imp/templates/chunks/compose.php | 20 +++++++++++++++----- imp/templates/chunks/message.php | 20 +++++++++++++++----- imp/templates/index/index-dimp.inc | 16 ++++++++-------- imp/themes/screen-dimp.css | 33 ++++++++++++++++++++++++++++++++- imp/themes/silver/screen-dimp.css | 31 +++++++++++++++++++++++++++++++ 6 files changed, 104 insertions(+), 23 deletions(-) diff --git a/imp/lib/DIMP.php b/imp/lib/DIMP.php index 54a4d87e2..869e91d66 100644 --- a/imp/lib/DIMP.php +++ b/imp/lib/DIMP.php @@ -19,7 +19,7 @@ class DIMP *
      * 'app' - The application to load the icon from.
      * 'class' - The CSS classname to use for the link.
-     * 'icon' - The icon filename to display.
+     * 'icon' - The icon CSS classname.
      * 'id' - The DOM ID of the link.
      * 'title' - The title string.
      * 'tooltip' - Tooltip text to use.
@@ -50,9 +50,8 @@ class DIMP
                            empty($params['id']) ? array() : array('id' => $params['id']),
                            !empty($title))
             . (!empty($params['icon'])
-               ? IMP::img($params['icon'], $title, '',
-                          $GLOBALS['registry']->getImageDir(empty($params['app']) ? 'imp' : $params['app']))
-               : '')
+                  ? ''
+                  : '')
             . $title . '';
     }
 
diff --git a/imp/templates/chunks/compose.php b/imp/templates/chunks/compose.php
index 0eb0a5c7a..2d9f73965 100644
--- a/imp/templates/chunks/compose.php
+++ b/imp/templates/chunks/compose.php
@@ -44,15 +44,25 @@ function _createDAcompose($text, $image, $id)
 
 
 
- + + + - + + + isLocked('save_sent_mail')): ?> - + + + - - + + + + + +
diff --git a/imp/templates/chunks/message.php b/imp/templates/chunks/message.php index 52fc6aad4..5cdab083e 100644 --- a/imp/templates/chunks/message.php +++ b/imp/templates/chunks/message.php @@ -33,15 +33,25 @@ function _createDAfmsg($text, $image, $id, $class = '', $show_text = true)
- - + + + + + + getValue('spam_folder'), true)))): ?> - + + + getValue('spam_folder'), true)))): ?> - + + + - + + +
diff --git a/imp/templates/index/index-dimp.inc b/imp/templates/index/index-dimp.inc index c0ec2b820..837f4b408 100644 --- a/imp/templates/index/index-dimp.inc +++ b/imp/templates/index/index-dimp.inc @@ -171,32 +171,32 @@ function _simpleButton($id, $text, $image, $imagedir = null) - + - + - + - + - + - + - + - + diff --git a/imp/themes/screen-dimp.css b/imp/themes/screen-dimp.css index 642e59b98..6fb17a430 100644 --- a/imp/themes/screen-dimp.css +++ b/imp/themes/screen-dimp.css @@ -519,7 +519,7 @@ div.msgSubject img { padding-left: 4px; padding-right: 4px; } -.dimpActions .disabled img, .dimpActions .disabled span.popdownImg, .dimpActions .disabled span.spellcheckPopdownImg { +.dimpActions .disabled span.iconImg, .dimpActions .disabled span.spellcheckPopdownImg { filter: alpha(opacity=25); -moz-opacity: .25; opacity: .25; @@ -977,6 +977,37 @@ span.iconImg, span.contextImg, span.spellcheckPopdownImg { vertical-align: top; } +span.dimpactionReply { + background-image: url("graphics/reply_menu.png"); +} +span.dimpactionForward { + background-image: url("graphics/forward_menu.png"); +} +span.dimpactionSpam { + background-image: url("graphics/spam_menu.png"); +} +span.dimpactionHam { + background-image: url("graphics/ham_menu.png"); +} +span.dimpactionCompose { + background-image: url("graphics/compose_menu.png"); +} +span.dimpactionCheckmail { + background-image: url("graphics/checkmail_menu.png"); +} +span.dimpactionDelete { + background-image: url("graphics/delete_menu.png"); +} +span.dimpactionOther { + background-image: url("graphics/plus_menu.png"); +} +span.dimpactionSpellcheck { + background-image: url("graphics/spellcheck_menu.png"); +} +span.dimpactionDrafts { + background-image: url("graphics/drafts_menu.png"); +} + /* Context menu images */ #ctx_message_reply span.contextImg { background-image: url("graphics/reply.png"); diff --git a/imp/themes/silver/screen-dimp.css b/imp/themes/silver/screen-dimp.css index a55ae2d52..6f6f5f3ef 100644 --- a/imp/themes/silver/screen-dimp.css +++ b/imp/themes/silver/screen-dimp.css @@ -72,6 +72,37 @@ background-image: url("graphics/popright.png"); } +span.dimpactionReply { + background-image: url("graphics/reply_menu.png"); +} +span.dimpactionForward { + background-image: url("graphics/forward_menu.png"); +} +span.dimpactionSpam { + background-image: url("graphics/spam_menu.png"); +} +span.dimpactionHam { + background-image: url("graphics/ham_menu.png"); +} +span.dimpactionCompose { + background-image: url("graphics/compose_menu.png"); +} +span.dimpactionCheckmail { + background-image: url("graphics/checkmail_menu.png"); +} +span.dimpactionDelete { + background-image: url("graphics/delete_menu.png"); +} +span.dimpactionOther { + background-image: url("graphics/plus_menu.png"); +} +span.dimpactionSpellcheck { + background-image: url("graphics/spellcheck_menu.png"); +} +span.dimpactionDrafts { + background-image: url("graphics/drafts_menu.png"); +} + /* Context menu images */ #ctx_message_reply span.contextImg { background-image: url("graphics/reply.png"); -- 2.11.0