--- loncom/interface/loncommon.pm 2006/04/18 20:55:14 1.341 +++ loncom/interface/loncommon.pm 2006/04/22 01:06:48 1.347 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.341 2006/04/18 20:55:14 albertel Exp $ +# $Id: loncommon.pm,v 1.347 2006/04/22 01:06:48 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -63,6 +63,7 @@ use Apache::lonlocal; use HTML::Entities; use Apache::lonhtmlcommon(); use Apache::loncoursedata(); +use Apache::lontexconvert(); my $readit; @@ -2807,15 +2808,6 @@ sub bodytag { # construct main body tag my $bodytag = < -h1, h2, h3, th { font-family: Arial, Helvetica, sans-serif } -a:focus { color: red; background: yellow } -table.thinborder { border-collapse: collapse; } -table.thinborder tr th, table.thinborder tr td { border-style: solid; border-width: 1px} -form, .inline { display: inline; } -.center { text-align: center; } -.filename {font-family: monospace;} - END @@ -3049,6 +3041,102 @@ sub endbodytag { return $endbodytag; } +sub standard_css { + my ($function,$domain,$bgcolor) = @_; + my $function = &get_users_function() if (!$function); + my $img = &designparm($function.'.img',$domain); + my $tabbg = &designparm($function.'.tabbg',$domain); + my $font = &designparm($function.'.font',$domain); + my $sidebg = &designparm($function.'.sidebg',$domain); + my $pgbg = $bgcolor || &designparm($function.'.pgbg',$domain); + + my $alink = &designparm($function.'.alink',$domain); + 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_light = '#EEEEEE'; + my $data_table_dark = '#DDD'; + return < +h1, h2, h3, th { font-family: $sans } +a:focus { color: red; background: yellow } +table.thinborder { border-collapse: collapse; } +table.thinborder tr th, table.thinborder tr td { border-style: solid; border-width: 1px} +form, .inline { display: inline; } +.center { text-align: center; } +.filename {font-family: monospace;} + +table#LC_top_nav, table#LC_menubuttons, table#LC_nav_location { + width: 100%; + background: $pgbg; + border: 0px; + border-spacing: 1px; + padding: 0px; + margin: 0px; + border-collapse: separate; +} +table#LC_menubuttons_mainmenu { + background: $pgbg; + border: 0px; + border-spacing: 1px; + padding: 0px; + margin: 0px; + border-collapse: separate; +} +table#LC_menubuttons img, table#LC_menubuttons_mainmenu img { + border: 0px; +} +table#LC_top_nav td { + background: $tabbg; +} +table#LC_top_nav td a, div#LC_top_nav a { + color: $font; + font-family: $sans; +} +.LC_menubuttons_inline_text { + color: $font; + font-family: $sans; + font-size: smaller; +} + +td.LC_menubuttons_text { + color: $font; + font-family: $sans; +} +td.LC_menubuttons_img { + background: $tabbg; +} +.LC_current_location { + font-family: $sans; + background: $tabbg; +} +.LC_new_mail { + font-family: $sans; + font-weight: bold; +} + +table.LC_data_table { + border: 1px solid #000000; + border-collapse: seperate; +} +table.LC_data_table tr th { + background-color: $data_table_head; +} +table.LC_data_table tr td { + background-color: $data_table_light; +} +table.LC_data_table tr.LC_even_row td { + background-color: $data_table_dark; +} +table.LC_data_table tr.LC_empty td { + background-color: #FFFFFF; +} + + +END +} + =pod =over 4 @@ -3076,6 +3164,7 @@ sub headtag { my $result = ''. + &standard_css(). &font_settings(). &Apache::lonhtmlcommon::htmlareaheaders(); @@ -3089,7 +3178,7 @@ sub headtag { $env{'internal.head.redirect'} = $url; $result.=< - + ADDMETA } if (!defined($title)) { @@ -3143,7 +3232,8 @@ Inputs: none sub xml_begin { my $output=''; - @Apache::lonxml::htmlareafields=(); + &Apache::lonhtmlcommon::init_htmlareafields(); + if ($env{'browser.mathml'}) { $output='' #.''."\n" @@ -3387,6 +3477,29 @@ sub simple_error_page { } return $page; } + +{ + my $row_count; + sub start_data_table { + undef($row_count); + return ''; + } + + sub end_data_table { + undef($row_count); + return '
'; + } + + sub start_data_table_row { + $row_count++; + return ''; + } + + sub end_data_table_row { + return ''; + } +} + ############################################### =pod