[LON-CAPA-cvs] cvs: loncom /html/adm/lonDomColors default.tab msu.tab /interface loncommon.pm lonmenu.pm doc/loncapafiles loncapafiles.lpml

www lon-capa-cvs@mail.lon-capa.org
Sat, 05 Apr 2003 22:14:40 -0000


This is a MIME encoded message

--www1049580880
Content-Type: text/plain

www		Sat Apr  5 17:14:40 2003 EDT

  Modified files:              
    /doc/loncapafiles	loncapafiles.lpml 
    /loncom/html/adm/lonDomColors	default.tab msu.tab 
    /loncom/interface	loncommon.pm lonmenu.pm 
  Log:
  Continued work on "inline" Remote and three modes of navigation.
  
  
--www1049580880
Content-Type: text/plain
Content-Disposition: attachment; filename="www-20030405171440.txt"

Index: doc/loncapafiles/loncapafiles.lpml
diff -u doc/loncapafiles/loncapafiles.lpml:1.229 doc/loncapafiles/loncapafiles.lpml:1.230
--- doc/loncapafiles/loncapafiles.lpml:1.229	Fri Apr  4 13:54:56 2003
+++ doc/loncapafiles/loncapafiles.lpml	Sat Apr  5 17:14:40 2003
@@ -2,7 +2,7 @@
  "http://lpml.sourceforge.net/DTD/lpml.dtd">
 <!-- loncapafiles.lpml -->
 
-<!-- $Id: loncapafiles.lpml,v 1.229 2003/04/04 18:54:56 bowersj2 Exp $ -->
+<!-- $Id: loncapafiles.lpml,v 1.230 2003/04/05 22:14:40 www Exp $ -->
 
 <!--
 
@@ -4036,11 +4036,21 @@
 </filenames>
 </fileglob>
 <fileglob>
+<glob>*.jpg</glob>
+<sourcedir>loncom/html/adm/lonDomLogos/</sourcedir>
+<targetdir dist='default'>home/httpd/html/adm/lonDomLogos/</targetdir>
+<categoryname>graphic file</categoryname>
+<description>Logos of LON-CAPA domains (jpg)</description>
+<filenames>
+headermsu.jpg;
+</filenames>
+</fileglob>
+<fileglob>
 <glob>*.gif</glob>
 <sourcedir>loncom/html/adm/lonDomLogos/</sourcedir>
 <targetdir dist='default'>home/httpd/html/adm/lonDomLogos/</targetdir>
 <categoryname>graphic file</categoryname>
-<description>Logos of LON-CAPA domains</description>
+<description>Logos of LON-CAPA domains (gif)</description>
 <filenames>
 103.gif;
 gerd.gif;
Index: loncom/html/adm/lonDomColors/default.tab
diff -u loncom/html/adm/lonDomColors/default.tab:1.5 loncom/html/adm/lonDomColors/default.tab:1.6
--- loncom/html/adm/lonDomColors/default.tab:1.5	Wed Dec 11 08:56:42 2002
+++ loncom/html/adm/lonDomColors/default.tab	Sat Apr  5 17:14:40 2003
@@ -32,8 +32,8 @@
 author.vlink=#006666
 author.alink=#CC0000
 student.img=/adm/lonInterFace/student.jpg
-student.pgbg=#FFFFCC
-student.tabbg=#FF9900
+student.pgbg=#FFFFBB
+student.tabbg=#EEEE99
 student.font=#551100
 student.sidebg=#991100
 student.link=#993300
Index: loncom/html/adm/lonDomColors/msu.tab
diff -u loncom/html/adm/lonDomColors/msu.tab:1.1 loncom/html/adm/lonDomColors/msu.tab:1.2
--- loncom/html/adm/lonDomColors/msu.tab:1.1	Thu Dec 12 15:56:05 2002
+++ loncom/html/adm/lonDomColors/msu.tab	Sat Apr  5 17:14:40 2003
@@ -1,4 +1,4 @@
-coordinator.pgbg=#FFFFFF
-coordinator.font=#000000
-student.pgbg=#FFFFFF
-student.font=#000000
+login.img=/adm/lonDomLogos/headermsu.jpg
+student.sidebg=#388533
+coordinator.sidebg=#388533
+author.sidebg=#388533
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.94 loncom/interface/loncommon.pm:1.95
--- loncom/interface/loncommon.pm:1.94	Thu Apr  3 16:32:23 2003
+++ loncom/interface/loncommon.pm	Sat Apr  5 17:14:40 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.94 2003/04/03 21:32:23 www Exp $
+# $Id: loncommon.pm,v 1.95 2003/04/05 22:14:40 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1720,28 +1720,27 @@
     if ($bodyonly) {
         return $bodytag;
     } elsif ($ENV{'browser.interface'} eq 'textual') {
-#
-# Accessibility rendering
-#
+# Accessibility
         return $bodytag.&Apache::lonmenu::menubuttons($forcereg,'web',
                                                       $forcereg).
                '<h1>LON-CAPA: '.$title.'</h1>';
     } elsif ($ENV{'environment.remote'} eq 'off') {
-#
-# No-Remote rendering
-#
-        $upperleft=&Apache::lonmenu::menubuttons($forcereg,'web',
-						 $forcereg);
+# No Remote
+        return $bodytag.&Apache::lonmenu::menubuttons($forcereg,'web',
+                                                      $forcereg).
+               '<table bgcolor="'.$pgbg.'" width="100%" border="0" cellspacing="3" cellpadding="3"><tr><td bgcolor="'.$tabbg.'"><font size="+3" color="'.$font.'"><b>'.$title.
+'</b></font></td></tr></table>';
     }
