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

raeburn lon-capa-cvs@mail.lon-capa.org
Tue, 27 Feb 2007 22:16:06 -0000


This is a MIME encoded message

--raeburn1172614566
Content-Type: text/plain

raeburn		Tue Feb 27 17:16:06 2007 EDT

  Modified files:              
    /loncom/interface	loncommon.pm lonwhatsnew.pm 
  Log:
  - More comprehensive CSS use in "What's New" display.
  - Move row color definitions from lonwhatsnew.pm to loncommon::standard_css().
  - Add some style definitions to loncommon::standard_css() for nested tables (as used in "What's New" display.
  - Rename LC_whatsnew styles as LC_nested_outer and LC_nested, as use on other pages besides "What's New" is anticipated.
  
  
--raeburn1172614566
Content-Type: text/plain
Content-Disposition: attachment; filename="raeburn-20070227171606.txt"

Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.506 loncom/interface/loncommon.pm:1.507
--- loncom/interface/loncommon.pm:1.506	Mon Feb  5 13:40:41 2007
+++ loncom/interface/loncommon.pm	Tue Feb 27 17:16:02 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.506 2007/02/05 18:40:41 raeburn Exp $
+# $Id: loncommon.pm,v 1.507 2007/02/27 22:16:02 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3836,6 +3836,18 @@
 .LC_data_table_dense {
   font-size: small;
 }
+table.LC_nested_outer {
+  border: 1px solid #000000;
+  border-collapse: separate;
+  border-spacing: 0px;
+  width: 100%;
+}
+table.LC_nested {
+  border: 0px;
+  border-collapse: separate;
+  border-spacing: 0px;
+  width: 100%;
+}
 table.LC_data_table tr th, table.LC_calendar tr th, table.LC_mail_list tr th {
   font-weight: bold;
   background-color: $data_table_head;
@@ -3854,36 +3866,50 @@
   background-color: $data_table_darker;
 }
 table.LC_data_table tr.LC_empty_row td,
-table.LC_whatsnew tr.LC_empty_row td {
+table.LC_nested tr.LC_empty_row td {
   background-color: #FFFFFF;
   font-weight: bold;
   font-style: italic;
   text-align: center;
   padding: 8px;
 }
-table.LC_whatsnew tr.LC_empty_row td {
+table.LC_nested tr.LC_empty_row td {
   padding: 4ex
 }
-table.LC_whatsnew {
+table.LC_nested_outer tr th {
+  font-weight: bold;
+  background-color: $data_table_head;
+  font-size: smaller;
+  border-bottom: 1px solid #000000;
+}
+table.LC_nested_outer tr td.LC_subheader {
+  background-color: $data_table_head;
+  font-weight: bold;
+  font-size: small;
+  border-bottom: 1px solid #000000;
+  text-align: right;
 }
-
-table.LC_whatsnew tr th,
-table.LC_whatsnew tr.LC_info_row td {
+table.LC_nested tr.LC_info_row td {
   background-color: #CCC;
   font-weight: bold;
   font-size: small;
-  text-align: right;
+  text-align: center;
+}
+table.LC_nested tr.LC_info_row td.LC_left_item {
+  text-align: left;
 }
-table.LC_whatsnew tr td {
+table.LC_nested td {
   background-color: #FFF;
   font-size: small;
-  text-align: right;
 }
-table.LC_whatsnew tr td.LC_first_item {
-  text-align: left;
+table.LC_nested_outer tr th.LC_right_item,
+table.LC_nested tr.LC_info_row td.LC_right_item,
+table.LC_nested tr.LC_odd_row td.LC_right_item,
+table.LC_nested tr td.LC_right_item {
+  text-align: right;
 }
 
-table.LC_whatsnew tr.LC_odd_row td {
+table.LC_nested tr.LC_odd_row td {
   background-color: #EEE;
 }
 
Index: loncom/interface/lonwhatsnew.pm
diff -u loncom/interface/lonwhatsnew.pm:1.67 loncom/interface/lonwhatsnew.pm:1.68
--- loncom/interface/lonwhatsnew.pm:1.67	Wed Dec 20 18:02:33 2006
+++ loncom/interface/lonwhatsnew.pm	Tue Feb 27 17:16:02 2007
@@ -1,5 +1,5 @@
 #
-# $Id: lonwhatsnew.pm,v 1.67 2006/12/20 23:02:33 raeburn Exp $
+# $Id: lonwhatsnew.pm,v 1.68 2007/02/27 22:16:02 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -243,9 +243,6 @@
 sub display_actions_box {
     my ($r,$tabbg,$command,$refpage,$threshold_titles,$interval_titles,
                                       $initpage,$cdom,$crs,$checkallowed) = @_;
-    my $rowColor1 = "#ffffff";
-    my $rowColor2 = "#eeeeee";
-
     my $udom = $env{'user.domain'};
     my $uname = $env{'user.name'};
     my $cid = $env{'request.course.id'};
@@ -396,7 +393,7 @@
     }
 
     if ($needitems) {
-        &getitems(\%unread,\%ungraded,\%bombed,\%triggered,\%changed,\@newdiscussions,\@tograde,\@bombs,\@warnings,$rowColor1,$rowColor2,\%threshold,$cdom,$crs,\%res_title,\%show,$starttime,$countunread);
+        &getitems(\%unread,\%ungraded,\%bombed,\%triggered,\%changed,\@newdiscussions,\@tograde,\@bombs,\@warnings,\%threshold,$cdom,$crs,\%res_title,\%show,$starttime,$countunread);
     }
     if ($show{'coursenormalmail'}) {
         $msgcount = &getnormalmail(\@newmsgs);
@@ -432,7 +429,7 @@
             if ($displayed == $halfway) {
                 $r->print('</td><td width="6%">&nbsp;</td><td align="left" valign="top" width="47%">');
             }
-            &display_launcher($r,$actionitem,$refpage,$checkallowed,$tabbg,$rowColor1,$rowColor2,\%show,\%headings,\%res_title,\@tograde,\%ungraded,\@bombs,\%bombed,\%changed,\@warnings,\%triggered,\@newdiscussions,\%unread,$msgcount,\@newmsgs,$critmsgcount,\@critmsgs,$interval,$countunread);
+            &display_launcher($r,$actionitem,$refpage,$checkallowed,$tabbg,\%show,\%headings,\%res_title,\@tograde,\%ungraded,\@bombs,\%bombed,\%changed,\@warnings,\%triggered,\@newdiscussions,\%unread,$msgcount,\@newmsgs,$critmsgcount,\@critmsgs,$interval,$countunread);
             $displayed ++; 
         }
     }
@@ -471,48 +468,31 @@
                          );
     &get_curr_thresholds(\%threshold,$uname,$udom,$cid,$cdom,$crs);
 
-    $r->print('<br /><form name="thresholdform" method="post" action="/adm/whatsnew">
-        <table border="0" cellpadding="2" cellspacing="4">
-         <tr>
-          <td align="left" valign="top" width="45%">
-           <table border="0" cellpadding="0" cellspacing="0" bgcolor="#000000">
-            <tr>
-             <td>
-               <table border="0" cellpadding="1" cellspacing="1" bgcolor="#000000">
-                <tr>
-                <td bgcolor="#ffffff">
-                 <table cellspacing="0" cellpadding="4" border="0">
-     <tr bgcolor="'.$tabbg.'">
-      <th>Threshold Name</th>
-      <th>Current value</th>
-      <th>Change?</th>
-     </tr>');
-    my $rowNum =0;
+    $r->print('<br /><form name="thresholdform" method="post" action="/adm/whatsnew">'.
+              &Apache::loncommon::start_data_table().
+              &Apache::loncommon::start_data_table_header_row().
+             '<th>Threshold Name</th>'."\n".
+             '<th>Current value</th>'."\n".
+             '<th>Change?</th>'."\n".
+              &Apache::loncommon::end_data_table_header_row());
     foreach my $type (@thresholditems) {
         my $parameter = $env{'request.course.id'}.':threshold_'.$type;
 # onchange is javascript to automatically check the 'Set' button.
         my $onchange = 'onFocus="javascript:window.document.forms'.
               "['thresholdform'].elements['".$parameter."_setparmval']".
               '.checked=true;"';
-        if ($rowNum %2 == 1) {
-            $rowColor = $rowColor1;
-        } else {
-            $rowColor = $rowColor2;
-        }
-        $r->print('
-     <tr bgcolor="'.$rowColor.'">
-      <td>'.$threshold_titles{$type}.'</td>
-      <td>'.&Apache::lonhtmlcommon::textbox($parameter.'_value',
+        $r->print(&Apache::loncommon::start_data_table_row()."\n".
+                 '<td>'.$threshold_titles{$type}.'</td>'."\n".
+                 '<td>'.&Apache::lonhtmlcommon::textbox($parameter.'_value',
                                             $threshold{$type},
-                                            10,$onchange).'</td>
-      <td>'
-           .&Apache::lonhtmlcommon::checkbox($parameter.'_setparmval').
-      '</td>
-     </tr>');
-        $rowNum ++;
+                                            10,$onchange).'</td>'."\n".
+                 '<td>'.
+                 &Apache::lonhtmlcommon::checkbox($parameter.'_setparmval').
+                 '</td>'."\n".
+                 &Apache::loncommon::end_data_table_row());
     }
-    $r->print('</table></td></tr></table></td></tr></table>
-           <br /><input type="submit" name="threshold" value="Make changes" />
+    $r->print(&Apache::loncommon::end_data_table()."\n".
+          '<br /><input type="submit" name="threshold" value="Make changes" />
                  <input type="hidden" name="command" value="update" />
                  <input type="hidden" name="refpage" value="'.$refpage.'" />
                </form>');
@@ -674,36 +654,30 @@
 }
 
 sub display_launcher {
-    my ($r,$action,$refpage,$checkallowed,$tabbg,$rowColor1,$rowColor2,$show,
-        $headings,$res_title,$tograde,$ungraded,$bombs,$bombed,$changed,
-        $warnings,$triggered,$newdiscussions,$unread,$msgcount,$newmsgs,
-                          $critmsgcount,$critmsgs,$interval,$countunread) = @_;
+    my ($r,$action,$refpage,$checkallowed,$tabbg,$show,$headings,$res_title,
+        $tograde,$ungraded,$bombs,$bombed,$changed,$warnings,$triggered,
+        $newdiscussions,$unread,$msgcount,$newmsgs,$critmsgcount,$critmsgs,
+        $interval,$countunread) = @_;
 
     if ($$checkallowed{$action}) {
         &start_box($r,$tabbg,$show,$headings,$action,$refpage,$action);
         if ($$show{$action}) {
             if ($action eq 'handgrading') {    # UNGRADED ITEMS
-                &display_handgrade($r,$tograde,$rowColor1,$rowColor2,
-                                                                    $ungraded);
+                &display_handgrade($r,$tograde,$ungraded);
             } elsif ($action eq 'haserrors') { # BOMBS
-                &display_haserrors($r,$bombs,$rowColor1,$rowColor2,$bombed,
-                                                                   $res_title);
+                &display_haserrors($r,$bombs,$bombed,$res_title);
             } elsif ($action eq 'versionchanges') { # VERSION CHANGES
-                &display_versionchanges($r,$changed,$res_title,$rowColor1,
-                                                         $rowColor2,$interval);
-
+                &display_versionchanges($r,$changed,$res_title,$interval);
             } elsif ($action eq 'abovethreshold') { # DEGDIFF/AV. TRIES TRIGGERS
                 &display_abovethreshold($r,$refpage,$warnings,$triggered,
 					$res_title);
             } elsif ($action eq 'coursediscussion') { # UNREAD COURSE DISCUSSION
                 &display_coursediscussion($r,$newdiscussions,$unread,
-                                $countunread,$res_title,$rowColor1,$rowColor2);
+                                $countunread,$res_title);
             } elsif ($action eq 'coursenormalmail') { # NORMAL MESSAGES
-                &display_coursenormalmail($r,$msgcount,$newmsgs,$rowColor1,
-                                                                   $rowColor2);
+                &display_coursenormalmail($r,$msgcount,$newmsgs);
             } elsif ($action eq 'coursecritmail') { # CRITICAL MESSAGES
-                &display_coursecritmail($r,$critmsgcount,$critmsgs,$rowColor1,
-                                                                   $rowColor2);
+                &display_coursecritmail($r,$critmsgcount,$critmsgs);
             }
         }
         &end_box($r);
@@ -713,8 +687,8 @@
 
 sub getitems {
     my ($unread,$ungraded,$bombed,$triggered,$changed,$newdiscussions,
-        $tograde,$bombs,$warnings,$rowColor1,$rowColor2,$threshold,$cdom,$crs,
-                                 $res_title,$show,$starttime,$countunread) = @_;
+        $tograde,$bombs,$warnings,$threshold,$cdom,$crs,$res_title,$show,
+        $starttime,$countunread) = @_;
     my $navmap = Apache::lonnavmaps::navmap->new();
     # force retrieve Resource to seed the part id cache we'll need it later
     my @allres=$navmap->retrieveResources(undef,
@@ -849,7 +823,6 @@
     my %stats;
     my %lastreset = ();
     my $warning = 0;
-    my $rowColor;
     foreach my $part (@parts) {
         if ($resource->handgrade($part) eq 'yes') {
             next;
@@ -1139,22 +1112,20 @@
 }
 
 sub display_handgrade {
-    my ($r,$tograde,$rowColor1,$rowColor2,$ungraded) = @_;
-    my $rowColor;
+    my ($r,$tograde,$ungraded) = @_;
     my %lt = &Apache::lonlocal::texthash(
                         'prna' => 'Problem Name',
                         'nmun' => 'Number ungraded',
                         'nopr' => 'No problems require handgrading',
     );
     if (@{$tograde} > 0) {
-        $r->print('<tr bgcolor="#cccccc"><td><b><small>'.$lt{'prna'}.'</small></b></td><td align="right"><b><small>'.$lt{'nmun'}.'</small></b></td></tr>');
+        $r->print('<tr class="LC_info_row"><td class="LC_left_item">'.
+                  $lt{'prna'}.'</td><td class="LC_right_item">'.
+                  $lt{'nmun'}.'</td></tr>');
         my $rowNum = 0;
         foreach my $res (@{$tograde}) {
-            if ($rowNum %2 == 1) {
-                $rowColor = $rowColor1;
-            } else {
-                $rowColor = $rowColor2;
-            }
+            $rowNum ++;
+            my $css_class = $rowNum%2?' class="LC_odd_row"':'';
             my ($map,$id,$url)=&Apache::lonnet::decode_symb($res);
             my $linkurl=&Apache::lonnet::clutter($url);
             $linkurl .= '?symb='.&escape($res);
@@ -1162,37 +1133,35 @@
                 $linkurl = 
                     $$ungraded{$res}{'enclink'}.'?symb='.$$ungraded{$res}{'encsymb'};
             } 
-            $r->print('<tr bgcolor="'.$rowColor.'"><td><a href="'.$linkurl.'"><small>'.$$ungraded{$res}{title}.'</small></a></td><td align="right"><small>'.$$ungraded{$res}{count}.'</small></td></tr>');
-            $rowNum ++;
+            $r->print('<tr'.$css_class.'><td><a href="'.$linkurl.'">'.$$ungraded{$res}{title}.'</a></td><td class="LC_right_item">'.$$ungraded{$res}{count}.'</td></tr>');
         }
     } else {
-        $r->print('<tr><td bgcolor="#ffffff"><br><center><i><b><small>&nbsp;&nbsp;'.$lt{'nopr'}.'&nbsp;&nbsp;</small><br><br></b></i></td></tr>');
+        $r->print('<tr class="LC_empty_row"><td>'.$lt{'nopr'}.'</td></tr>');
     }
 }
 
 sub display_haserrors {
-    my ($r,$bombs,$rowColor1,$rowColor2,$bombed,$res_title) = @_;
+    my ($r,$bombs,$bombed,$res_title) = @_;
     my $bombnum = 0;
-    my $rowColor;
     my %lt = &Apache::lonlocal::texthash(
                                    reso => 'Resource',
                                    nmer => 'Number of errors',
                                    noer => 'No problems with errors',
     );
     if (@{$bombs} > 0) {
-        $r->print('<tr bgcolor="#cccccc"><td><b><small>'.$lt{'reso'}.'</small></b></td><td align="right"><b><small>'.$lt{'nmer'}.'</small></b></td></tr>');
+        $r->print('<tr class="LC_info_row"><td class="LC_left_item">'.
+                  $lt{'reso'}.'</td><td class="LC_right_item">'.
+                  $lt{'nmer'}.'</td></tr>');
         @{$bombs} = sort { &cmp_title($a,$b,$res_title) } @{$bombs};
         foreach my $bomb (@{$bombs}) {
-            if ($bombnum %2 == 1) {
-                $rowColor = $rowColor1;
-            } else {
-                $rowColor = $rowColor2;
-            }
-            $r->print('<tr bgcolor="'.$rowColor.'"><td><small>'.$$bombed{$bomb}{errorlink}.'</small></td><td align="right"><small>'.$$bombed{$bomb}{errorcount}.'</small></td></tr>');
             $bombnum ++;
+            my $css_class = $bombnum%2?' class="LC_odd_row"':'';
+            $r->print('<tr'.$css_class.'><td>'.$$bombed{$bomb}{errorlink}.
+                      '</td><td class="LC_right_item">'.
+                      $$bombed{$bomb}{errorcount}.'</td></tr>');
         }
     } else {
-        $r->print('<tr><td bgcolor="#ffffff"><br /><center><b><i><small>'.$lt{'noer'}.'</small></i></b></center><br /></td></tr>');
+        $r->print('<tr class="LC_empty_row"><td>'.$lt{'noer'}.'</td></tr>');
     }
     return;
 }
@@ -1217,10 +1186,11 @@
                 ' <input type="hidden" name="refpage" value="'.$refpage.'" />'.
                 "\n");
         $r->print('<tr class="LC_info_row">'.
-		  '<td class="LC_first_item">'.$lt{'reso'}.'</td>'.
+		  '<td class="LC_left_item">'.$lt{'reso'}.'</td>'.
 		  '<td>'.$lt{'part'}.'</td><td>'.$lt{'nust'}.'</td>'.
 		  '<td>'.$lt{'avat'}.'</td><td>'.$lt{'dedi'}.'</td>'.
-		  '<td>'.$lt{'lare'}.'</td><td>'.$lt{'reco'}.'</td></tr>');
+		  '<td>'.$lt{'lare'}.'</td><td  class="LC_right_item">'.
+                  $lt{'reco'}.'</td></tr>');
 	my $row;
         foreach my $res (@{$warnings}) {
 	    $row++;
@@ -1235,8 +1205,8 @@
                 $linkurl = 
                   $$triggered{$res}{'enclink'}.'?symb='.$$triggered{$res}{'encsymb'};
             }
-            my $css_class = $row%2?'LC_odd_row':'';
-            $r->print('<tr class="'.$css_class.'">'.
+            my $css_class = $row%2?' class="LC_odd_row"':'';
+            $r->print('<tr'.$css_class.'>'.
 		      '<td class="LC_first_item" '.$rowspan.'><a href="'.$linkurl.'">'.
 		      $$triggered{$res}{title}.'</a></td>');
                       if (ref($$triggered{$res}{text}) eq 'ARRAY') {
@@ -1252,14 +1222,14 @@
                 }
             }
         }
-        $r->print('<tr class="LC_info_row"><td colspan="7"><br /><input type="submit" name="counters" value="'.$lt{'rese'}.'" /></td></tr></form>');
+        $r->print('<tr class="LC_info_row"><td colspan="7" class="LC_right_item"><br /><input type="submit" name="counters" value="'.$lt{'rese'}.'" /></td></tr></form>');
     } else {
         $r->print('<tr class="LC_empty_row"><td>'.$lt{'nopr'}.'</td></tr>');
     }
 }
 
 sub display_versionchanges {
-    my ($r,$changed,$res_title,$rowColor1,$rowColor2,$interval) = @_;
+    my ($r,$changed,$res_title,$interval) = @_;
     my %lt = &Apache::lonlocal::texthash(
         'reso' => 'Resource',
         'revd' => 'Last revised',
@@ -1267,35 +1237,35 @@
         'veru' => 'Version used',
         'noup' => 'No updated versions', 
     );
-    my $rowColor;
     if (keys(%{$changed}) > 0) {
-        $r->print('<tr bgcolor="#cccccc"><td><b><small>'.$lt{'reso'}.'</small></b></td><td><b><small>'.$lt{'revd'}.'</small></b></td><td><b><small>'.$lt{'newv'}.'</small></b></td><td><b><small>'.$lt{'veru'}.'</small></b></td></tr>');
-        
-        
+        $r->print('<tr class="LC_info_row"><td class="LC_left_item">'.
+                  $lt{'reso'}.'</td><td>'.$lt{'revd'}.'</td><td>'.
+                  $lt{'newv'}.'</td><td class="LC_right_item">'.
+                  $lt{'veru'}.'</td></tr>');
         my @changes = sort { &cmp_title($a,$b,$res_title) } keys(%{$changed});
         my $changenum = 0;
         foreach my $item (@changes) {
-            if ($changenum %2 == 1) {
-                $rowColor = $rowColor1;
-            } else {
-                $rowColor = $rowColor2;
-            }
+            $changenum ++;
+            my $css_class = $changenum%2?' class="LC_odd_row"':'';
             my ($map,$id,$url)=&Apache::lonnet::decode_symb($item);
             my $linkurl=&Apache::lonnet::clutter($url);
             $linkurl .= '?symb='.&escape($item);
 
-            $r->print('<tr bgcolor="'.$rowColor.'"><td><small><a href="'.$linkurl.'">'.$$res_title{$item}.'</a></small></td><td><small>'.$$changed{$item}{'revdate'}.'</small></td><td><small>'.$$changed{$item}{'current'}.'</small></td><td><small>'.$$changed{$item}{'version'}.'</small></td></tr>');
-            $changenum ++;
+            $r->print('<tr'.$css_class.'><td><a href="'.$linkurl.'">'.
+                      $$res_title{$item}.'</a></td><td>'.
+                      $$changed{$item}{'revdate'}.'</td><td>'.
+                      $$changed{$item}{'current'}.'</td><td>'.
+                      $$changed{$item}{'version'}.'</td></tr>');
         }
     } else {
-        $r->print('<tr><td bgcolor="#ffffff"><br /><center><b><i><small>'.$lt{'noup'}.' '.$interval.'</small></i></b></center><br /></td></tr>');
+        $r->print('<tr class="LC_empty_row"><td>'.$lt{'noup'}.
+                  ' '.$interval.'</td></tr>');
     }
     return;
 }
  
 sub display_coursediscussion {
-    my ($r,$newdiscussions,$unread,$countunread,$res_title,$rowColor1,
-                                                              $rowColor2) = @_;
+    my ($r,$newdiscussions,$unread,$countunread,$res_title) = @_;
     my $lctype = lc(&Apache::loncommon::course_type());
     my %lt = &Apache::lonlocal::texthash(
                 'loca' => 'Location',
@@ -1304,24 +1274,22 @@
                 'noun' => 'No unread posts in '.$lctype.' discussions',
                 'tmlp' => 'Time of last post', 
     );
-    my $rowColor;
     if (@{$newdiscussions} > 0) {
-        $r->print('<tr bgcolor="#cccccc"><td><b><small>'.$lt{'loca'}.
-                  '</small></b></td><td><b><small>'.$lt{'type'}.
-                  '</small></b>');
+        $r->print('<tr class="LC_info_row"><td class="LC_left_item">'.
+                  $lt{'loca'}.'</td><td>'.
+                  $lt{'type'}.'</td>');
         if ($countunread eq 'on') {
-            $r->print('<td><b><small>'.$lt{'tmlp'}.'</small></b></td>'.
-                      '<td align="right"><b><small>'.$lt{'numn'}.
-                      '</small></b></td>');
+            $r->print('<td>'.$lt{'tmlp'}.'</td>'.
+                      '<td class="LC_right_item">'.$lt{'numn'}.'</td>');
         } else {
-            $r->print('<td align="right"><b><small>'.$lt{'tmlp'}.
-                         '</small></b></td>');
+            $r->print('<td class="LC_right_item">'.$lt{'tmlp'}.'</td>');
         }
         $r->print("</tr>\n");
         @{$newdiscussions} = sort { &cmp_title($a,$b,$res_title) }
                                                             @{$newdiscussions};
         my $rowNum = 0;
         foreach my $ressymb (@{$newdiscussions}) {
+            $rowNum ++;
             my $forum_title = $$unread{$ressymb}{'title'};
             my $type = 'Resource';
             my $feedurl=&Apache::lonfeedback::get_feedurl($ressymb);
@@ -1332,73 +1300,70 @@
             if ($$unread{$ressymb}{'enclink'}) {
                 $disclink = $$unread{$ressymb}{'enclink'}.'?symb='.$$unread{$ressymb}{'encsymb'};
             }
-            if ($rowNum %2 == 1) {
-                $rowColor = $rowColor1;
-            } else {
-                $rowColor = $rowColor2;
-            }
+            my $css_class = $rowNum%2?' class="LC_odd_row"':'';
             my $lastpost = &Apache::lonnavmaps::timeToHumanString(
                                                $$unread{$ressymb}{'lastpost'});
-            $r->print('<tr bgcolor="'.$rowColor.'"><td><small><a href="'.$disclink.'">'.$forum_title.'</a>&nbsp;</td><td><small>'.$type.'&nbsp;</small></td>');
+            $r->print('<tr'.$css_class.'><td><a href="'.$disclink.'">'.$forum_title.'</a>&nbsp;</td><td>'.$type.'&nbsp;</td>');
             if ($countunread eq 'on') {
                 my $unreadnum = $$unread{$ressymb}{'unreadcount'};
-                $r->print('<td><small>'.$lastpost.'<small></td><td align="right">'.
-                          '<small>',$unreadnum.'&nbsp;</small></td>');
+                $r->print('<td>'.$lastpost.'</td><td class="LC_right_item">'.
+                          $unreadnum.'&nbsp;</td>');
             } else {
-                $r->print('<td align="right"><small>'.$lastpost.'</small></td>');
+                $r->print('<td class="LC_right_item">'.$lastpost.'</td>');
             }
             $r->print("</tr>\n");
-            $rowNum ++;
         }
     } else {
-        $r->print('<tr><td bgcolor="#ffffff"><br><center>&nbsp;<i><b><small>'.
-                  $lt{'noun'}.'</small></b></i><br><br></td></tr>');
+        $r->print('<tr class="LC_empty_row"><td>'.$lt{'noun'}.'</td></tr>');
     }
 }
 
 sub display_coursenormalmail {
-    my ($r,$msgcount,$newmsgs,$rowColor1,$rowColor2) = @_;
-    my $rowColor;
+    my ($r,$msgcount,$newmsgs) = @_;
     my $lctype = lc(&Apache::loncommon::course_type());
     if ($msgcount > 0) {
-        $r->print('<tr bgcolor="#cccccc"><td><b><small>'.&mt('Number').'</small></b></td><td><b><small>'.&mt('Subject').'</small></b></td><td><b><small>'.&mt('Sender').'</small></b></td><td><b><small>'.&mt('Date/Time').'</small></b></td></tr>');
-        my $rowNum = 0;
-        my $mailcount = 1;
+        $r->print('<tr class="LC_info_row"><td class="LC_left_item">'.
+                  &mt('Number').'</td><td>'.&mt('Subject').'</td><td>'.
+                  &mt('Sender').'</td><td class="LC_right_item">'.
+                  &mt('Date/Time').'</td></tr>');
+        my $mailcount = 0;
         foreach my $msg (@{$newmsgs}) {
-            if ($rowNum %2 == 1) {
-                $rowColor = $rowColor1;
-            } else {
-                $rowColor = $rowColor2;
-            }
-            $r->print('<tr bgcolor="'.$rowColor.'"><td valign="top"><small>'.$mailcount.'. &nbsp;</small></td><td valign="top"><small><a href="/adm/communicate">'.$msg->{'shortsub'}.'</a>&nbsp; &nbsp;</small></td><td valign="top"><small>&nbsp;'.$msg->{'from'}.'@'.$msg->{'fromdom'}.'&nbsp;</small></td><td valign="top"><small>'.$msg->{'sendtime'}.'</small></td></tr>');
-            $rowNum ++;
             $mailcount ++;
+            my $css_class = $mailcount%2?' class="LC_odd_row"':'';
+            $r->print('<tr'.$css_class.'><td>'.$mailcount.
+                      '. &nbsp;</td><td><a href="/adm/communicate">'.
+                      $msg->{'shortsub'}.'</a>&nbsp; &nbsp;</td><td>&nbsp;'.
+                      $msg->{'from'}.'@'.$msg->{'fromdom'}.'&nbsp;</td><td>'.
+                      $msg->{'sendtime'}.'</td></tr>');
         }
     } else {
-        $r->print('<tr><td bgcolor="#ffffff" width="100%"><center><br /><b><i><small>'.&mt('No new '.$lctype.' messages').'</small></i></b><br /><br /></center></td></tr>');
+        $r->print('<tr class="LC_empty_row"><td>'.
+                  &mt('No new '.$lctype.' messages').'</td></tr>');
     }
 }
 
 sub display_coursecritmail {
-    my ($r,$critmsgcount,$critmsgs,$rowColor1,$rowColor2) = @_;
-    my $rowColor;
+    my ($r,$critmsgcount,$critmsgs) = @_;
     my $lctype = lc(&Apache::loncommon::course_type());
     if ($critmsgcount > 0) {
-        $r->print('<tr bgcolor="#cccccc"><td><b><small>'.&mt('Number').'</small></b></td><td><b><small>'.&mt('Subject').'</small></b></td><td><b><small>'.&mt('Sender').'</small></b></td><td><b><small>'.&mt('Date/Time').'</small></b></td></tr>');
-        my $rowNum = 0;
-        my $mailcount = 1;
+        $r->print('<tr class="LC_info_row"><td class="LC_left_item">'.
+                  &mt('Number').'</td><td>'.&mt('Subject').'</td><td>'.
+                  &mt('Sender').'</td><td class="LC_right_item">'.
+                  &mt('Date/Time').'</td></tr>');
+        my $mailcount = 0;
         foreach my $msg (@{$critmsgs}) {
-            if ($rowNum %2 == 1) {
-                $rowColor = $rowColor1;
-            } else {
-                $rowColor = $rowColor2;
-            }
-            $r->print('<tr bgcolor="'.$rowColor.'"><td valign="top"><small>'.$mailcount.'. &nbsp;<small></td><td valign="top"><small><a href="/adm/email?folder=critical">'.$msg->{'shortsub'}.'</a>&nbsp; &nbsp;</small></td><td valign="top"><small>&nbsp;'.$msg->{'from'}.'@'.$msg->{'fromdom'}.'&nbsp;</small></td><td valign="top"><small>'.$msg->{'sendtime'}.'</small></td></tr>');
-            $rowNum ++;
             $mailcount ++;
+            my $css_class = $mailcount%2?' class="LC_odd_row"':'';
+            $r->print('<tr'.$css_class.'><td>'.$mailcount.
+                      '. &nbsp;</td><td><a href="/adm/email?folder=critical">'.
+                      $msg->{'shortsub'}.'</a>&nbsp; &nbsp;</td><td>&nbsp;'.
+                      $msg->{'from'}.'@'.$msg->{'fromdom'}.'&nbsp;</td><td>'.
+                      $msg->{'sendtime'}.'</td></tr>');
         }
     } else {
-        $r->print('<tr><td bgcolor="#ffffff" width="100%"><center><br /><b><i><small>'.&mt('No unread critical messages in '.$lctype).'</small></i></b><br /><br /></center></td></tr>');
+        $r->print('<tr class="LC_empty_row"><td>'.
+                  &mt('No unread critical messages in '.$lctype).
+                  '</td></tr>');
     }
 }
 
@@ -1547,7 +1512,7 @@
                        chin => 'Change interval?',
                        chop => 'Change options?',
     );
-    my ($showhide,$class);
+    my $showhide;
     if ($$show{$caller}) {
         $showhide = '<b><a href="javascript:change_display(document.visible.'.
                                'display_'.$caller.",'hide'".');">Hide</a></b>';
@@ -1558,47 +1523,37 @@
     }
     
     $r->print('
-         <table border="0" cellpadding="0" cellspacing="0" bgcolor="#000000" width="100%">
+         <table class="LC_nested_outer">
           <tr>
-           <td>
-            <table border="0" cellpadding="1" cellspacing="1" bgcolor="#000000" width="100%">
-              <tr>
-               <td bgcolor="'.$tabbg.'">
-                <table width="100%" border="0" cellspacing="0" cellpadding="0">
-                 <tr>
-                  <td><b>'.$$heading{$caller}.'</b></td>
-                  <td valign="top" align="right">'.$showhide.'</td>
-                 </tr>
-                </table>
-               </td>
-              </tr>');
+           <th>'.$$heading{$caller}.'</th>
+           <th class="LC_right_item">'.$showhide.'</th>
+          </tr>');
      if (($caller eq 'abovethreshold') && ($$show{$caller})) {
          if ($$show{$caller}) {
              $r->print('
               <tr>
-                <td bgcolor="'.$tabbg.'" align="right"><a href="/adm/whatsnew?command=chgthreshold&refpage='.$refpage.'"><b><small>'.$lt{'chth'}.'</small></b></a></td>
+                <td class="LC_subheader" colspan="2"><a href="/adm/whatsnew?command=chgthreshold&refpage='.$refpage.'">'.$lt{'chth'}.'</a></td>
               </tr>');
          }
-	 $class='class="LC_whatsnew"';
      } elsif (($caller eq 'versionchanges') && ($$show{$caller})) {
          if ($$show{$caller}) {
              $r->print('
               <tr>
-                <td bgcolor="'.$tabbg.'" align="right"><a href="/adm/whatsnew?command=chginterval&refpage='.$refpage.'"><b><small>'.$lt{'chin'}.'</small></b></a></td>
+                <td class="LC_subheader" colspan="2"><a href="/adm/whatsnew?command=chginterval&refpage='.$refpage.'">'.$lt{'chin'}.'</a></td>
               </tr>');
          }
      } elsif ($caller eq 'coursediscussion') {
          if ($$show{$caller}) {
              $r->print('
               <tr>
-                <td bgcolor="'.$tabbg.'" align="right"><a href="/adm/whatsnew?command=chgdisc&refpage='.$refpage.'"><b><small>'.$lt{'chop'}.'</small></b></a></td>
+                <td class="LC_subheader" colspan="2"><a href="/adm/whatsnew?command=chgdisc&refpage='.$refpage.'">'.$lt{'chop'}.'</a></td>
               </tr>');
          }
      }
     $r->print('
               <tr>
-               <td bgcolor="#ffffff">
-                <table cellpadding="2" cellspacing="0" border="0" width="100%" '.$class.'>
+               <td colspan="2">
+                <table class="LC_nested">
 ');
     return;
 }
@@ -1606,9 +1561,6 @@
 sub end_box {
     my ($r) = shift;
     $r->print('
-      </table>
-     </td>
-    </tr>
    </table>
   </td>
  </tr>

--raeburn1172614566--