[LON-CAPA-cvs] cvs: loncom /interface lonhtmlcommon.pm lonindexer.pm

www lon-capa-cvs@mail.lon-capa.org
Tue, 27 Jan 2004 16:35:37 -0000


www		Tue Jan 27 11:35:37 2004 EDT

  Modified files:              
    /loncom/interface	lonhtmlcommon.pm lonindexer.pm 
  Log:
  * Fixing problem with the dirPointer hidden variable (should not have been set
  in upper form)
  * Making groupimport remember selected files when using crumbs to navigate
  
  
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.41 loncom/interface/lonhtmlcommon.pm:1.42
--- loncom/interface/lonhtmlcommon.pm:1.41	Mon Jan 26 14:55:44 2004
+++ loncom/interface/lonhtmlcommon.pm	Tue Jan 27 11:35:37 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.41 2004/01/26 19:55:44 www Exp $
+# $Id: lonhtmlcommon.pm,v 1.42 2004/01/27 16:35:37 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -930,7 +930,7 @@
 	    $path.='/'.$_;
 	    my $linkpath=$path;
 	    if ($form) {
-		$linkpath="javascript:$form.action='$path';$form.submit();";
+		$linkpath="javascript:$form.action='$path/';$form.submit();";
 	    }
 	    $output.='<a href="'.$linkpath.'"'.($target?' target="'.$target.'"':'').'>'.$_.'</a>/';
 	}
Index: loncom/interface/lonindexer.pm
diff -u loncom/interface/lonindexer.pm:1.87 loncom/interface/lonindexer.pm:1.88
--- loncom/interface/lonindexer.pm:1.87	Mon Jan 26 14:55:44 2004
+++ loncom/interface/lonindexer.pm	Tue Jan 27 11:35:37 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Directory Indexer
 #
-# $Id: lonindexer.pm,v 1.87 2004/01/26 19:55:44 www Exp $
+# $Id: lonindexer.pm,v 1.88 2004/01/27 16:35:37 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -511,9 +511,12 @@
 	my $indent = 0;
 	$uri = $uri.'/' if $uri !~ /.*\/$/;
 
-
-	$hash{'top.level'} = $uri;
-	$toplevel = $uri;
+ 	if ($ENV{'form.dirPointer'} ne 'on') {
+ 	    $hash{'top.level'} = $uri;
+ 	    $toplevel = $uri;
+ 	} else {
+ 	    $toplevel = $hash{'top.level'};
+ 	}
 
 # -------------------------------- if not at top level, provide an uplink arrow
 	if ($toplevel ne '/res/'){
@@ -725,6 +728,8 @@
 
 # display domain
     if ($filecom[1] eq 'domain') {
+ 	$r->print ('<input type="hidden" name="dirPointer" value="on">'."\n")
+ 	    if ($ENV{'form.dirPointer'} eq "on");
 	$r->print("<tr valign='$valign' bgcolor=$fileclr>$extrafield");
 	$r->print("<td>");
 	&begin_form ($r,$filecom[0]);
@@ -1009,6 +1014,7 @@
 	       'enctype="application/x-www-form-urlencoded">'."\n");
     $r->print ('<input type="hidden" name="openuri" value="'.$uri.'">'.
 	       "\n");
+    $r->print ('<input type="hidden" name="dirPointer" value="on">'."\n");
     $dnum++;
 }