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

albertel lon-capa-cvs@mail.lon-capa.org
Sat, 22 Apr 2006 17:10:07 -0000


albertel		Sat Apr 22 13:10:07 2006 EDT

  Modified files:              
    /loncom/interface	lonmsgdisplay.pm loncommon.pm 
  Log:
  - revamp msg display with css
  
  
Index: loncom/interface/lonmsgdisplay.pm
diff -u loncom/interface/lonmsgdisplay.pm:1.3 loncom/interface/lonmsgdisplay.pm:1.4
--- loncom/interface/lonmsgdisplay.pm:1.3	Sat Apr 22 13:03:43 2006
+++ loncom/interface/lonmsgdisplay.pm	Sat Apr 22 13:10:07 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines for messaging display
 #
-# $Id: lonmsgdisplay.pm,v 1.3 2006/04/22 17:03:43 albertel Exp $
+# $Id: lonmsgdisplay.pm,v 1.4 2006/04/22 17:10:07 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -490,13 +490,12 @@
     if ($#newmsgs >= 0) {
         $r->print(<<TABLEHEAD);
 <h2>$lt{'nm'}</h2>
-<table border=2><tr><th>&nbsp</th>
+<table class="LC_mail_list"><tr><th>&nbsp</th>
 <th>$lt{'da'}</th><th>$lt{'us'}</th><th>$lt{'do'}</th><th>$lt{'su'}</th><th>$lt{'co'}</th></tr>
 TABLEHEAD
         foreach my $msg (@newmsgs) {
             $r->print(<<"ENDLINK");
-<tr class="new" bgcolor="#FFBB77" onMouseOver="javascript:style.backgroundColor='#DD9955'" 
-onMouseOut="javascript:style.backgroundColor='#FFBB77'">
+<tr class="LC_mail_new">
 <td><a href="/adm/email?dismode=new&display=$msg->{'msgid'}">$lt{'op'}</a></td>
 ENDLINK
             foreach ('sendtime','from','fromdom','shortsub','course') {
@@ -588,7 +587,7 @@
     if ($lastdis>$#temp) { $lastdis=$#temp; }
     $r->print(&scrollbuttons($startdis,$number,$firstdis,$lastdis,$totalnumber));
     $r->print('<form method="post" name="disall" action="/adm/email">'.
-	      '<table border=2><tr><th colspan="3">&nbsp</th><th>');
+	      '<table class="LC_mail_list"><tr><th colspan="3">&nbsp</th><th>');
     if ($env{'form.sortedby'} eq "revdate") {
 	$r->print('<a href = "?sortedby=date'.$fsqs.'">'.&mt('Date').'</a></th>');
     } else {
@@ -629,13 +628,13 @@
 	my ($sendtime,$shortsubj,$fromname,$fromdomain,$status,$origID,$description)= @{$temp[$n]};
 	if (($status ne 'deleted') && defined($sendtime) && $sendtime!~/error/) {
 	    if ($status eq 'new') {
-		$r->print('<tr bgcolor="#FFBB77" onMouseOver="javascript:style.backgroundColor=\'#DD9955\'"  onMouseOut="javascript:style.backgroundColor=\'#FFBB77\'">');
+		$r->print('<tr class="LC_mail_new">');
 	    } elsif ($status eq 'read') {
-		$r->print('<tr bgcolor="#BBBB77" onMouseOver="javascript:style.backgroundColor=\'#999944\'"  onMouseOut="javascript:style.backgroundColor=\'#BBBB77\'">');
+		$r->print('<tr class="LC_mail_read">');
 	    } elsif ($status eq 'replied') {
-		$r->print('<tr bgcolor="#AAAA88" onMouseOver="javascript:style.backgroundColor=\'#888855\'"  onMouseOut="javascript:style.backgroundColor=\'#AAAA88\'">'); 
+		$r->print('<tr class="LC_mail_replied">'); 
 	    } else {
-		$r->print('<tr bgcolor="#99BBBB" onMouseOver="javascript:style.backgroundColor=\'#669999\'"  onMouseOut="javascript:style.backgroundColor=\'#99BBBB\'">');
+		$r->print('<tr class="LC_mail_other">');
 	    }
 	    $r->print('<td><input type="checkbox" name="delmark_'.$origID.'" /></td><td><a href="/adm/email?display='.$origID.$sqs. 
 		      '">'.&mt('Open').'</a></td><td>'.
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.348 loncom/interface/loncommon.pm:1.349
--- loncom/interface/loncommon.pm:1.348	Sat Apr 22 12:26:31 2006
+++ loncom/interface/loncommon.pm	Sat Apr 22 13:10:07 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.348 2006/04/22 16:26:31 albertel Exp $
+# $Id: loncommon.pm,v 1.349 2006/04/22 17:10:07 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3056,9 +3056,19 @@
     my $vlink  = &designparm($function.'.vlink',$domain);
     my $link   = &designparm($function.'.link',$domain);
     my $sans   = 'Arial,Helvetica,sans-serif';
-    my $data_table_head = '#CCCCFF';
+    my $data_table_head = $tabbg;
     my $data_table_light = '#EEEEEE';
     my $data_table_dark = '#DDD';
+    my $data_table_highlight = '#FFFF00';
+    my $mail_new = '#FFBB77';
+    my $mail_new_hover = '#DD9955';
+    my $mail_read = '#BBBB77';
+    my $mail_read_hover = '#999944';
+    my $mail_replied = '#AAAA88';
+    my $mail_replied_hover = '#888855';
+    my $mail_other = '#99BBBB';
+    my $mail_other_hover = '#669999';
+
     return <<END;
 <style type="text/css">
 h1, h2, h3, th { font-family: $sans }
@@ -3118,23 +3128,66 @@
   font-weight: bold;
 }
 
-table.LC_data_table {
+table.LC_data_table, table.LC_mail_list {
   border: 1px solid #000000;
   border-collapse: seperate;
 }
-table.LC_data_table tr th {
-    background-color: $data_table_head;
+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;
 }
 table.LC_data_table tr td {
-    background-color: $data_table_light;
+  background-color: $data_table_light;
 }
 table.LC_data_table tr.LC_even_row td {
-    background-color: $data_table_dark;
+  background-color: $data_table_dark;
 }
 table.LC_data_table tr.LC_empty td {
   background-color: #FFFFFF;
 }
 
+table.LC_calendar {
+  border: 1px solid #000000;
+  border-collapse: collapse;
+}
+table.LC_calendar_pickdate {
+  font-size: xx-small;
+}
+table.LC_calendar tr td {
+  border: 1px solid #000000;
+  vertical-align: top;
+}
+table.LC_calendar tr td.LC_calendar_day_empty {
+  background-color: $data_table_dark;
+}
+table.LC_calendar tr td.LC_calendar_day_current {
+  background-color: $data_table_highlight;
+}
+
+table.LC_mail_list tr.LC_mail_new {
+  background-color: $mail_new;
+}
+table.LC_mail_list tr.LC_mail_new:hover {
+  background-color: $mail_new_hover;
+}
+table.LC_mail_list tr.LC_mail_read {
+  background-color: $mail_read;
+}
+table.LC_mail_list tr.LC_mail_read:hover {
+  background-color: $mail_read_hover;
+}
+table.LC_mail_list tr.LC_mail_replied {
+  background-color: $mail_replied;
+}
+table.LC_mail_list tr.LC_mail_replied:hover {
+  background-color: $mail_replied_hover;
+}
+table.LC_mail_list tr.LC_mail_other {
+  background-color: $mail_other;
+}
+table.LC_mail_list tr.LC_mail_other:hover {
+  background-color: $mail_other_hover;
+}
 </style>
 END
 }