--- loncom/interface/lonmsgdisplay.pm 2010/06/06 02:40:30 1.153 +++ loncom/interface/lonmsgdisplay.pm 2010/08/07 19:23:51 1.154 @@ -1,7 +1,7 @@ -# The LearningOnline Network with CAPA +# $textareaclass The LearningOnline Network with CAPA # Routines for messaging display # -# $Id: lonmsgdisplay.pm,v 1.153 2010/06/06 02:40:30 raeburn Exp $ +# $Id: lonmsgdisplay.pm,v 1.154 2010/08/07 19:23:51 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -626,9 +626,7 @@ sub disgroup { return; } else { $hasfloat = 1; - unless($env{'environment.wysiwygeditor'} eq 'on') { - $r->print('<div class="LC_left_float">'); - } + $r->print('<div class="LC_left_float">'); my %Sortby = ( active => {}, previous => {}, @@ -701,9 +699,7 @@ sub disgroup { } } } - unless($env{'environment.wysiwygeditor'} eq 'on') { - $r->print('</div>'); - } + $r->print('</div>'); } return $hasfloat; } @@ -1423,11 +1419,7 @@ sub compout { if ($group eq '') { my $studentsel = &discourse(\%access_status); if ($studentsel) { - if ($env{'environment.wysiwygeditor'} eq 'on') { - $r->print($studentsel); - } else { - $r->print('<div class="LC_left_float">'.$studentsel.'</div>'); - } + $r->print('<div class="LC_left_float">'.$studentsel.'</div>'); $hasfloat = 1; } } else { @@ -1523,11 +1515,7 @@ ENDREPSCRIPT if ($env{'form.text'}) { $dismsg=$env{'form.text'}; } if ($env{'form.subject'}) { $dissub=$env{'form.subject'}; } if ($hasfloat) { - if ($env{'environment.wysiwygeditor'} eq 'on') { - $r->print($broadcast_js); - } else { - $r->print($broadcast_js.'<div class="LC_left_float">'); - } + $r->print($broadcast_js.'<div class="LC_left_float">'); $onsubmit = ' onsubmit="javascript:courseRecipients();" '; } $r->print( @@ -1637,7 +1625,11 @@ ENDREPSCRIPT } } my $latexHelp = &Apache::loncommon::helpLatexCheatsheet(undef,undef,1); - my $wysiwyglink=&Apache::lonhtmlcommon::htmlareaselectactive('message').'<br />'; + my $textareaclass; + if (&Apache::lonhtmlcommon::htmlareabrowser()) { + $r->print(&Apache::lonhtmlcommon::htmlareaselectactive()); + $textareaclass = 'class="LC_richDefaultOff"'; + } my $subj_size; if ($multiforward) { $r->print(&additional_rec_row(\%lt)); @@ -1659,8 +1651,7 @@ ENDREPSCRIPT <tr><td align="left">'."\n". $latexHelp."<br />\n". &mt("Any new text to display before the text of the original messages:").'<br />'."\n". -'<textarea name="message" id="message" cols="80" rows="5" wrap="hard"></textarea>'. -$wysiwyglink); +'<textarea name="message" id="message" cols="80" rows="5" wrap="hard" $textareaclass></textarea>'); my @to_forward = &Apache::loncommon::get_env_multiple('form.delmark'); foreach my $msg (@to_forward) { $r->print('<input type="hidden" name="delmark" value="'.$msg.'" />'); @@ -1680,8 +1671,9 @@ $wysiwyglink); $attachrow </table><br /> $latexHelp<br /> -<textarea name="message" id="message" cols="80" rows="15" wrap="hard">$dismsg -</textarea>$wysiwyglink +<textarea name="message" id="message" cols="80" rows="15" wrap="hard" $textareaclass>$dismsg +</textarea> +<br /> $sendmode $dispcrit $disbase @@ -1706,8 +1698,8 @@ ENDCOMP Subject: <input type="text" size="50" name="subject" /> </p> <p>$lt{'gmt'}:<br /> -<textarea name="message" id="message" cols="60" rows="10" wrap="hard">$dismsg -</textarea>$wysiwyglink</p> +<textarea name="message" id="message" cols="60" rows="10" wrap="hard" $textareaclass>$dismsg +</textarea></p> <p> $lt{'tff'}: ENDBLOCK @@ -1733,9 +1725,7 @@ ENDUPLOAD } $r->print('</form>'); if ($hasfloat) { - unless($env{'environment.wysiwygeditor'} eq 'on') { - $r->print('</div><div class="LC_clear_float_footer"></div>'); - } + $r->print('</div><div class="LC_clear_float_footer"></div>'); } $r->print(&generate_preview_form); }