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

raeburn raeburn@source.lon-capa.org
Thu, 15 Jan 2009 17:21:26 -0000


raeburn		Thu Jan 15 17:21:26 2009 EDT

  Modified files:              
    /loncom/interface	lonmsgdisplay.pm 
  Log:
  - Bug 5881.
    - Do not use <div></div> to generate two column display if WYSIWYG is activated.
  - Remove extra </div>s.
  - Add </td></tr> to balance opening tags.
  
  
Index: loncom/interface/lonmsgdisplay.pm
diff -u loncom/interface/lonmsgdisplay.pm:1.109 loncom/interface/lonmsgdisplay.pm:1.110
--- loncom/interface/lonmsgdisplay.pm:1.109	Mon Jan 12 04:11:25 2009
+++ loncom/interface/lonmsgdisplay.pm	Thu Jan 15 17:21:25 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines for messaging display
 #
-# $Id: lonmsgdisplay.pm,v 1.109 2009/01/12 04:11:25 raeburn Exp $
+# $Id: lonmsgdisplay.pm,v 1.110 2009/01/15 17:21:25 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -583,7 +583,9 @@
         return;
     } else {
         $hasfloat = 1;
-        $r->print('<div class="LC_left_float">');
+        unless($env{'environment.wysiwygeditor'} eq 'on') {
+            $r->print('<div class="LC_left_float">');
+        }
         my %Sortby = (
                          active   => {},
                          previous => {},
@@ -651,10 +653,13 @@
                         }
                     }
                     $r->print(&Apache::loncommon::end_data_table().'</form>'.
-                              '</fieldset><br /></div>');
+                              '</fieldset><br />');
                 }
             }
         }
+        unless($env{'environment.wysiwygeditor'} eq 'on') {
+            $r->print('</div>');
+        }
     }
     return $hasfloat;
 }
@@ -1319,7 +1324,11 @@
         if ($group eq '') {
             my $studentsel = &discourse(\%access_status);
             if ($studentsel) {
-                $r->print('<div class="LC_left_float">'.$studentsel.'</div>');
+                if ($env{'environment.wysiwygeditor'} eq 'on') {
+                    $r->print($studentsel);
+                } else {
+                    $r->print('<div class="LC_left_float">'.$studentsel.'</div>');
+                }
                 $hasfloat = 1;
             }
         } else {
@@ -1411,7 +1420,11 @@
     if ($env{'form.text'}) { $dismsg=$env{'form.text'}; }
     if ($env{'form.subject'}) { $dissub=$env{'form.subject'}; }
     if ($hasfloat) {
-        $r->print($broadcast_js.'<div class="LC_left_float">');
+        if ($env{'environment.wysiwygeditor'} eq 'on') {
+            $r->print($broadcast_js);
+        } else {
+            $r->print($broadcast_js.'<div class="LC_left_float">');
+        }
         $onsubmit = ' onsubmit="javascript:courseRecipients();" ';
     }
     $r->print(
@@ -1617,7 +1630,9 @@
     }
     $r->print('</form>');
     if ($hasfloat) {
-        $r->print('</div><div class="LC_clear_float_footer"></div>');
+        unless($env{'environment.wysiwygeditor'} eq 'on') {
+            $r->print('</div><div class="LC_clear_float_footer"></div>');
+        }
     }
     $r->print(&generate_preview_form);
 }
@@ -1667,7 +1682,7 @@
 <tr><td colspan="3"><fieldset id="LC_additionalrecips"><legend><b>$lt->{'ad'}</b> <tt>($exmpl)</tt>:</legend><table>
 <tr><td>&nbsp;</td><td>$lt->{'to'}</td><td><input type="text" size="50" name="additionalrec_to" /></td></tr>
 <tr><td>&nbsp;</td><td>$cc</td><td><input type="text" size="50" name="additionalrec_cc" /></td></tr> 
-<tr><td>&nbsp;</td><td>$bcc</td><td><input type="text" size="50" name="additionalrec_bcc" /></td></tr></table></fieldset>
+<tr><td>&nbsp;</td><td>$bcc</td><td><input type="text" size="50" name="additionalrec_bcc" /></td></tr></table></fieldset></td></tr>
 ENDADD
     return $output;
 }