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

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 14 Apr 2006 20:12:36 -0000


albertel		Fri Apr 14 16:12:36 2006 EDT

  Modified files:              
    /loncom/interface	lonmenu.pm loncommon.pm 
  Log:
  - eliminating the mostly useless $target itme
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.172 loncom/interface/lonmenu.pm:1.173
--- loncom/interface/lonmenu.pm:1.172	Mon Apr 10 14:49:56 2006
+++ loncom/interface/lonmenu.pm	Fri Apr 14 16:12:35 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.172 2006/04/10 18:49:56 albertel Exp $
+# $Id: lonmenu.pm,v 1.173 2006/04/14 20:12:35 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -84,7 +84,6 @@
 
 sub menubuttons {
     my $forcereg=shift;
-    my $target  =shift;
     my $registration=shift;
     my $titletable=shift;
     &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
@@ -164,7 +163,7 @@
 </script>
 $form
 ENDMAINMENU
-        if ($registration) { $output.=&innerregister($forcereg,$target); }
+        if ($registration) { $output.=&innerregister($forcereg); }
 	return $output."<hr />";
     } elsif ($env{'environment.remote'} eq 'off') {
 # Remote Control is switched off
@@ -244,7 +243,7 @@
         }
         my $reg='';
         if ($registration) {
-           $reg=&innerregister($forcereg,$target,$titletable);
+           $reg=&innerregister($forcereg,$titletable);
         }
         my $form=&serverform();
 	my $utility=&utilityfunctions();
@@ -294,20 +293,13 @@
 # ====================================== This gets called in the header section
 
 sub registerurl {
-    my $forcereg=shift;
-    my $target = shift;
+    my ($forcereg) = @_;
     my $result = '';
     if ($env{'request.noversionuri'} eq '/res/adm/pages/menu.html') { return ''; }
     my $force_title='';
     if ($env{'request.state'} eq 'construct') {
 	$force_title=&Apache::lonxml::display_title();
     }
-    if ($target eq 'edit') {
-        $result .="<script type=\"text/javascript\">\n".
-            "if (typeof swmenu != 'undefined') {swmenu.currentURL=null;}\n".
-            &Apache::loncommon::browser_and_searcher_javascript().
-                "\n</script>\n";
-    }
     if (($env{'browser.interface'} eq 'textual') ||
         ($env{'environment.remote'} eq 'off') ||
         ((($env{'request.publicaccess'}) || 
@@ -319,9 +311,7 @@
     }
 # Graphical display after login only
     if ($Apache::lonxml::registered && !$forcereg) { return ''; }
-    if ($target ne 'edit') {
-	$result.=&innerregister($forcereg,$target);
-    }
+    $result.=&innerregister($forcereg);
     return $result.$force_title;
 }
 
@@ -329,7 +319,7 @@
 # =========== and in the body of the document
 
 sub innerregister {
-    my ($forcereg, $target, $titletable) = @_;
+    my ($forcereg, $titletable) = @_;
     my $result = '';
     my ($uname,$thisdisfn);
     my $const_space = ($env{'request.state'} eq 'construct');
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.335 loncom/interface/loncommon.pm:1.336
--- loncom/interface/loncommon.pm:1.335	Thu Apr 13 17:02:25 2006
+++ loncom/interface/loncommon.pm	Fri Apr 14 16:12:35 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.335 2006/04/13 21:02:25 albertel Exp $
+# $Id: loncommon.pm,v 1.336 2006/04/14 20:12:35 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2825,8 +2825,7 @@
     } elsif ($env{'browser.interface'} eq 'textual') {
 # Accessibility
           
-        return $bodytag.&Apache::lonmenu::menubuttons($forcereg,'web',
-                                                      $forcereg).
+        return $bodytag.&Apache::lonmenu::menubuttons($forcereg,$forcereg).
                '<h1>LON-CAPA: '.$title.'</h1>';
     } elsif ($env{'environment.remote'} eq 'off') {
 # No Remote
@@ -2884,13 +2883,13 @@
             if ($notopbar) {
                 $bodytag .= $titletable;
             } else {
-                $bodytag .= &Apache::lonmenu::menubuttons($forcereg,'web',$forcereg,$titletable);
+                $bodytag .= &Apache::lonmenu::menubuttons($forcereg,$forcereg,$titletable);
             }
 	} else {
             if ($notopbar) {
                 $bodytag .= $titletable;
             } else {
-                $bodytag .= &Apache::lonmenu::menubuttons($forcereg,'web',$forcereg).
+                $bodytag .= &Apache::lonmenu::menubuttons($forcereg,$forcereg).
                         $titletable;
             }
         }