[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm lonmenu.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 21 Apr 2006 20:45:43 -0000
This is a MIME encoded message
--albertel1145652343
Content-Type: text/plain
albertel Fri Apr 21 16:45:43 2006 EDT
Modified files:
/loncom/interface loncommon.pm lonmenu.pm
Log:
- CSS the top navigational bad (id LC_top_nav)
--albertel1145652343
Content-Type: text/plain
Content-Disposition: attachment; filename="albertel-20060421164543.txt"
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.344 loncom/interface/loncommon.pm:1.345
--- loncom/interface/loncommon.pm:1.344 Wed Apr 19 22:24:08 2006
+++ loncom/interface/loncommon.pm Fri Apr 21 16:45:42 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.344 2006/04/20 02:24:08 albertel Exp $
+# $Id: loncommon.pm,v 1.345 2006/04/21 20:45:42 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3042,15 +3042,43 @@
}
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';
return <<END;
<style type="text/css">
-h1, h2, h3, th { font-family: Arial, Helvetica, sans-serif }
+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 {
+ width: 100%;
+ background: $pgbg;
+ border: 0px;
+ border-spacing: 1px;
+ padding: 0px;
+ margin: 0px;
+ border-collapse: separate;
+}
+table#LC_top_nav td {
+ background: $tabbg;
+}
+table#LC_top_nav td a, div#LC_top_nav a {
+ color: $font;
+ font-family: $sans;
+}
</style>
END
}
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.175 loncom/interface/lonmenu.pm:1.176
--- loncom/interface/lonmenu.pm:1.175 Thu Apr 20 00:22:38 2006
+++ loncom/interface/lonmenu.pm Fri Apr 21 16:45:42 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.175 2006/04/20 04:22:38 albertel Exp $
+# $Id: lonmenu.pm,v 1.176 2006/04/21 20:45:42 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -101,7 +101,7 @@
my $showgroups=0;
my $escurl=&Apache::lonnet::escape(&Apache::lonenc::check_encrypt($env{'request.noversionuri'}));
my $escsymb=&Apache::lonnet::escape(&Apache::lonenc::check_encrypt($env{'request.symb'}));
- my $face= 'face="Arial,Helvetica,sans-serif"';
+
if ($env{'request.state'} eq 'construct') {
if (($env{'request.noversionuri'} eq '') || (!defined($env{'request.noversionuri'}))) {
my $returnurl = $env{'request.filename'};
@@ -121,8 +121,6 @@
}
}
- my ($font,$pgbg,$tabbg) = &get_colors();
-
if ($env{'browser.interface'} eq 'textual') {
# Textual display only
if ($env{'request.course.id'}) {
@@ -134,18 +132,17 @@
($env{'request.noversionuri'}!~/^\/adm\/.*\/(smppg|bulletinboard|aboutme)(\?|$)/)) {
my $escreload=&Apache::lonnet::escape('return:');
$reloadlink=(<<ENDRELOAD);
-<a href="/adm/flip?postdata=$escreload" target="_top"><font $face color="$font">$lt{'ret'}</font></a>
+<a href="/adm/flip?postdata=$escreload" target="_top">$lt{'ret'}</a>
ENDRELOAD
}
if (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) {
$docs=(<<ENDDOCS);
-<a href="/adm/coursedocs" target="_top"><font $face color="$font">$lt{'docs'}</font></a>
+<a href="/adm/coursedocs" target="_top">$lt{'docs'}</a>
ENDDOCS
}
if ($showgroups) {
$groups =(<<ENDGROUPS);
-<td bgcolor="$tabbg">
-<a href="/adm/coursegroups" target="_top"><font $face color="$font">$lt{'groups'}</font></a></td>
+<a href="/adm/coursegroups" target="_top">$lt{'groups'}</a></td>
ENDGROUPS
}
}
@@ -156,10 +153,12 @@
// BEGIN LON-CAPA Internal
$utility
</script>
+<div id="LC_top_nav">
<a href="/adm/menu" target="_top">$lt{'main'}</a>
$reloadlink $navmaps $docs $groups
-<a href="/adm/roles" target="_top"><font $face color="$font">$lt{'roles'}</font></a>
-<a href="/adm/logout" target="_top"><font $face color="$font">$lt{'exit'}</font></a>
+<a href="/adm/roles" target="_top">$lt{'roles'}</a>
+<a href="/adm/logout" target="_top">$lt{'exit'}</a>
+</div>
<br />
<script type="text/javascript">
// END LON-CAPA Internal
@@ -182,13 +181,12 @@
if ($env{'user.name'} eq 'public' && $env{'user.domain'} eq 'public') {
my $logo=&Apache::loncommon::lonhttpdurl("/adm/lonIcons/minilogo.gif");
return (<<ENDINLINEMENU);
-<font face="Arial,Helvetica,sans-serif">
- <table bgcolor="$pgbg" width="100%" border="0" cellpadding="1" cellspacing="1">
+ <table id="LC_top_nav">
<tr>
- <td bgcolor="$tabbg">
- <a href="/adm/logout" target="_top"><font color="$font">$lt{'exit'}</font></a>
+ <td>
+ <a href="/adm/logout" target="_top">$lt{'exit'}</a>
</td>
- <td align="right" bgcolor="$tabbg">
+ <td align="right">
<img align="right" src="$logo" alt="Logo" />
<b>LON-CAPA</b>
</td>
@@ -205,19 +203,16 @@
$link="javascript:gonav('".$link."')";
}
$navmaps=(<<ENDNAV);
-<td bgcolor="$tabbg">
-<a href="$link" target="_top"><font $face color="$font">$lt{'nav'}</font></a></td>
+<td><a href="$link" target="_top">$lt{'nav'}</a></td>
ENDNAV
if (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) {
$docs=(<<ENDDOCS);
-<td bgcolor="$tabbg">
-<a href="/adm/coursedocs" target="_top"><font $face color="$font">$lt{'docs'}</font></a></td>
+<td><a href="/adm/coursedocs" target="_top">$lt{'docs'}</a></td>
ENDDOCS
}
if ($showgroups) {
$groups =(<<ENDGROUPS);
-<td bgcolor="$tabbg">
-<a href="/adm/coursegroups" target="_top"><font $face color="$font">$lt{'groups'}</font></a></td>
+<td><a href="/adm/coursegroups" target="_top">$lt{'groups'}</a></td>
ENDGROUPS
}
if (
@@ -232,16 +227,14 @@
) {
my $escreload=&Apache::lonnet::escape('return:');
$reloadlink=(<<ENDRELOAD);
-<td bgcolor="$tabbg">
-<a href="/adm/flip?postdata=$escreload" target="_top"><font $face color="$font">$lt{'ret'}</font></a></td>
+<td><a href="/adm/flip?postdata=$escreload" target="_top">$lt{'ret'}</a></td>
ENDRELOAD
}
}
if (($env{'request.state'} eq 'construct') && ($env{'request.course.id'})) {
my $escreload=&Apache::lonnet::escape('return:');
$reloadlink=(<<ENDCRELOAD);
-<td bgcolor="$tabbg">
-<a href="/adm/flip?postdata=$escreload" target="_top"><font $face color="$font">$lt{'ret'}</font></a></td>
+<td><a href="/adm/flip?postdata=$escreload" target="_top">$lt{'ret'}</a></td>
ENDCRELOAD
}
my $reg='';
@@ -259,27 +252,17 @@
$utility
// ]]>
</script>
-<table bgcolor="$pgbg" width="100%" border="0" cellpadding="1" cellspacing="1">
+<table id="LC_top_nav">
<tr>
-<td bgcolor="$tabbg">
-<a href="/adm/menu" target="_top"><font $face color="$font">$lt{'main'}</font></a>
-</td>
+<td><a href="/adm/menu" target="_top">$lt{'main'}</a></td>
$reloadlink
$navmaps
$docs
$groups
-<td bgcolor="$tabbg">
-<a href="/adm/remote?action=launch&url=$escurl" target="_top">
-<font $face color="$font">$lt{'launch'}</font></a></td>
-<td bgcolor="$tabbg">
-<a href="/adm/roles" target="_top"><font $face color="$font">$lt{'roles'}</font></a>
-</td>
-<td bgcolor="$tabbg">
-<a href="/adm/logout" target="_top"><font $face color="$font">$lt{'exit'}</font></a>
-</td>
-<td bgcolor="$tabbg">
-<img align="right" src="$logo" alt="Logo" />
-<b>LON-CAPA</b></td>
+<td><a href="/adm/remote?action=launch&url=$escurl" target="_top">$lt{'launch'}</td>
+<td><a href="/adm/roles" target="_top">$lt{'roles'}</a></td>
+<td><a href="/adm/logout" target="_top">$lt{'exit'}</a></td>
+<td><img align="right" src="$logo" alt="Logo" /><b>LON-CAPA</b></td>
</tr>
</table>
$form
@@ -510,7 +493,6 @@
ENDREALRES
}
}
- &Apache::lonnet::logthis("menuitems $menuitems");
my $buttons='';
foreach (split(/\n/,$menuitems)) {
my ($command,@rest)=split(/\&/,$_);
--albertel1145652343--