--- loncom/interface/loncommon.pm 2006/04/18 19:18:17 1.339 +++ loncom/interface/loncommon.pm 2006/04/20 02:01:30 1.343 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.339 2006/04/18 19:18:17 albertel Exp $ +# $Id: loncommon.pm,v 1.343 2006/04/20 02:01:30 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2807,15 +2807,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 +3040,20 @@ sub endbodytag { return $endbodytag; } +sub standard_css { + return < +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 +} + =pod =over 4 @@ -3076,7 +3081,8 @@ sub headtag { my $result = ''. - &Apache::lonxml::fontsettings(). + &standard_css(). + &font_settings(). &Apache::lonhtmlcommon::htmlareaheaders(); if ($args->{'force_register'}) { @@ -3104,6 +3110,66 @@ ADDMETA =over 4 +=item * &font_settings() + +Returns neccessary to set the proper encoding + +Inputs: none + +=back + +=cut + +sub font_settings { + my $headerstring=''; + if (($env{'browser.os'} eq 'mac') && (!$env{'browser.mathml'})) { + $headerstring.= + ''; + } elsif (!$env{'browser.mathml'} && $env{'browser.unicode'}) { + $headerstring.= + ''; + } + return $headerstring; +} + +=pod + +=over 4 + +=item * &xml_begin() + +Returns the needed doctype and + +Inputs: none + +=back + +=cut + +sub xml_begin { + my $output=''; + + &Apache::lonhtmlcommon::init_htmlareafields(); + + if ($env{'browser.mathml'}) { + $output='' + #.''."\n" +# .'] >' + .'' + .''; + } else { + $output=''; + } + return $output; +} + +=pod + +=over 4 + =item * &endheadtag() Returns a uniform for LON-CAPA web pages. @@ -3192,7 +3258,7 @@ sub start_page { my $result; if (! exists($args->{'skip_phases'}{'head'}) ) { $result.= - &Apache::lonxml::xmlbegin(). + &xml_begin(). &headtag($title,$head_extra,\%head_args).&endheadtag(); }