[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm lonmenu.pm lonremote.pm

www lon-capa-cvs@mail.lon-capa.org
Thu, 03 Apr 2003 03:08:12 -0000


www		Wed Apr  2 22:08:12 2003 EDT

  Modified files:              
    /loncom/interface	loncommon.pm lonmenu.pm lonremote.pm 
  Log:
  Still a long ways to go to an inline "Remote" menu bar.
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.92 loncom/interface/loncommon.pm:1.93
--- loncom/interface/loncommon.pm:1.92	Thu Mar 27 20:53:55 2003
+++ loncom/interface/loncommon.pm	Wed Apr  2 22:08:12 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.92 2003/03/28 01:53:55 www Exp $
+# $Id: loncommon.pm,v 1.93 2003/04/03 03:08:12 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1718,10 +1718,23 @@
     if ($bodyonly) {
         return $bodytag;
     } elsif ($ENV{'browser.interface'} eq 'textual') {
+#
+# Accessibility rendering
+#
+        return $bodytag.&Apache::lonmenu::menubuttons($forcereg,'web',
+                                                      $forcereg).
+               '<h1>LON-CAPA: '.$title.'</h1>';
+    } elsif ($ENV{'environment.remote'} eq 'off') {
+#
+# No-Remote rendering
+#
         return $bodytag.&Apache::lonmenu::menubuttons($forcereg,'web',
                                                       $forcereg).
                '<h1>LON-CAPA: '.$title.'</h1>';
     } else {
+#
+# Remote rendering
+#
         return(<<ENDBODY);
 $bodytag
 <table width="100%" cellspacing="0" border="0" cellpadding="0">
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.49 loncom/interface/lonmenu.pm:1.50
--- loncom/interface/lonmenu.pm:1.49	Wed Apr  2 19:52:21 2003
+++ loncom/interface/lonmenu.pm	Wed Apr  2 22:08:12 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.49 2003/04/03 00:52:21 www Exp $
+# $Id: lonmenu.pm,v 1.50 2003/04/03 03:08:12 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -484,9 +484,19 @@
     $act=~s/\$udom/$udom/g;
     unless (($ENV{'browser.interface'} eq 'textual')  ||
             ($ENV{'environment.remote'} eq 'off')) {
+# Remote
        return "\n".
  qq(window.status+='.';swmenu.switchbutton($row,$col,"$img","$top","$bot","$act","$desc"););
+   } elsif ($ENV{'browser.interface'} eq 'textual') {
+# Accessibility
+       if ($nobreak==2) { return ''; }
+       my $text=$top.' '.$bot;
+       $text=~s/\- //;
+       return "\n".($nobreak?' ':'<br />').
+        '<a href="javascript:'.$act.';" target="_top">'.$text.'</a> '.
+        ($nobreak?'':$desc);
    } else {
+# Inline Remote
        if ($nobreak==2) { return ''; }
        my $text=$top.' '.$bot;
        $text=~s/\- //;
Index: loncom/interface/lonremote.pm
diff -u loncom/interface/lonremote.pm:1.3 loncom/interface/lonremote.pm:1.4
--- loncom/interface/lonremote.pm:1.3	Wed Apr  2 17:02:19 2003
+++ loncom/interface/lonremote.pm	Wed Apr  2 22:08:12 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # User Authentication Module
 #
-# $Id: lonremote.pm,v 1.3 2003/04/02 22:02:19 www Exp $
+# $Id: lonremote.pm,v 1.4 2003/04/03 03:08:12 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -46,17 +46,20 @@
     &Apache::lonnet::put('environment',{'remote' => 'on'});
     &Apache::lonnet::appenv('environment.remote' => 'on');
 # -------------------------------------------------------- Menu script and info
-#    my $windowinfo=&Apache::lonmenu::open($clientos);
-#    my $startupremote=&Apache::lonmenu::startupremote($lowerurl);
-#    my $setflags=&Apache::lonmenu::setflags();
-#    my $maincall=&Apache::lonmenu::maincall();
+    my $windowinfo=&Apache::lonmenu::open($ENV{'browser.os'});
+    my $startupremote=&Apache::lonmenu::startupremote($lowerurl);
+    my $setflags=&Apache::lonmenu::setflags();
+    my $maincall=&Apache::lonmenu::maincall();
     my $bodytag=&Apache::loncommon::bodytag('Launch Remote Control');
     $r->print(<<ENDLAUNCH);
 <html>
 <head>
 <title>The LearningOnline Network with CAPA</title>
+$startupremote
 </head>
 $bodytag
+$setflags
+$windowinfo
 </body>
 </html>
 ENDLAUNCH
@@ -66,12 +69,14 @@
     my ($r,$lowerurl)=@_;
 # -------------------------------------------------------- Menu script and info
     my $bodytag=&Apache::loncommon::bodytag('Collapse Remote Control');
+    my $windowinfo=&Apache::lonmenu::close();
     $r->print(<<ENDCOLLAPSE);
 <html>
 <head>
 <title>The LearningOnline Network with CAPA</title>
 </head>
 $bodytag
+$windowinfo
 </body>
 </html>
 ENDCOLLAPSE
@@ -89,10 +94,13 @@
 	    $ENV{'form.action'}='launch';
         }
     }
+# FIXME - testurl
+    my $lowerurl='/adm/roles';
+###
     if ($ENV{'form.action'} eq 'launch') {
-	&launchremote($r);
+	&launchremote($r,$lowerurl);
     } else {
-        &collapseremote($r);
+        &collapseremote($r,$lowerurl);
     }
     return OK;
 }