From: Michael M Slusarz Date: Thu, 5 Feb 2009 20:04:59 +0000 (-0700) Subject: Bug #7831: Fix custom folder image display in dimp X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=af0f675507180ff5b4809a70721e0b08ec7ec54e;p=horde.git Bug #7831: Fix custom folder image display in dimp --- diff --git a/imp/js/src/DimpBase.js b/imp/js/src/DimpBase.js index 0b62e0088..ff2707be5 100644 --- a/imp/js/src/DimpBase.js +++ b/imp/js/src/DimpBase.js @@ -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' }); diff --git a/imp/lib/DIMP.php b/imp/lib/DIMP.php index 9658c98c3..e36c4557d 100644 --- a/imp/lib/DIMP.php +++ b/imp/lib/DIMP.php @@ -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; diff --git a/imp/themes/screen-dimp.css b/imp/themes/screen-dimp.css index 9777070e8..3f6d041d6 100644 --- a/imp/themes/screen-dimp.css +++ b/imp/themes/screen-dimp.css @@ -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;