--- loncom/interface/lonindexer.pm 2004/10/21 11:18:41 1.128 +++ loncom/interface/lonindexer.pm 2005/03/01 03:20:41 1.131 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Directory Indexer # -# $Id: lonindexer.pm,v 1.128 2004/10/21 11:18:41 foxr Exp $ +# $Id: lonindexer.pm,v 1.131 2005/03/01 03:20:41 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -136,7 +136,7 @@ sub handler { } #Hijack lonindexer to verify a title and be close down. if ($ENV{'form.launch'} eq '2') { - $r->content_type('text/html'); + &Apache::loncommon::content_type($r,'text/html'); my $extra=''; if (defined($ENV{'form.titleelement'}) && $ENV{'form.titleelement'} ne '') { @@ -145,10 +145,12 @@ sub handler { $verify_title=~s/'/\\'/g; $extra='window.opener.document.forms["'.$ENV{'form.form'}.'"].elements["'.$ENV{'form.titleelement'}.'"].value=\''.$verify_title.'\';'; } + my $html=&Apache::lonxml::xmlbegin(); $r->print(< - - - + + + ENDSUBM @@ -175,7 +178,7 @@ ENDSUBM $colspan=" colspan='2' "; my $cl=&mt('Close'); $closebutton=< + END } elsif ($ENV{'form.catalogmode'} eq 'groupimport') { @@ -186,11 +189,11 @@ END my $cl=&mt('Close'); my $gi=&mt('Import'); $closebutton=< + END $groupimportbutton=< +onClick="javascript:select_group()" /> END } # Additions made by Matthew to make the browser a little easier to deal @@ -344,8 +347,9 @@ END } # ---------------------------------------------------------------- Print Header + my $html=&Apache::lonxml::xmlbegin(); $r->print(< +$html The LearningOnline Network With CAPA Directory Browser @@ -505,11 +509,11 @@ END &Apache::lonhtmlcommon::store_recent('residx',$storeuri,$storeuri); # ----------------- output starting row to the indexed file/directory hierarchy my $titleclr="#ddffff"; -# $r->print(&initdebug()); -# $r->print(&writedebug("Omit:@Omit")) if (@Omit); -# $r->print(&writedebug("Only:@Only")) if (@Only); - $r->print("
\n"); - $r->print("\n"); + #$r->print(&initdebug()); + #$r->print(&writedebug("Omit:@Omit")) if (@Omit); + #$r->print(&writedebug("Only:@Only")) if (@Only); + $r->print('
\n"); + $r->print(&mt("Up")." $tabtag\n"); return OK; } # Do we have permission to look at this? @@ -836,7 +841,7 @@ sub display_line { # display domain if ($filecom[1] eq 'domain') { - $r->print (''."\n") + $r->print (''."\n") if ($ENV{'form.dirPointer'} eq "on"); $r->print("$extrafield"); $r->print("\n"); + $r->print (" $tabtag\n"); return OK; # display user directory @@ -872,10 +877,10 @@ sub display_line { &begin_form ($r,$curdir); $r->print (''."\n"); - $r->print (''); + $r->print (''); $r->print ('print (' name="'.$msg.'" height="22" type="image" border="0">'. + $r->print (' name="'.$msg.'" height="22" type="image" border="0" />'. "\n"); my $quotable_curdir = &Apache::loncommon::escape_single($curdir); $r->print ('print ($tabtag.''."\n"); + $r->print (''.$tabtag.''."\n"); return OK; } @@ -905,7 +910,7 @@ sub display_line { } # Set the icon for the file my $iconname = &Apache::loncommon::icon($listname); - $r->print("
'."\n"); + $r->print(''."\n"); $r->print("\n"); $r->print("\n") if ($hash{'display_attrs_0'} == 1); @@ -587,7 +591,7 @@ END # ---------------------------- embed hidden information useful for group import $r->print(""); - $r->print(""); + $r->print(""); # -------------------------------------------------------------- end the tables $r->print('
".&mt('Name')."".&mt('Title')."
'); @@ -717,6 +721,7 @@ sub dynmetaread { } sub initdebug { + my $html=&Apache::lonxml::xmlbegin(); return < var debugging = true; @@ -729,7 +734,7 @@ function output(text) { debuggingWindow.document.writeln(text); } } -output("Debugging Window
");   
+output('$htmlDebugging Window
');   
 
 ENDJS
 }
@@ -819,12 +824,12 @@ sub display_line {
 		   'enctype="application/x-www-form-urlencoded"'.
                    '>'."\n");
 	$r->print (''."\n");
-	$r->print (''."\n");
+		   $startdir.'" />'."\n");
+	$r->print (''."\n");
 	$r->print ('print (' name="'.$msg.'" height="22" type="image" border="0">'.
+	$r->print (' name="'.$msg.'" height="22" type="image" border="0" />'.
 		   "\n");
-	$r->print(&mt("Up")." $tabtag
"); @@ -844,10 +849,10 @@ sub display_line { my $anchor = $filecom[0]; $anchor =~ s/\///g; $r->print (''); - $r->print (''); + $r->print (''); $r->print ('print (' name="'.$msg.'" height="22" type="image" border="0">'. + $r->print (' name="'.$msg.'" height="22" type="image" border="0" />'. "\n"); my $quotable_filecom = &Apache::loncommon::escape_single($filecom[0]); $r->print ('print (" $tabtag
"); + $r->print("
"); if ($ENV{'form.catalogmode'} eq 'interactive') { my $quotable_filelink = &Apache::loncommon::escape_single($filelink); @@ -922,7 +927,7 @@ sub display_line { if ($hash{'store_'.$filelink}) { $r->print("checked"); } - $r->print(">\n"); + $r->print(" />\n"); $r->print("\n"); $r->print(""); $hash{"pre_${fnum}_link"}=$filelink; @@ -957,10 +962,10 @@ sub display_line { my $curdir = $startdir.$filecom[0].'/'; my $anchor = $curdir; $anchor =~ s/\///g; - $r->print (''); + $r->print (''); $r->print ('print (' name="'.$msg.'" height="22" type="image" border="0">'. + $r->print (' name="'.$msg.'" height="22" type="image" border="0" />'. "\n"); } # Filetype icons @@ -1110,10 +1115,10 @@ sub display_line { $r->print ("\n") if $rem > 0; } - $r->print (''); + $r->print (''); $r->print ('print (' name="'.$msg.'" height="22" type="image" border="0">'. + $r->print (' name="'.$msg.'" height="22" type="image" border="0" />'. "\n"); my $quotable_curdir = &Apache::loncommon::escape_single($curdir); $r->print (''."\n"); - $r->print (''. + $r->print (''. "\n"); - $r->print (''."\n"); + $r->print (''."\n"); $dnum++; }