--- loncom/interface/lonmsgdisplay.pm 2009/06/11 16:48:33 1.126 +++ loncom/interface/lonmsgdisplay.pm 2009/06/16 16:49:11 1.127 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging display # -# $Id: lonmsgdisplay.pm,v 1.126 2009/06/11 16:48:33 bisitz Exp $ +# $Id: lonmsgdisplay.pm,v 1.127 2009/06/16 16:49:11 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -173,6 +173,7 @@ sub folderlist { $formhash{'select_form_order'} = ['','critical',@userorder,'sent','trash']; my $output = qq|<script type="text/javascript"> +// <![CDATA[ function folder_choice(targetform,caller) { var permfolders_keys = new Array('$permlistkeys'); var permfolders_vals = new Array('$permlistvals'); @@ -214,6 +215,7 @@ function folder_choice(targetform,caller } } } +// ]]> </script>|; my %show = ('select_form_order' => [10,20,50,100,200], map {$_=>$_} (10,20,50,100,200)); @@ -239,7 +241,7 @@ function folder_choice(targetform,caller <td align="center"><b>'.$lt{'actn'}.'</b><br />'. &Apache::loncommon::select_form('view','folderaction',%actions).' </td><td><br />'. - '<input type="button" value="'.$lt{'go'}.'" onClick="javascript:folder_choice(this.form,'."'change'".');" /> + '<input type="button" value="'.$lt{'go'}.'" onclick="javascript:folder_choice(this.form,'."'change'".');" /> </td> </tr> </table> @@ -247,7 +249,7 @@ function folder_choice(targetform,caller <td align="right"> <table><tr><td><br /> <input type="button" value="'.&mt('New Folder'). - '" onClick="javascript:folder_choice(this.form,'."'new'".');" /></td>'. + '" onclick="javascript:folder_choice(this.form,'."'new'".');" /></td>'. '<td align="center"><b>'.&mt('Name').'</b><br />'. '<input type="text" size="15" name="newfolder" value="" /> </td></tr></table> @@ -295,11 +297,11 @@ sub scrollbuttons { } return '<b>'.&mt('Page').'</b>: '. - '<input type="submit" name="firstview" value="'.&mt('First').'" />'. - '<input type="submit" name="prevview" value="'.&mt('Previous').'" />'. - '<input type="text" size="5" name="startdis" value="'.$start.'" onChange="this.form.submit()" /> of '.$maxdis. - '<input type="submit" name="nextview" value="'.&mt('Next').'" />'. - '<input type="submit" name="lastview" value="'.&mt('Last').'" /><br />'. + '<input type="submit" name="firstview" value="|<" />'. + '<input type="submit" name="prevview" value="<" />'. + ' <input type="text" size="5" name="startdis" value="'.$start.'" onchange="this.form.submit()" /> / '.$maxdis.' '. + '<input type="submit" name="nextview" value=">" />'. + '<input type="submit" name="lastview" value=">|" /><br />'. &mt('<b>[_1] messages</b>: showing messages [_2] through [_3] of [_4].',$status,$first,$finish,$total).'</form>'; } # =============================================================== Status Change @@ -680,6 +682,7 @@ sub disgroup { sub group_check_uncheck { my $output = qq| <script type="text/javascript"> +// <![CDATA[ function toggleAll(form,action) { if (typeof(form.selectedusers_forminput.length)=="undefined") { if (action == 'check') { @@ -697,6 +700,7 @@ function toggleAll(form,action) { } } } +// ]]> </script> |; } @@ -991,6 +995,7 @@ sub disfolder { my $jscript = &Apache::loncommon::check_uncheck_jscript(); $r->print(<<ENDDISHEADER); <script type="text/javascript"> +// <![CDATA[ $jscript function validate_checkedaction() { @@ -1019,11 +1024,11 @@ sub disfolder { } document.disall.submit(); } - +// ]]> </script> ENDDISHEADER - my $fsqs='&folder='.$folder; + my $fsqs='&folder='.$folder; my @temp=&sortedmessages(\%blocked,$startblock,$endblock,\$numblocked,$folder,$msgstatus); my $totalnumber=$#temp+1; if ($totalnumber < 1) { @@ -1137,7 +1142,7 @@ ENDDISHEADER foreach my $item ($localsenttime,$dis_name,$dis_domain,$shortsubj) { $r->print('<td>'.(($status eq 'new')?'<b>':''). '<a href="/adm/email?display='.$origID.$sqs.'">'. - $item.(($status eq 'new')?'</b>':'').'</td>'); + $item.(($status eq 'new')?'</b>':'').'</a></td>'); } my $showstatus; my %statushash = &get_msgstatus_types(); @@ -1356,6 +1361,7 @@ sub compout { $sendmode = '<input type="hidden" name="sendmode" value="group" />'."\n"; $broadcast_js = qq| <script type="text/javascript"> +// <![CDATA[ function courseRecipients() { |; foreach my $type (keys(%access_status)) { @@ -1382,6 +1388,7 @@ function courseRecipients() { $broadcast_js .= qq| return; } +// ]]> </script> |; @@ -1425,7 +1432,9 @@ function courseRecipients() { my $jscript = &Apache::loncommon::check_uncheck_jscript(); $r->print(<<"ENDREPSCRIPT"); <script type="text/javascript"> +// <![CDATA[ $jscript +// ]]> </script> ENDREPSCRIPT } @@ -2738,6 +2747,7 @@ sub recipients_link { $body =~ s{\n}{}g; $r->print(<<ENDJS); <script type="text/javascript"> +// <![CDATA[ function showBroadcastList() { var caller = this; var newWindow = null; @@ -2760,7 +2770,7 @@ function writeWin(caller) { caller.document.close(); caller.focus(); } - +// ]]> </script> ENDJS @@ -3219,7 +3229,7 @@ sub handler { 'recordftf','sortedby','block','folder','startdis','interdis', 'showcommentbaseurl','dismode','group','subject','text','ref', 'msgstatus']); - $sqs='&sortedby='.$env{'form.sortedby'}; + $sqs='&sortedby='.$env{'form.sortedby'}; # ------------------------------------------------------ They checked for email unless ($env{'form.block'}) { @@ -3240,7 +3250,7 @@ sub handler { unless ($folder) { $folder=''; } else { - $sqs.='&folder='.&escape($folder); + $sqs.='&folder='.&escape($folder); } # ------------------------------------------------------------ Get Display Mode @@ -3272,7 +3282,7 @@ sub handler { $startdis++; } my $postedstartdis=$startdis+1; - $sqs.='&startdis='.$postedstartdis; + $sqs.='&startdis='.$postedstartdis; # --------------------------------------------------------------- Render Output