[imp] bugs in mail previews in mailbox.php
Michael M Slusarz
slusarz at bigworm.colorado.edu
Sun Mar 7 23:50:08 PST 2004
Quoting Marko Djukic <mdjukic at horde.org>:
> michael,
>
> not sure what the logic was, but the preview is not working properly,
> at least
> for the inline (non-tooltip) version.
>
> line 710 in imp/mailbox.php, why does this line strip out ' ' and
> replace them
> with ?
> $msg['preview'] = str_replace(' ', ' ', $msg['preview']);
>
> the end result is a mailbox screen which runs off 18 screens scrolls to the
> right.
I definitely can't reproduce this. And this makes no sense since, if using
inline display, all the text will be in the subject column of the table, and
this column is *not* marked as nowrap, so the browser should wrap any text -
there should be no screen scrolling. I have tried enabling previews and
setting strip linebreaks to on, and all of the preview text fits just fine in
the Subject column (i.e. no scrolling to the left) - i'm using both IE 6 and
Firefox 0.8.
There was an issue if using tooltip previews and having strip
linebreaks set to
on where the preview may end up scrolling offscreen. To prevent this from
happening, I have changed the logic to not honor the strip linebreak
setting if
using tooltip previews (or maybe this should be changed in the JS code to wrap
the text if it is going to end up offscreen?).
The line you have identified above most definitely needs to remain there - it
allows e-mails that are using spaces for formatting to be displayed properly
(i.e. this line:
"Hello world!"
is not the same as this line:
"Hello world!"
But without the above line, both output lines would be displayed the same)
> or maybe it was a typo in line 708? is it supposed to read:
> if ($preview_tooltip) {
> (note lack of '!' test)
> this would fix the error that crops up saying that $strip_preview is not
> defined, since in line 397 it is only defined if $preview_tooltip is true but
> then it is used in 709 when $preview_tooltip is false...
Yeah, this was a slight problem with my logic around line 397 and has been
fixed. But it was not a problem with the logic at line 708 - we only want to
do that stuff if we are using non-tooltips. Tooltip text gets formatted
differently, and is handled completely by Horde::linkTooltip().
michael
______________________________________________
Michael Slusarz [slusarz at bigworm.colorado.edu]
The University of Colorado at Boulder
More information about the imp
mailing list