--- loncom/interface/lonindexer.pm 2007/06/27 16:35:55 1.161 +++ loncom/interface/lonindexer.pm 2007/06/27 22:39:48 1.162 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Directory Indexer # -# $Id: lonindexer.pm,v 1.161 2007/06/27 16:35:55 banghart Exp $ +# $Id: lonindexer.pm,v 1.162 2007/06/27 22:39:48 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -174,7 +174,7 @@ ENDSUBM if ($env{'form.catalogmode'} eq 'interactive') { $extrafield=''. ''; + ' class="LC_icon" />'; $colspan=" colspan='2' "; my $cl=&mt('Close'); $closebutton=<'. ''; + ' class="LC_icon" />'; $colspan=" colspan='2' "; my $cl=&mt('Close'); my $gi=&mt('Import'); @@ -843,7 +843,7 @@ sub display_line { $startdir.'" />'."\n"); $r->print (''."\n"); $r->print ('print (' name="'.$msg.'" height="22" type="image" border="0" />'. + $r->print (' name="'.$msg.'" type="image" class="LC_indexer_icon" />'. "\n"); $r->print(&mt("Up")."$tabtag\n"); return OK; @@ -863,17 +863,17 @@ sub display_line { $r->print(""); &begin_form ($r,$filecom[0]); my $anchor = $filecom[0]; - $anchor =~ s/\///g; + $anchor =~ s/\W//g; $r->print (''); $r->print (''); $r->print ('print (' name="'.$msg.'" height="22" type="image" border="0" />'. + $r->print (' name="'.$msg.'" type="image" class="LC_indexer_icon" />'. "\n"); my $quotable_filecom = &Apache::loncommon::escape_single($filecom[0]); $r->print ('print (' border="0" />'."\n"); + $r->print (' class="LC_icon" />'."\n"); $r->print (&mt("Domain")." - $listname "); if (&Apache::lonnet::domain($listname,'description')) { $r->print("(".&Apache::lonnet::domain($listname,'description'). @@ -888,24 +888,23 @@ sub display_line { # $r->print("$extrafield"); my $curdir = $startdir.$filecom[0].'/'; my $anchor = $curdir; - $anchor =~ s/\///g; + $anchor =~ s/\W//g; $r->print(""); $r->print("\n"); $r->print("\n"); $r->print("\n"); &begin_form ($r,$curdir); $r->print (''."\n"); + 'whitespace1.gif" class="LC_icon" />'."\n"); $r->print (''); $r->print ('print (' name="'.$msg.'" height="22" type="image" border="0" />'. + $r->print (' name="'.$msg.'" type="image" class="LC_indexer_icon" />'. "\n"); my $quotable_curdir = &Apache::loncommon::escape_single($curdir); $r->print (''); + .'\')">'.$msg.''); my $domain=(split(m|/|,$startdir))[2]; my $plainname=&Apache::loncommon::plainname($listname,$domain); $r->print ($listname); @@ -935,7 +934,7 @@ sub display_line { my $quotable_filelink = &Apache::loncommon::escape_single($filelink); $r->print(""); - $r->print("\"\"". + $r->print("\"\"". "\n"); $r->print(""); } elsif ($env{'form.catalogmode'} eq 'import') { @@ -954,49 +953,47 @@ sub display_line { # Form to open or close sequences if ($filelink=~/\.(page|sequence)$/) { my $curdir = $startdir.$filecom[0].'/'; - my $anchor = $curdir; - $anchor =~ s/\///g; &begin_form($r,$curdir); $indent--; } # General indentation if ($indent > 0 and $indent < 11) { - $r->print("\"\"\n"); + $r->print("\"\"\n"); } elsif ($indent >0) { my $ten = int($indent/10.); my $rem = $indent%10.0; my $count = 0; while ($count < $ten) { - $r->print("\"\"\n"); + $r->print("\"\"\n"); $count++; } $r->print("\"\"\n") if $rem > 0; + ".gif class='LC_icon' />\n") if $rem > 0; } # Sequence open/close icon if ($filelink=~/\.(page|sequence)$/) { my $curdir = $startdir.$filecom[0].'/'; my $anchor = $curdir; - $anchor =~ s/\///g; + $anchor =~ s/\W//g; $r->print (''); $r->print ('print (' name="'.$msg.'" height="22" type="image" border="0" />'. + $r->print (' name="'.$msg.'" type="image" class="LC_indexer_icon" />'. "\n"); } # Filetype icons - $r->print("\"\"\n"); + $r->print("\"\"\n"); my $quotable_filelink = &Apache::loncommon::escape_single($filelink); $r->print (" $listname "); $r->print (" (metadata) "); # Close form to open/close sequence if ($filelink=~/\.(page|sequence)$/) { @@ -1093,35 +1090,35 @@ sub display_line { if ($fnptr == $dirptr) { my $curdir = $startdir.$filecom[0].'/'; my $anchor = $curdir; - $anchor =~ s/\///g; + $anchor =~ s/\W//g; $r->print("$extrafield"); &begin_form ($r,$curdir); my $indentm1 = $indent-1; if ($indentm1 < 11 and $indentm1 > 0) { $r->print("\"\"\n"); + ".gif class='LC_icon' />\n"); } else { my $ten = int($indentm1/10.); my $rem = $indentm1%10.0; my $count = 0; while ($count < $ten) { $r->print ("\"\"\n"); + ,"whitespace10.gif class='LC_icon' />\n"); $count++; } $r->print ("\"\"\n") if $rem > 0; + ".gif class='LC_icon' />\n") if $rem > 0; } $r->print (''); $r->print ('print (' name="'.$msg.'" height="22" type="image" border="0" />'. + $r->print (' name="'.$msg.'" type="image" class="LC_indexer_icon" />'. "\n"); my $quotable_curdir = &Apache::loncommon::escape_single($curdir); $r->print ('' .''.&mt('Open Folder').''. + $iconpath.'folder_'.$diropen.'.gif" class="LC_icon" />'. "\n"); $r->print ("$listname\n"); # Attributes @@ -1247,7 +1244,8 @@ sub dynmetaprint { sub begin_form { my ($r,$uri) = @_; my $anchor = $uri; - $anchor =~ s/\///g; + $anchor =~ s/\W//g; + $uri=&Apache::loncommon::escape_single($uri); $r->print ('