--- loncom/interface/lonindexer.pm 2013/08/12 19:47:10 1.213.4.6 +++ loncom/interface/lonindexer.pm 2020/09/03 15:49:27 1.213.4.9 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Directory Indexer # -# $Id: lonindexer.pm,v 1.213.4.6 2013/08/12 19:47:10 raeburn Exp $ +# $Id: lonindexer.pm,v 1.213.4.9 2020/09/03 15:49:27 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -565,7 +565,7 @@ END } else { $r->print($reshome); } - $r->print("'>".&mt('Home').''); + $r->print("'>".&mt('Home directory').''); } $r->print(''); # ------------------------------------------------------ Remember where we were @@ -623,7 +623,7 @@ END # ----------------- read in what directories have previously been set to "open" - foreach (keys %hash) { + foreach (keys(%hash)) { if ($_ =~ /^diropen_status_/) { my $key = $_; $key =~ s/^diropen_status_//; @@ -754,7 +754,7 @@ sub get_list { (my $luri = $uri) =~ s/\//_/g; if ($env{'form.updatedisplay'}) { - foreach (keys %hash) { + foreach (keys(%hash)) { delete $hash{$_} if ($_ =~ /^dirlist_files_/); delete $hash{$_} if ($_ =~ /^dirlist_timestamp_files_/); } @@ -989,6 +989,9 @@ $r->print (''. "\n"); my $quotable_curdir = &Apache::loncommon::escape_single($curdir); + my $quotable_startdir = &Apache::loncommon::escape_single($startdir); + my $quotable_listname = &Apache::loncommon::escape_single($listname); + $r->print (''.$msg.''); @@ -1000,7 +1003,7 @@ $r->print (''. + 'onclick="set_wishlistlink('."'$plainname','$quotable_startdir$quotable_listname"."/'".')">'. ''.$tabtag); $r->print(&Apache::loncommon::end_data_table_row()); @@ -1083,8 +1086,15 @@ $r->print ('\n"); my $quotable_filelink = &Apache::loncommon::escape_single($filelink); + my $quotable_startdir = Apache::loncommon::escape_single($startdir); + my $quotable_listname = &Apache::loncommon::escape_single($listname); + my $curfext = lc((split(/\./,$listname))[-1]); + my $modalstyle; + if ($curfext =~ /^js|css|txt|tab$/) { + $modalstyle = ",'','background-color:#ffffff'"; + } - $r->print (" $listname "); + $r->print (" $listname "); $quotable_filelink = &Apache::loncommon::escape_single($filelink.'.meta'); &Apache::loncommon::inhibit_menu_check(\$quotable_filelink); $r->print (" (".&mt('metadata').") "); @@ -1096,7 +1106,7 @@ $r->print (''. + "','$quotable_startdir$quotable_listname'".')">'. ''); if ($hash{'display_attrs_0'} == 1) { @@ -1238,7 +1248,9 @@ $r->print (''. "\n"); my $quotable_curdir = &Apache::loncommon::escape_single($curdir); - + my $quotable_startdir = &Apache::loncommon::escape_single($startdir); + my $quotable_listname = &Apache::loncommon::escape_single($listname); + my $location = &Apache::loncommon::lonhttpdurl("/adm/lonIcons"); my $icon = "navmap.folder.".($nowOpen ? "open":"closed").'.gif'; $r->print (''. + 'onclick="set_wishlistlink('."'$listname','$quotable_startdir$quotable_listname"."/'".')">'. ''); # Attributes @@ -1297,8 +1309,8 @@ $r->print ('