[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm lonmainmenu.pm lonmenu.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 21 Apr 2006 22:00:57 -0000
This is a MIME encoded message
--albertel1145656857
Content-Type: text/plain
albertel Fri Apr 21 18:00:57 2006 EDT
Modified files:
/loncom/interface loncommon.pm lonmenu.pm lonmainmenu.pm
Log:
- all of the menubutton and top of the page buttons are style using CSS now
--albertel1145656857
Content-Type: text/plain
Content-Disposition: attachment; filename="albertel-20060421180057.txt"
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.345 loncom/interface/loncommon.pm:1.346
--- loncom/interface/loncommon.pm:1.345 Fri Apr 21 16:45:42 2006
+++ loncom/interface/loncommon.pm Fri Apr 21 18:00:56 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.345 2006/04/21 20:45:42 albertel Exp $
+# $Id: loncommon.pm,v 1.346 2006/04/21 22:00:56 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3063,7 +3063,8 @@
form, .inline { display: inline; }
.center { text-align: center; }
.filename {font-family: monospace;}
-table#LC_top_nav {
+
+table#LC_top_nav, table#LC_menubuttons, table#LC_nav_location {
width: 100%;
background: $pgbg;
border: 0px;
@@ -3072,6 +3073,17 @@
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;
}
@@ -3079,6 +3091,27 @@
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;
+}
</style>
END
}
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.176 loncom/interface/lonmenu.pm:1.177
--- loncom/interface/lonmenu.pm:1.176 Fri Apr 21 16:45:42 2006
+++ loncom/interface/lonmenu.pm Fri Apr 21 18:00:56 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.176 2006/04/21 20:45:42 albertel Exp $
+# $Id: lonmenu.pm,v 1.177 2006/04/21 22:00:56 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -64,22 +64,6 @@
'groups' => 'Groups');
}
-sub get_colors {
- my ($font,$pgbg,$tabbg);
- if ($env{'browser.interface'} eq 'textual') {
- $pgbg='#FFFFFF';
- $tabbg='#FFFFFF';
- $font='#000000';
- } else {
- my $domain =&Apache::loncommon::determinedomain();
- my $function =&Apache::loncommon::get_users_function();
-
- $pgbg =&Apache::loncommon::designparm($function.'.pgbg', $domain);
- $tabbg =&Apache::loncommon::designparm($function.'.tabbg',$domain);
- $font =&Apache::loncommon::designparm($function.'.font', $domain);
- }
- return ($font,$pgbg,$tabbg);
-}
# ============================= This gets called at the top of the body section
sub menubuttons {
@@ -320,18 +304,26 @@
my $textual=($textinter || $noremote);
- @inlineremote=();
- undef @inlineremote;
+ undef(@inlineremote);
my $reopen=&Apache::lonmenu::reopenmenu();
- my ($font,$pgbg,$tabbg) = &get_colors();
-
my $newmail='';
if ($noremote) {
- $newmail='<table bgcolor="'.$pgbg.'" border="0" cellspacing="1" cellpadding="1" width="100%"><tr><td bgcolor="'.$tabbg.'"><font face="Arial,Helvetica,sans-serif">';
+ $newmail='<table id="LC_nav_location"><tr>';
}
- if (($textual) && ($env{'request.symb'}) && ($env{'request.course.id'})) {
+ if (&Apache::lonmsg::newmail()) {
+ if ($textual) {
+ $newmail.= '<td class="LC_new_mail">
+ <a href="/adm/communicate" target="_top">'.
+ &mt('You have new messages').'</a></td>';
+ } else {
+ $newmail= 'swmenu.setstatus("you have","messages");';
+ }
+ } elsif (($textual)
+ && ($env{'request.symb'})
+ && ($env{'request.course.id'})) {
+ $newmail.= '<td class="LC_current_location">';
my ($mapurl,$rid,$resurl)=
&Apache::lonnet::decode_symb(&Apache::lonnet::symbread());
$newmail.=$env{'course.'.$env{'request.course.id'}.'.description'};
@@ -343,23 +335,19 @@
if ($restitle) {
$newmail.=': '.$restitle;
}
- $newmail.=' ';
- }
- if (&Apache::lonmsg::newmail()) {
- $newmail=($textual?
- '<b><a href="/adm/communicate" target="_top">You have new messages</a></b><br />':
- 'swmenu.setstatus("you have","messages");');
+ $newmail.=' </td>';
}
if ($env{'request.state'} eq 'construct') {
$newmail = $titletable;
} else {
if ($noremote) {
- $newmail.='</font></td></tr></table>';
+ $newmail.='</td></tr></table>';
}
}
my $timesync=($textual?'':'swmenu.syncclock(1000*'.time.');');
- my $tablestart=($noremote?'<font face="Arial,Helvetica,sans-serif"><table bgcolor="'.$pgbg.'" border="0" cellspacing="1" cellpadding="1" width="100%">':'').($textinter?'<br /><a href="#content">'.&mt('Skip to Content').'</a><br />':'');
- my $tableend=($noremote?'</table></font>':'').($textinter?'<a name="content" />':'');
+ my $tablestart=($noremote?'<table id="LC_menubuttons">':'').
+ ($textinter?'<br /><a href="#content">'.&mt('Skip to Content').'</a><br />':'');
+ my $tableend=($noremote?'</table>':'').($textinter?'<a name="content" />':'');
# =============================================================================
# ============================ This is for URLs that actually can be registered
if (($env{'request.noversionuri'}!~m|^/(res/)*adm/|) || ($forcereg)) {
@@ -814,8 +802,6 @@
$desc=&mt($desc);
$img=&mt($img);
- my ($font,$pgbg,$tabbg) = &get_colors();
-
unless (($env{'browser.interface'} eq 'textual') ||
($env{'environment.remote'} eq 'off')) {
# Remote
@@ -842,34 +828,33 @@
my $lonhttpdPort=$Apache::lonnet::perlvar{'lonhttpdPort'};
if (!defined($lonhttpdPort)) { $lonhttpdPort='8080'; }
my $pic=
- '<img border="0" alt="'.$text.'" src="http://'.$ENV{'HTTP_HOST'}.
+ '<img alt="'.$text.'" src="http://'.$ENV{'HTTP_HOST'}.
':'.$lonhttpdPort.'/res/adm/pages/'.$img.'" align="'.
($nobreak==3?'right':'left').'" />';
- if (($env{'browser.interface'} eq 'textual') || ($env{'browser.interface'} eq 'faketextual')) {
+ if ($env{'browser.interface'} eq 'faketextual') {
# Accessibility
if ($nobreak==3) {
$inlineremote[10*$row+$col]="\n".
- '<td width="40%" align="right"><font color="'.$font.'" size="+1">'.$text.
- '</font></td><td width="10%" align="right" bgcolor="'.$tabbg.'">'.
+ '<td class="LC_menubuttons_text" align="right">'.$text.
+ '</td><td class="LC_menubuttons_img" align="left">'.
'<a href="javascript:'.$act.';">'.$pic.'</a></td></tr>';
} elsif ($nobreak) {
$inlineremote[10*$row+$col]="\n<tr>".
- '<td width="10%" align="left" bgcolor="'.$tabbg.'">'.
- '<a href="javascript:'.$act.';">'.$pic.
- '</a></td><td width="40%" align="left"><font color="'.$font.'" size="+1">'.$text.'</font></td>';
+ '<td class="LC_menubuttons_img" align="left">'.
+ '<a href="javascript:'.$act.';">'.$pic.'</a></td>
+ <td class="LC_menubuttons_text" align="left">'.$text.'</td>';
} else {
$inlineremote[10*$row+$col]="\n<tr>".
- '<td width="10%" align="left" bgcolor="'.$tabbg.'">'.
+ '<td class="LC_menubuttons_img" align="left">'.
'<a href="javascript:'.$act.';">'.$pic.
- '</a></td><td colspan="3"><font color="'.$font.'">'.$desc.
- '</font></td></tr>';
+ '</a></td><td class="LC_menubuttons_text" colspan="3">'.
+ $desc.'</td></tr>';
}
} else {
# Inline Menu
$inlineremote[10*$row+$col]=
'<a href="javascript:'.$act.';">'.$pic.
- '</a><font color="'.$font.'" size="2">'.$desc.
- '</font>';
+ '</a><span class="LC_menubuttons_inline_text">'.$desc.'</span>';
}
}
return '';
Index: loncom/interface/lonmainmenu.pm
diff -u loncom/interface/lonmainmenu.pm:1.3 loncom/interface/lonmainmenu.pm:1.4
--- loncom/interface/lonmainmenu.pm:1.3 Mon Apr 10 14:49:56 2006
+++ loncom/interface/lonmainmenu.pm Fri Apr 21 18:00:56 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# displays the main menu
#
-# $Id: lonmainmenu.pm,v 1.3 2006/04/10 18:49:56 albertel Exp $
+# $Id: lonmainmenu.pm,v 1.4 2006/04/21 22:00:56 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -72,7 +72,7 @@
$env{'environment.remote'}='off';
}
$r->print(&Apache::loncommon::start_page('Main Menu',$script_tag));
- $r->print('<table>'.&Apache::lonmenu::inlinemenu().'</table>'.$form);
+ $r->print('<table id="LC_menubuttons_mainmenu">'.&Apache::lonmenu::inlinemenu().'</table>'.$form);
$r->print(&Apache::loncommon::end_page());
return OK;
}
--albertel1145656857--