From: mkanat%bugzilla.org <> Date: Sat, 9 Feb 2008 05:20:32 +0000 (+0000) Subject: Bug 388723: Make the browser wrap comments on display in addition to the normal wrapp... X-Git-Tag: bugzilla-3.0.4~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6f66b78e34d19a5656098b7ad6b901a9570847f;p=thirdparty%2Fbugzilla.git Bug 388723: Make the browser wrap comments on display in addition to the normal wrapping, to support CJK languages that have no spaces. Patch By Max Kanat-Alexander r=glob, a=mkanat --- diff --git a/skins/standard/IE-fixes.css b/skins/standard/IE-fixes.css index b0f34141da..fce20445b5 100755 --- a/skins/standard/IE-fixes.css +++ b/skins/standard/IE-fixes.css @@ -13,6 +13,11 @@ * Contributor(s): Marc Schumann */ +.bz_comment_text { + white-space: pre; + word-wrap: break-word; +} + #footer #useful-links li { padding-bottom: 0.8ex; } diff --git a/skins/standard/global.css b/skins/standard/global.css index e336f67f21..0b1d71c521 100644 --- a/skins/standard/global.css +++ b/skins/standard/global.css @@ -244,6 +244,22 @@ div#docslinks { margin-bottom: 2em; } +/* The rules for these classes make international text wrap correctly, + even for languages like Japanese that have no spaces. */ +.bz_comment_text { + font-family: monospace; + /* Note that these must all be on separate lines or they stop + working in Konqueror. */ + white-space: pre-wrap; /* CSS 3 & 2.1 */ + white-space: -moz-pre-wrap; /* Gecko */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ +} + +.bz_comment_text { + width: 50em; +} + .bz_comment_head { background-color: #e0e0e0; } @@ -255,6 +271,8 @@ div#docslinks { span.quote { color: #65379c; + /* Make quoted text not wrap. */ + white-space: pre; } table#flags th, diff --git a/template/en/default/bug/comments.html.tmpl b/template/en/default/bug/comments.html.tmpl index 5add6d54f4..c507c58019 100644 --- a/template/en/default/bug/comments.html.tmpl +++ b/template/en/default/bug/comments.html.tmpl @@ -152,7 +152,8 @@ [% ELSE %] [% wrapped_comment = comment.body FILTER wrap_comment %] [% END %] - +
   [%- wrapped_comment FILTER quoteUrls(bug.bug_id) -%]
 
diff --git a/template/en/default/bug/process/midair.html.tmpl b/template/en/default/bug/process/midair.html.tmpl index b66be2ca7c..383456ea13 100644 --- a/template/en/default/bug/process/midair.html.tmpl +++ b/template/en/default/bug/process/midair.html.tmpl @@ -67,7 +67,9 @@ [% IF cgi.param("comment") %]

Your comment was:
-

[% cgi.param("comment") FILTER wrap_comment FILTER html %]
+
+    [% cgi.param("comment") FILTER wrap_comment FILTER html %]
+  

[% END %] diff --git a/template/en/default/pages/linked.html.tmpl b/template/en/default/pages/linked.html.tmpl index bd59330943..ada3c90dc4 100644 --- a/template/en/default/pages/linked.html.tmpl +++ b/template/en/default/pages/linked.html.tmpl @@ -31,7 +31,7 @@

-

+
 [%- cgi.param("text") FILTER wrap_comment FILTER quoteUrls FILTER html -%]
 

@@ -46,7 +46,7 @@

-

+
 [%- cgi.param("text") FILTER wrap_comment FILTER quoteUrls -%]