--- loncom/interface/loncommon.pm 2006/07/04 21:31:02 1.419 +++ loncom/interface/loncommon.pm 2006/07/07 15:54:15 1.422 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.419 2006/07/04 21:31:02 raeburn Exp $ +# $Id: loncommon.pm,v 1.422 2006/07/07 15:54:15 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3265,18 +3265,27 @@ table.LC_data_table, table.LC_mail_list border: 1px solid #000000; border-collapse: separate; } +.LC_data_table_dense { + font-size: small; +} 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; + font-size: smaller; } table.LC_data_table tr td { background-color: $data_table_light; + padding: 1px; } table.LC_data_table tr.LC_even_row td { background-color: $data_table_dark; } -table.LC_data_table tr.LC_empty td { +table.LC_data_table tr.LC_empty_row td { background-color: #FFFFFF; + font-weight: bold; + font-style: italic; + text-align: center; + padding: 8px; } table.LC_calendar { @@ -3474,6 +3483,40 @@ table#LC_helpmenu_links a:hover { background: #CCCCFF; } +table.LC_pick_box { + width: 100%; + border-collapse: separate; + background: white; + border: 1px solid black; + border-spacing: 1px; +} +table.LC_pick_box td.LC_pick_box_title { + background: $tabbg; + font-weight: bold; + text-align: right; + width: 184px; +} +table.LC_pick_box td { + padding: 8px; +} +table.LC_pick_box td.LC_pick_box_seperator { + padding: 0px; + height: 1px; + background: black; +} +table.LC_pick_box td.LC_pick_box_submit { + text-align: right; +} + +table.LC_notify_front_page { + background: white; + border: 1px solid black; + padding: 8px; +} +table.LC_notify_front_page td { + padding: 8px; +} + END } @@ -3844,8 +3887,10 @@ sub simple_error_page { { my $row_count; sub start_data_table { + my ($add_class) = @_; + my $css_class = (join(' ','LC_data_table',$add_class)); undef($row_count); - return ''."\n"; + return '
'."\n"; } sub end_data_table { @@ -3854,14 +3899,26 @@ sub simple_error_page { } sub start_data_table_row { + my ($add_class) = @_; $row_count++; - return ''."\n";; + my $css_class = ($row_count % 2)?'':'LC_even_row'; + my $css_class = (join(' ',$css_class,$add_class)); + return ''."\n";; } sub end_data_table_row { return ''."\n";; } + sub start_data_table_empty_row { + $row_count++; + return ''."\n";; + } + + sub end_data_table_empty_row { + return ''."\n";; + } + sub start_data_table_header_row { return ''."\n";; } @@ -4113,10 +4170,10 @@ sub get_course_users { $section = 'none'; } if ((ref($sections) eq 'ARRAY') && (@{$sections} > 0)) { - if (grep/^all$/,@{$sections}) { + if (grep(/^all$/,@{$sections})) { $secmatch = 1; } elsif ($$classlist{$student}[$idx{section}] eq '') { - if (grep/^none$/,@{$sections}) { + if (grep(/^none$/,@{$sections})) { $secmatch = 1; } } else { @@ -4128,7 +4185,7 @@ sub get_course_users { next; } } - push (@{$seclists{$student}},$section); + push(@{$seclists{$student}},$section); if (defined($$types{'active'})) { if ($$classlist{$student}[$idx{status}] eq 'Active') { push(@{$$users{st}{$student}},'active'); @@ -4162,10 +4219,10 @@ sub get_course_users { if (($role) && (grep(/^\Q$role\E$/,@{$roles}))) { my ($uname,$udom) = split(/:/,$user); if ((ref($sections) eq 'ARRAY') && (@{$sections} > 0)) { - if (grep/^all$/,@{$sections}) { + if (grep(/^all$/,@{$sections})) { $secmatch = 1; } elsif ($usec eq '') { - if (grep/^none$/,@{$sections}) { + if (grep(/^none$/,@{$sections})) { $secmatch = 1; } } else { @@ -4185,7 +4242,7 @@ sub get_course_users { $usec); foreach my $type (keys(%{$types})) { if ($status eq $type) { - if (!grep/^\Q$type\E$/,@{$$users{$role}{$user}}) { + if (!grep(/^\Q$type\E$/,@{$$users{$role}{$user}})) { push(@{$$users{$role}{$user}},$type); } $match = 1; @@ -4195,7 +4252,7 @@ sub get_course_users { if (!exists($$userdata{$uname.':'.$udom})) { &get_user_info($udom,$uname,\%idx,$userdata); } - if (!grep/^\Q$usec\E$/,@{$seclists{$uname.':'.$udom}}) { + if (!grep(/^\Q$usec\E$/,@{$seclists{$uname.':'.$udom}})) { push(@{$seclists{$uname.':'.$udom}},$usec); } } @@ -4211,7 +4268,7 @@ sub get_course_users { if (defined($userdata) && !exists($$userdata{$owner.':'.$cdom})) { &get_user_info($cdom,$owner,\%idx,$userdata); - if (!grep/^none$/,@{$seclists{$owner.':'.$cdom}}) { + if (!grep(/^none$/,@{$seclists{$owner.':'.$cdom}})) { push(@{$seclists{$owner.':'.$cdom}},'none'); } }