Bug #7831: Fix custom folder image display in dimp
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 5 Feb 2009 20:04:59 +0000 (13:04 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 5 Feb 2009 20:07:03 +0000 (13:07 -0700)
imp/js/src/DimpBase.js
imp/lib/DIMP.php
imp/themes/screen-dimp.css

index 0b62e00..ff2707b 100644 (file)
@@ -1886,7 +1886,7 @@ var DimpBase = {
 
         div = new Element('DIV', { className: ob.cl || 'base', id: fid + '_div' });
         if (ob.i) {
-            div.update(ob.i);
+            div.setStyle({ background-image: 'url("' + ob.i + '")' });
         }
         if (ob.ch) {
             div.writeAttribute({ className: 'exp' });
index 9658c98..e36c455 100644 (file)
@@ -421,8 +421,13 @@ class DIMP
         }
 
         if ($elt['user_icon']) {
-            $ob->cl = 'custom';
-            $ob->i = IMP::img($elt['icon'], $elt['alt'], '', $elt['icondir']);
+            $ob->cl = 'customimg';
+            $dir = empty($elt['icondir'])
+                ? $GLOBALS['registry']->getImageDir()
+                : $elt['icondir'];
+            $ob->i = empty($dir)
+                ? $elt['icon']
+                : $dir . '/' . $elt['icon'];
         }
 
         return $ob;
index 9777070..3f6d041 100644 (file)
@@ -380,7 +380,7 @@ div.msgSize img {
 #sidebarPanel li.folder a {
     display: inline;
 }
-#sidebarPanel .base, #sidebarPanel .col, #sidebarPanel .exp, #sidebarPanel .create, #sidebarPanel .drafts, #sidebarPanel .inbox, #sidebarPanel .sent, #sidebarPanel .spam, #sidebarPanel .trash {
+#sidebarPanel .base, #sidebarPanel .col, #sidebarPanel .exp, #sidebarPanel .create, #sidebarPanel .drafts, #sidebarPanel .inbox, #sidebarPanel .sent, #sidebarPanel .spam, #sidebarPanel .trash, #sidebarPanel .customimg {
     display: inline;
     float: left;
     width: 20px;