]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 388723: Make the browser wrap comments on display in addition to the normal wrapp...
authormkanat%bugzilla.org <>
Sat, 9 Feb 2008 05:20:32 +0000 (05:20 +0000)
committermkanat%bugzilla.org <>
Sat, 9 Feb 2008 05:20:32 +0000 (05:20 +0000)
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=glob, a=mkanat

skins/standard/IE-fixes.css
skins/standard/global.css
template/en/default/bug/comments.html.tmpl
template/en/default/bug/process/midair.html.tmpl
template/en/default/pages/linked.html.tmpl

index b0f34141da5ab59c1bdb7e45c5ed939eb16b514b..fce20445b5492ef8782d5bee670f921d5e47544f 100755 (executable)
   * Contributor(s): Marc Schumann <wurblzap@gmail.com>
   */
 
+.bz_comment_text {
+     white-space: pre;
+     word-wrap: break-word;
+}
+
 #footer #useful-links li {
     padding-bottom: 0.8ex;
 }
index e336f67f21cec8621c4e1cb44480b929390b9268..0b1d71c5214fc098672affd2c73bf7d02f83500c 100644 (file)
@@ -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,
index 5add6d54f43029d115fb8ecf2b9c8f87d825cc3d..c507c580197a19b35d6fb7439bbc326d7bdc8586 100644 (file)
 [% ELSE %]
     [% wrapped_comment = comment.body FILTER wrap_comment %]
 [% END %]
-<pre[% ' id="comment_text_' _ count _ '"' IF mode == "edit" %]>
+<pre class="bz_comment_text" 
+     [% ' id="comment_text_' _ count _ '"' IF mode == "edit" %]>
   [%- wrapped_comment FILTER quoteUrls(bug.bug_id) -%]
 </pre>
     </div>
index b66be2ca7c8079dd5cab005636f2378e0ea7ca1f..383456ea131dc161d4923fc6083fb964a4ab9df9 100644 (file)
@@ -67,7 +67,9 @@
 [% IF cgi.param("comment") %]
 <p>
   Your comment was:<br>
-  <blockquote><pre>[% cgi.param("comment") FILTER wrap_comment FILTER html %]</pre></blockquote>
+  <blockquote><pre class="bz_comment_text">
+    [% cgi.param("comment") FILTER wrap_comment FILTER html %]
+  </pre></blockquote>
 </p>
 [% END %]
 
index bd5933094379dd58c51202f8a0d0eacf687f1e34..ada3c90dc43c009991ac6a04da0501577caca120 100644 (file)
@@ -31,7 +31,7 @@
 <hr>
 
 <p>
-<pre>
+<pre class="bz_comment_text">
 [%- cgi.param("text") FILTER wrap_comment FILTER quoteUrls FILTER html -%]
 </pre>
 </p>
@@ -46,7 +46,7 @@
 <hr>
 
 <p>
-<pre>
+<pre class="bz_comment_text">
 [%- cgi.param("text") FILTER wrap_comment FILTER quoteUrls -%]
 </pre>
 </p>