[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm lonmsgdisplay.pm

raeburn raeburn at source.lon-capa.org
Fri Jan 10 00:08:39 EST 2020


raeburn		Fri Jan 10 05:08:39 2020 EDT

  Modified files:              
    /loncom/interface	lonmsgdisplay.pm loncommon.pm 
  Log:
  - Bug 6921.
    CSS to provide word wrap in display of message body in a LON-CAPA message.
  
  
Index: loncom/interface/lonmsgdisplay.pm
diff -u loncom/interface/lonmsgdisplay.pm:1.190 loncom/interface/lonmsgdisplay.pm:1.191
--- loncom/interface/lonmsgdisplay.pm:1.190	Mon Aug 12 15:15:56 2019
+++ loncom/interface/lonmsgdisplay.pm	Fri Jan 10 05:08:39 2020
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines for messaging display
 #
-# $Id: lonmsgdisplay.pm,v 1.190 2019/08/12 15:15:56 raeburn Exp $
+# $Id: lonmsgdisplay.pm,v 1.191 2020/01/10 05:08:39 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -861,7 +861,7 @@
                       .&Apache::lonhtmlcommon::row_closure(1);
         }
         $result .= &Apache::lonhtmlcommon::row_title(&mt('Message'),undef,'LC_evenrow_value')
-                  .'<pre>'.&Apache::lontexconvert::msgtexconverted($content{'message'}).'</pre>'
+                  .'<pre class="LC_wordwrap">'.&Apache::lontexconvert::msgtexconverted($content{'message'}).'</pre>'
                   .&Apache::lonhtmlcommon::row_closure()
                   .&Apache::lonhtmlcommon::row_title('',undef,'LC_oddrow_value')
                   .'<div class="LC_warning">';
@@ -1974,7 +1974,7 @@
  &Apache::loncommon::plainname($content{'sendername'},$content{'senderdomain'}),$content{'sendername'},$content{'senderdomain'}).'</b> ('.
 $content{'sendername'}.':'.
             $content{'senderdomain'}.') '.$content{'time'}.
-            '<br /><pre>'.
+            '<br /><pre class="LC_wordwrap">'.
               &Apache::lontexconvert::msgtexconverted($content{'message'}).
 	      '</pre>';
      }
@@ -2493,7 +2493,7 @@
 
     # Message
     $r->print(&Apache::lonhtmlcommon::row_title(&mt('Message'))
-             .'<pre>'
+             .'<pre class="LC_wordwrap">'
 	     .&Apache::lontexconvert::msgtexconverted($content{'message'},1)
 	     .'</pre>'
     );
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1334 loncom/interface/loncommon.pm:1.1335
--- loncom/interface/loncommon.pm:1.1334	Wed Nov 20 22:53:32 2019
+++ loncom/interface/loncommon.pm	Fri Jan 10 05:08:39 2020
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1334 2019/11/20 22:53:32 raeburn Exp $
+# $Id: loncommon.pm,v 1.1335 2020/01/10 05:08:39 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -8255,6 +8255,14 @@
 		cursor:pointer;
 }
 
+pre.LC_wordwrap {
+  white-space: pre-wrap;
+  white-space: -moz-pre-wrap;
+  white-space: -pre-wrap;
+  white-space: -o-pre-wrap;
+  word-wrap: break-word;
+}
+
 /*
   styles used for response display
 */




More information about the LON-CAPA-cvs mailing list