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

raeburn raeburn@source.lon-capa.org
Thu, 13 Aug 2009 16:58:36 -0000


raeburn		Thu Aug 13 16:58:36 2009 EDT

  Modified files:              (Branch: version_2_9_X)
    /loncom/interface	lonmsgdisplay.pm 
  Log:
  - Backport 1.127, 1.128.
  
  
Index: loncom/interface/lonmsgdisplay.pm
diff -u loncom/interface/lonmsgdisplay.pm:1.124 loncom/interface/lonmsgdisplay.pm:1.124.4.1
--- loncom/interface/lonmsgdisplay.pm:1.124	Mon May 11 16:51:27 2009
+++ loncom/interface/lonmsgdisplay.pm	Thu Aug 13 16:58:36 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines for messaging display
 #
-# $Id: lonmsgdisplay.pm,v 1.124 2009/05/11 16:51:27 bisitz Exp $
+# $Id: lonmsgdisplay.pm,v 1.124.4.1 2009/08/13 16:58:36 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -173,6 +173,7 @@
 
     $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 @@
         }
     }
 }
+// ]]>
 </script>|;
     my %show = ('select_form_order' => [10,20,50,100,200],
 		map {$_=>$_} (10,20,50,100,200));
@@ -239,7 +241,7 @@
      <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 @@
   <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 @@
     }
     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="|&lt;" />'.
+   '<input type="submit" name="prevview" value="&lt;" />'.
+   '<input type="text" size="5" name="startdis" value="'.$start.'" onchange="this.form.submit()" /> of '.$maxdis.
+   '<input type="submit" name="nextview" value="&gt;" />'.
+   '<input type="submit" name="lastview" value="&gt;|" /><br />'.
    &mt('<b>[_1] messages</b>: showing messages [_2] through [_3] of [_4].',$status,$first,$finish,$total).'</form>';
 }
 # =============================================================== Status Change
@@ -670,6 +672,7 @@
 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') {
@@ -687,6 +690,7 @@
         }
     }
 }
+// ]]>
 </script>
     |;
 }
@@ -981,6 +985,7 @@
     my $jscript = &Apache::loncommon::check_uncheck_jscript();
     $r->print(<<ENDDISHEADER);
 <script type="text/javascript">
+// <![CDATA[
     $jscript
 
     function validate_checkedaction() {
@@ -1009,11 +1014,11 @@
         }
         document.disall.submit();
     }
-
+// ]]>
 </script>
 ENDDISHEADER
 
-    my $fsqs='&folder='.$folder;
+    my $fsqs='&amp;folder='.$folder;
     my @temp=&sortedmessages(\%blocked,$startblock,$endblock,\$numblocked,$folder,$msgstatus);
     my $totalnumber=$#temp+1;
     if ($totalnumber < 1) {
@@ -1127,7 +1132,7 @@
             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();
@@ -1346,6 +1351,7 @@
             $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)) {
@@ -1372,6 +1378,7 @@
         $broadcast_js .= qq|
     return;
 }
+// ]]>
 </script>
 
 |;
@@ -1415,7 +1422,9 @@
         my $jscript = &Apache::loncommon::check_uncheck_jscript();
         $r->print(<<"ENDREPSCRIPT");
 <script type="text/javascript">
+// <![CDATA[
 $jscript
+// ]]>
 </script>
 ENDREPSCRIPT
     }
@@ -1867,7 +1876,7 @@
 	return;
     }
     my $crstype = &Apache::loncommon::course_type();
-    my $leaders = ($crstype eq 'Group') ? 'coordinators and leaders'
+    my $leaders = ($crstype eq 'Community') ? 'coordinators and leaders'
                                         : 'faculty and staff';
     &printheader($r,
 		 '/adm/email?recordftf=query',
@@ -1954,7 +1963,7 @@
 	$r->print('Not allowed');
 	return;
     }
-    my $usertype = (&Apache::loncommon::course_type() eq 'Group') ? 'members'
+    my $usertype = (&Apache::loncommon::course_type() eq 'Community') ? 'members'
 	                                                          : 'students';
     my %lt=&Apache::lonlocal::texthash(
             'comb' => 'Communication Blocking',
@@ -2732,6 +2741,7 @@
             $body =~ s{\n}{}g;
             $r->print(<<ENDJS);
 <script type="text/javascript">
+// <![CDATA[
 function showBroadcastList() {
     var caller = this;
     var newWindow = null;
@@ -2754,7 +2764,7 @@
     caller.document.close();
     caller.focus();
 }
-
+// ]]>
 </script>
 
 ENDJS
@@ -3213,7 +3223,7 @@
          'recordftf','sortedby','block','folder','startdis','interdis',
 	 'showcommentbaseurl','dismode','group','subject','text','ref',
          'msgstatus']);
-    $sqs='&sortedby='.$env{'form.sortedby'};
+    $sqs='&amp;sortedby='.$env{'form.sortedby'};
 
 # ------------------------------------------------------ They checked for email
     unless ($env{'form.block'}) {
@@ -3234,7 +3244,7 @@
     unless ($folder) { 
 	$folder=''; 
     } else {
-	$sqs.='&folder='.&escape($folder);
+	$sqs.='&amp;folder='.&escape($folder);
     }
 # ------------------------------------------------------------ Get Display Mode
 
@@ -3266,7 +3276,7 @@
 	$startdis++;
     }
     my $postedstartdis=$startdis+1;
-    $sqs.='&startdis='.$postedstartdis;
+    $sqs.='&amp;startdis='.$postedstartdis;
 
 # --------------------------------------------------------------- Render Output