Move close image loading into CSS
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 7 Sep 2009 17:14:49 +0000 (11:14 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 7 Sep 2009 19:06:29 +0000 (13:06 -0600)
12 files changed:
imp/compose-dimp.php
imp/compose.php
imp/templates/chunks/message.php
imp/templates/imp/compose.html
imp/templates/index/index-dimp.inc
imp/themes/graphics/close.png [new file with mode: 0644]
imp/themes/screen-dimp.css
imp/themes/screen.css
imp/themes/silver/graphics/close.png [new file with mode: 0644]
imp/themes/silver/screen.css
imp/themes/tango-blue/graphics/close.png [new file with mode: 0644]
imp/themes/tango-blue/screen.css

index 7ce03c0..e9f06f3 100644 (file)
@@ -304,7 +304,6 @@ if ($get_sig && !empty($sig)) {
 $t = new Horde_Template(IMP_TEMPLATES . '/imp/');
 $t->setOption('gettext', true);
 $t->set('title', $title);
-$t->set('closelink', Horde::img('close.png', 'X', array('id' => 'compose_close'), $registry->getImageDir('horde')));
 
 $compose_result = IMP_Views_Compose::showCompose(array(
     'folder' => $folder,
index b8f96e1..8e7866c 100644 (file)
@@ -31,7 +31,7 @@ function _popupSuccess()
 {
     $menu = new Horde_Menu(Horde_Menu::MASK_NONE);
     $menu->add(Horde::applicationUrl('compose.php'), _("New Message"), 'compose.png');
-    $menu->add('', _("Close this window"), 'close.png', $GLOBALS['registry']->getImageDir('horde'), '', 'window.close();');
+    $menu->add('', _("Close this window"), 'close.png', '', '', 'window.close();');
     require IMP_TEMPLATES . '/common-header.inc';
     $success_template = new Horde_Template();
     $success_template->set('menu', $menu->render());
index a9b5348..517f075 100644 (file)
@@ -6,13 +6,9 @@
  * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
  */
 
-$horde_img = $registry->getImageDir('horde');
-
-$close_img = Horde::img('close.png', 'X', array(), $horde_img);
 $menu_view = $prefs->getValue('menu_view');
 $show_text = ($menu_view == 'text' || $menu_view == 'both');
 
-
 // Small utility function to simplify creating dimpactions buttons.
 // As of right now, we don't show text only links.
 function _createDAfmsg($text, $image, $id, $class = '', $show_text = true)
@@ -30,7 +26,7 @@ function _createDAfmsg($text, $image, $id, $class = '', $show_text = true)
 <div id="pageContainer">
  <div id="msgData">
   <div class="dimpActions dimpActionsMsg noprint">
-   <div class="headercloseimg" id="windowclose"><?php echo $close_img ?></div>
+   <div class="headercloseimg" id="windowclose"><span class="closeImg" title="X"></span></div>
    <span>
     <?php _createDAfmsg(_("Reply"), 'Reply', 'reply_link', 'hasmenu', $show_text) ?>
    </span>
@@ -58,7 +54,7 @@ function _createDAfmsg($text, $image, $id, $class = '', $show_text = true)
    <div class="msgHeaders">
     <div id="msgHeaders">
      <div class="dimpOptions noprint">
-      <div id="msg_print"><?php echo Horde::img('print.png', '', '', $horde_img) ?><a><?php echo _("Print") ?></a></div>
+      <div id="msg_print"><?php echo Horde::img('print.png', '', '', $registry->getImageDir('horde') ?><a><?php echo _("Print") ?></a></div>
 <?php if (!empty($conf['user']['allow_view_source'])): ?>
       <div id="msg_view_source"><span class="iconImg"></span><a><?php echo _("View Source") ?></a></div>
 <?php endif; ?>
index 77d6e2c..f965b90 100644 (file)
@@ -2,7 +2,7 @@
  <div id="pageContainer">
   <div>
    <div class="header">
-    <div class="headercloseimg"><tag:closelink /></div>
+    <div class="headercloseimg"><span class="closeImg" id="compose_close" title="X"></span></div>
     <div class="headertitle"><tag:title /></div>
    </div>
   </div>
index 62e9fcf..e84524c 100644 (file)
@@ -177,9 +177,8 @@ function _simpleButton($id, $text, $image, $imagedir = null)
        <form action="#" method="post">
         <input autocomplete="off" id="qsearch_input" type="text" size="25" />
        </form>
-       <span class="qsearchClose">
-        <?php echo Horde::img('close.png', '', array('id' => 'qsearch_close', 'style' => 'display:none', 'title' => _("Clear Search")), $hordeimg) ?>
-       </span>
+       <span class="closeImg" id="qsearch_close" style="display:none" title="<?php echo _("Clear Search") ?>"></span>
+      </span>
       </div>
 <?php endif; ?>
       <span>
diff --git a/imp/themes/graphics/close.png b/imp/themes/graphics/close.png
new file mode 100644 (file)
index 0000000..e135bc7
Binary files /dev/null and b/imp/themes/graphics/close.png differ
index 704384a..ca2d84f 100644 (file)
@@ -801,12 +801,6 @@ a.address:hover img {
 #qsearch form {
     display: inline;
 }
-.qsearchClose {
-    display: -moz-inline-stack;
-    display: inline-block;
-    margin-left: -2px;
-    width: 17px;
-}
 #qsearch_icon {
     height: 16px;
     width: 16px;
@@ -822,7 +816,7 @@ a.address:hover img {
     padding: 0;
 }
 #qsearch_close {
-    margin-top: -1px;
+    padding: 0;
 }
 .qsearchFocus, .qsearchFocus #qsearch_icon {
     background-color: #fff !important;
index cb7f166..6fa678e 100644 (file)
@@ -575,7 +575,7 @@ td.addressTr span.loadingImg {
     white-space: nowrap;
 }
 
-.downloadAtc, .downloadZipAtc, .saveImgAtc, .stripAtc, .foldersImg {
+.downloadAtc, .downloadZipAtc, .saveImgAtc, .closeImg, .stripAtc, .foldersImg {
     display: -moz-inline-stack;
     display: inline-block;
     height: 16px;
@@ -596,6 +596,9 @@ td.addressTr span.loadingImg {
 .stripAtc {
     background-image: url("graphics/delete.png");
 }
+.closeImg {
+    background-image: url("graphics/close.png");
+}
 
 #itipconflicts tr.itipcollision {
     background-color: #f00;
diff --git a/imp/themes/silver/graphics/close.png b/imp/themes/silver/graphics/close.png
new file mode 100644 (file)
index 0000000..1514d51
Binary files /dev/null and b/imp/themes/silver/graphics/close.png differ
index d5f4a87..b94c380 100644 (file)
@@ -79,3 +79,7 @@ span.spamImg {
 span.trashImg {
     background-image: url("graphics/folders/trash.png");
 }
+
+.closeImg {
+    background-image: url("graphics/close.png");
+}
diff --git a/imp/themes/tango-blue/graphics/close.png b/imp/themes/tango-blue/graphics/close.png
new file mode 100644 (file)
index 0000000..93edaf0
Binary files /dev/null and b/imp/themes/tango-blue/graphics/close.png differ
index a9260af..f00b496 100644 (file)
@@ -6,3 +6,7 @@
     color: #000;
     background: #fff;
 }
+
+.closeImg {
+    background-image: url("graphics/close.png");
+}