+
 #
-# Top frame rendering
+# Top frame rendering, Remote is up
 #
     return(<<ENDBODY);
 $bodytag
 <table width="100%" cellspacing="0" border="0" cellpadding="0">
-<tr><td bgcolor="$font">
+<tr><td bgcolor="$sidebg">
 $upperleft</td>
-<td bgcolor="$font"><font color='$sidebg'>$messages</font></td>
+<td bgcolor="$sidebg" align="right">$messages&nbsp;</td>
 </tr>
 <tr>
 <td rowspan="3" bgcolor="$tabbg">
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.57 loncom/interface/lonmenu.pm:1.58
--- loncom/interface/lonmenu.pm:1.57	Fri Apr  4 17:00:26 2003
+++ loncom/interface/lonmenu.pm	Sat Apr  5 17:14:40 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.57 2003/04/04 22:00:26 www Exp $
+# $Id: lonmenu.pm,v 1.58 2003/04/05 22:14:40 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -46,6 +46,9 @@
 use Apache::File;
 use vars qw(@desklines $readdesk);
 my @inlineremote;
+my $font;
+my $tabbg;
+my $pgbg;
 
 # ============================= This gets called at the top of the body section
 
@@ -77,26 +80,57 @@
 	return $output."<hr />";
     } elsif ($ENV{'environment.remote'} eq 'off') {
 # Remote Control is switched off
+# figure out colors
+	my $function='student';
+        if ($ENV{'request.role'}=~/^(cc|in|ta|ep)/) {
+	    $function='coordinator';
+        }
+	if ($ENV{'request.role'}=~/^(su|dc|ad|li)/) {
+            $function='admin';
+        }
+        if (($ENV{'request.role'}=~/^(au|ca)/) ||
+            ($ENV{'REQUEST_URI'}=~/^(\/priv|\~)/)) {
+            $function='author';
+        }
+        my $domain=&Apache::loncommon::determinedomain();
+        $pgbg=&Apache::loncommon::designparm($function.'.pgbg',$domain);
+        $tabbg=&Apache::loncommon::designparm($function.'.tabbg',$domain);
+        $font=&Apache::loncommon::designparm($function.'.font',$domain);
+        my $link=&Apache::loncommon::designparm($function.'.link',$domain);
+        my $alink=&Apache::loncommon::designparm($function.'.alink',$domain);
+        my $vlink=&Apache::loncommon::designparm($function.'.vlink',$domain);
+        my $sidebg=&Apache::loncommon::designparm($function.'.sidebg',$domain);
+# Do we have a NAV link?
         if ($ENV{'request.course.id'}) {
 	    $navmaps=(<<ENDNAVREM);
-<a href="/adm/navmaps?postdata=$escurl&postsymb=$escsymb" target="_top">Navigate Contents</a>
+<td bgcolor="$tabbg">
+<a href="/adm/navmaps?postdata=$escurl&postsymb=$escsymb" target="_top"><font color="$font">Navigate Contents</font></a></td>
 ENDNAVREM
         }
-	my $output=(<<ENDINLINEMENU);
+        my $reg='';
+        if ($registration) {
+           $reg=&innerregister($forcereg,$target);
+        }
+	return (<<ENDINLINEMENU);
 <script>
 // BEGIN LON-CAPA Internal
 </script>
-<table bgcolor="#AAAAAA" width="100%" border="2"><tr><td>
-<a href="/adm/menu" target="_top">Main Menu</a>
+<table bgcolor="$pgbg" width="100%" border="0" cellpadding="3" cellspacing="3">
+<tr>
+<td bgcolor="$tabbg">
+<a href="/adm/menu" target="_top"><font color="$font">Main Menu</font></a>
+</td>
 $navmaps
-<a href="/adm/remote?action=launch&url=$escurl" target="_top">Launch Remote Control</a>
-<br />
+<td bgcolor="$tabbg">
+<a href="/adm/remote?action=launch&url=$escurl" target="_top">
+<font color="$font">Launch Remote Control</font></a></td>
+</tr>
+</table>
 <script>
 // END LON-CAPA Internal
 </script>
+$reg
 ENDINLINEMENU
-        if ($registration) { $output.=&innerregister($forcereg,$target); }
-	return $output."</td></tr></table>";
     } else {
 	return '';
     }
