Summary | Special folder display with custom images broken in DIMP |
Queue | DIMP |
Queue Version | HEAD |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | slusarz (at) horde (dot) org |
Requester | wrobel (at) horde (dot) org |
Created | 01/08/2009 (5999 days ago) |
Due | |
Updated | 01/12/2010 (5630 days ago) |
Assigned | 02/09/2009 (5967 days ago) |
Resolved | 02/09/2009 (5967 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
Bug #7831: Fix custom folder image display in dimphttp://git.horde.org/diff.php/imp/js/src/DimpBase.js?rt=horde-git&r1=51f7cb512a0da78529d9425bea462592d2785f0d&r2=af0f675507180ff5b4809a70721e0b08ec7ec54e
http://git.horde.org/diff.php/imp/lib/DIMP.php?rt=horde-git&r1=1b203b4df8810da493c7a13898fade3a77665f66&r2=af0f675507180ff5b4809a70721e0b08ec7ec54e
http://git.horde.org/diff.php/imp/themes/screen-dimp.css?rt=horde-git&r1=c8153297b864d07fae2815e94182c0b7d3a96bab&r2=af0f675507180ff5b4809a70721e0b08ec7ec54e
State ⇒ Assigned
commit af0f675 that Micheal hinted at and still used
background-image. The second comit 96801ee - which I did not look
at - fixed that. So the patch works fine and my backport to
horde-webmail-1.2.0 is here:
http://kolab.org/cgi-bin/viewcvs-kolab.cgi/server/patches/horde-webmail/1.2.0/tg/t_dimp_H_MS_FixBrokenFolderImages.diff?rev=1.2&content-type=text/vnd.viewcvs-markup
backgroundImage, in CSS you use background-image.
horde-webmail release I got a JavaScript error and I assume the reason
was that it was indeed invalid JavaScript.
I'm still not very used to JavaScript and have no clue about prototype
either. I basically googled for the fix I described in my earlier
comment. So I don't know if it is valid or not.
From your comment I don't understand if I should use
'background-image' though. Using 'backgroundImage' as the argument
works fine on my side and gets turned into the correct
'background-image' attribute on the client.
Your comment does not directly invalidate this, does it? So what
should I check on my side?
State ⇒ Feedback
against 'backgroundImage' in dimp/js/DimpBase.js though.
setStyle(element, styles) -> HTMLElementModifies elementÂ’s CSS style
properties. Styles are passed as a hash of property-value pairs in
which the properties are specified in their **camelized** form.
This is because this code:
{ background-image: foo }
isn't valid javascript (you can't have dashes in Object property names).
State ⇒ Assigned
against 'backgroundImage' in dimp/js/DimpBase.js though.
Thanks for the patch!
State ⇒ Feedback
icon as a background image in the css. I don't know if the same would
be possible for folders with these customized images.
Try this commit, which was just pushed to horde-hatchery:
commit af0f675507180ff5b4809a70721e0b08ec7ec54e
Author: Michael M Slusarz <slusarz@curecanti.org>
Date: Thu Feb 5 13:04:59 2009 -0700
Bug #7831: Fix custom folder image display in dimpimp/js/src/DimpBase.js | 2 +-
imp/lib/DIMP.php | 9 +++++++--
imp/themes/screen-dimp.css | 2 +-
3 files changed, 9 insertions(+), 4 deletions(-)
Assigned to Michael Slusarz
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Special folder display with custom images broken in DIMP
Queue ⇒ DIMP
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
the _imp_hook_mbox_icons hook this will lead to a broken folder
display within DIMP. There will be a line break just after the image
and the folder name will sit on top of the folder name in the next line.
All other special folders images in DIMP are handled via setting the
icon as a background image in the css. I don't know if the same would
be possible for folders with these customized images. _createFolderElt
within dimp/lib/DIMP.php returns a full image tag (rather than just a
url). And I don't know if the folder information generated by this
function is used somewhere else. Otherwise it might be possible to
modify the funtion to return a url here and add a background image
style to the item.
A workaround is to add a "float: left" style to the div where the
image tag is being added. See below.
diff -r 23c541337007 dimp/js/src/DimpBase.js
--- a/dimp/js/src/DimpBase.js Thu Jan 08 11:03:29 2009 +0100
+++ b/dimp/js/src/DimpBase.js Thu Jan 08 12:01:58 2009 +0100
@@ -1579,6 +1579,7 @@
div = new Element('DIV', { className: ob.cl || 'base', id:
fid + '_div' });
if (ob.i) {
div.update(ob.i);
+ div.setStyle(float:left);
}
if (ob.ch) {
div.writeAttribute({ className: 'exp'
}).observe('mouseover', this.bcache.get('mo_folder') ||
this.bcache.set('mo_folder', function(e) {