[LON-CAPA-cvs] cvs: loncom /interface lonnavmaps.pm
bowersj2
lon-capa-cvs@mail.lon-capa.org
Fri, 01 Nov 2002 18:47:26 -0000
bowersj2 Fri Nov 1 13:47:26 2002 EDT
Modified files:
/loncom/interface lonnavmaps.pm
Log:
Be less inefficient with screen real estate.
Using nav maps with a 1024x768 window showed me that about 3/4 of that
screen is used before the nav maps even appear. That's too much. This
drops that down to about 1/3 of the screen used for head information.
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.94 loncom/interface/lonnavmaps.pm:1.95
--- loncom/interface/lonnavmaps.pm:1.94 Fri Nov 1 13:24:45 2002
+++ loncom/interface/lonnavmaps.pm Fri Nov 1 13:47:26 2002
@@ -2,7 +2,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.94 2002/11/01 18:24:45 bowersj2 Exp $
+# $Id: lonnavmaps.pm,v 1.95 2002/11/01 18:47:26 bowersj2 Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -837,19 +837,37 @@
''));
$r->print('<script>window.focus();</script>');
my $desc=$ENV{'course.'.$ENV{'request.course.id'}.'.description'};
- if (defined($desc)) { $r->print("<h2>$desc</h2>\n"); }
+ $r->print('<table border="0" cellpadding="2" cellspacing="0">');
my $date=localtime;
- $r->print("<h3>$date</h3>\n");
- $r->rflush();
+ $r->print('<tr><td align="right" valign="bottom">Key: </td>');
if ($navmap->{LAST_CHECK}) {
- $r->print('<img src="/adm/lonMisc/chat.gif"> New discussion since '.
+ $r->print('<td align="center" valign="bottom"> '.
+ '<img src="/adm/lonMisc/chat.gif"> New discussion since '.
strftime("%A, %b %e at %I:%M %P", localtime($navmap->{LAST_CHECK})).
- '<br><img src="/adm/lonMisc/feedback.gif"> New message (click to open)<p>');
+ '</td><td align="center" valign="bottom"> '.
+ '<img src="/adm/lonMisc/feedback.gif"> New message (click to open)<p>'.
+ '</td>');
+ } else {
+ $r->print('<td align="center" valign="bottom"> '.
+ '<img src="/adm/lonMisc/chat.gif"> Discussions</td><td align="center" valign="bottom">'.
+ ' <img src="/adm/lonMisc/feedback.gif"> New message (click to open)'.
+ '</td>');
+ }
+ $r->print('</tr></table>');
+ my $condition = 0;
+ if ($ENV{'form.condition'}) {
+ $condition = 1;
+ }
+
+ if ($condition) {
+ $r->print('<a href="navmaps?condition=0&filter=">Close All Folders</a>');
} else {
- $r->print('<img src="/adm/lonMisc/chat.gif"> Discussions'.
- '<br><img src="/adm/lonMisc/feedback.gif"> New message (click to open)<p>');
+ $r->print('<a href="navmaps?condition=1&filter=">Open All Folders</a>');
}
+ $r->print('<br> ');
+ $r->rflush();
+
# Now that we've displayed some stuff to the user, init the navmap
$navmap->init();
@@ -928,17 +946,6 @@
# currenturl scan would re-open it.
my $queryAdd = "postdata=" . &Apache::lonnet::escape($currenturl) .
"&alreadyHere=1";
-
- my $condition = 0;
- if ($ENV{'form.condition'}) {
- $condition = 1;
- }
-
- if ($condition) {
- $r->print('<a href="navmaps?condition=0&filter=">Close All Folders</a><br /><br />');
- } else {
- $r->print('<a href="navmaps?condition=1&filter=">Open All Folders</a><br /><br />');
- }
# Begin the HTML table
# four cols: resource + indent, chat+feedback, icon, text string