@@ -156,6 +190,8 @@
                           'swmenu.setstatus("you have","messages");');
     }
     my $timesync=($textual?'':'swmenu.syncclock(1000*'.time.');');
+    my $tablestart=($noremote?'<table bgcolor="'.$pgbg.'" border="0" cellspacing="3" cellpadding="3" width="100%">':'');
+    my $tableend=($noremote?'</table>':'');
 # =============================================================================
 # ============================ This is for URLs that actually can be registered
     if (($ENV{'REQUEST_URI'}!~/^\/(res\/)*adm\//) || ($forcereg)) {
@@ -240,7 +276,7 @@
 	my $menuitems=(<<ENDMENUITEMS);
 c&3&1
 s&2&1&back.gif&backward&&gopost('/adm/flip','back:'+currentURL)&Go to the previous resource in the course sequence&1
-s&2&3&forw.gif&forward&&gopost('/adm/flip','forward:'+currentURL)&Go to the next resource in the course sequence&1
+s&2&3&forw.gif&forward&&gopost('/adm/flip','forward:'+currentURL)&Go to the next resource in the course sequence&3
 s&6&3&catalog.gif&catalog&info&catalog_info()&Show catalog information
 s&8&1&eval.gif&evaluate&this&gopost('/adm/evaluate',currentURL)&Provide my evaluation of this resource
 s&8&2&fdbk.gif&feedback&discuss&gopost('/adm/feedback',currentURL)&Provide feedback messages or contribute to the course discussion about this resource
@@ -271,7 +307,9 @@
 </script>
 $timesync
 $newmail
+$tablestart
 $inlinebuttons
+$tableend
 $form
 <script>
 //END LON-CAPA Internal
@@ -527,9 +565,13 @@
        if ($nobreak==2) { return ''; }
        my $text=$top.' '.$bot;
        $text=~s/\- //;
-       $inlineremote[10*$row+$col]="\n".($nobreak?' ':'<br />').
-        '<a href="javascript:'.$act.';" target="_top">'.$text.'</a> '.
-        ($nobreak?'':$desc);
+       $inlineremote[10*$row+$col]="\n".
+         ($nobreak==3?'<td width="50%" colspan="2" align="right"':'<tr><td').
+         ' bgcolor="'.$tabbg.'"'.($nobreak==1?' width="50%" colspan="2"':'').
+     '"><a href="javascript:'.$act.';" target="_top"><font color="'.$font.'"'.
+          ($nobreak?' size="+1"':'').
+     '>'.$text.'</font></a></td>'.
+     ($nobreak?'':'<td colspan="3" width="80%"><font color="'.$font.'" size="-1">'.$desc.'</font>').($nobreak!=1?'</tr>':'');
    }
     return '';
 }
@@ -747,6 +789,21 @@
 
     my $form=&serverform();
     my $bodytag=&Apache::loncommon::bodytag('Main Menu');
+    my $function='student';
+    if ($ENV{'request.role'}=~/^(cc|in|ta|ep)/) {
+	$function='coordinator';
+    }
+    if ($ENV{'request.role'}=~/^(su|dc|ad|li)/) {
+	$function='admin';
+    }
+    if (($ENV{'request.role'}=~/^(au|ca)/) ||
+	($ENV{'REQUEST_URI'}=~/^(\/priv|\~)/)) {
+	$function='author';
+    }
+    my $domain=&Apache::loncommon::determinedomain();
+    $pgbg=&Apache::loncommon::designparm($function.'.pgbg',$domain);
+    $tabbg=&Apache::loncommon::designparm($function.'.tabbg',$domain);
+    $font=&Apache::loncommon::designparm($function.'.font',$domain);
 # ---- Print the screen, pretent to be in text mode to generate text-based menu
     unless ($ENV{'brower.interface'} eq 'textual') {
 	$ENV{'environment.remote'}='off';
@@ -761,7 +818,7 @@
 </head>
 $bodytag
 ENDHEADER
-    $r->print(&inlinemenu().$form);
+    $r->print('<table>'.&inlinemenu().'</table>'.$form);
     $r->print('</body></html>');
     return OK;
 }

--www1049580880--