[Rt-devel] Double line spacing in ticket display.
Jason A. Smith
smithj4 at bnl.gov
Wed Dec 9 11:42:39 EST 2009
I noticed what seems to be an ugly interaction between the WYSIWYG
(FCKeditor) editor and the new $PlainTextMono config/preference setting
that uses CSS to make the text formatted nicely with a mono-spaced font
and line wrapping to avoid horizontal scroll bars. Ticket message
transactions added with the WYSIWYG editor contain hard <br> tags at the
end of newlines manually inserted in the message and included replies
which turn into double spaced lines when displayed with the new
$PlainTextMono display option.
If replies are made with the normal non-WYSIWYG editor, they do not
contain the hard line breaks (<br>) because they are 'text/plain'
messages and are therefore not double spaced.
If I disable the $PlainTextMono option or use the other $PlainTextPre
option instead, then there are no double spaced newlines.
I think I traced this to: Ticket/Elements/ShowTransactionAttachments
which adds 'plain-text-white-space' to the <div> tags when displaying
messagebody class ticket correspondences. This style contains the:
white-space: pre-wrap
definition which is how this new $PlainTextMono option works, but when
combined with the way WYSIWYG created 'text/html' messages are
displayed, it produces double spaced lines since they contain both <br>
tags and real newlines in the html source.
I think the way to fix this is to remove either the newlines or <br>
tags in the $render_attachment sub, when displaying messages with the
$PlainTextMono option enabled. Does this sound reasonable?
~Jason
--
/------------------------------------------------------------------\
| Jason A. Smith Email: smithj4 at bnl.gov |
| Atlas Computing Facility, Bldg. 510M Phone: +1-631-344-4226 |
| Brookhaven National Lab, P.O. Box 5000 Fax: +1-631-344-7616 |
| Upton, NY 11973-5000, U.S.A. |
\------------------------------------------------------------------/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3906 bytes
Desc: not available
Url : http://lists.bestpractical.com/pipermail/rt-devel/attachments/20091209/45c9c7ad/attachment.bin
More information about the Rt-devel
mailing list