--- loncom/interface/lonindexer.pm 2009/08/13 12:46:29 1.181.4.2 +++ loncom/interface/lonindexer.pm 2010/01/28 00:01:13 1.181.4.4 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Directory Indexer # -# $Id: lonindexer.pm,v 1.181.4.2 2009/08/13 12:46:29 raeburn Exp $ +# $Id: lonindexer.pm,v 1.181.4.4 2010/01/28 00:01:13 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -183,7 +183,7 @@ ENDSUBM $colspan=" colspan='2' "; my $cl=&mt('Close'); $closebutton=< + END } elsif ($env{'form.catalogmode'} eq 'import') { @@ -194,11 +194,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 @@ -427,13 +427,13 @@ ENDHEADER for (my $i=0; $i<=16; $i++) { delete $hash{'display_attrs_'.$i}; if ($env{'form.attr'.$i} == 1) { - $attrchk[$i] = 'checked'; + $attrchk[$i] = 'checked="checked"'; $hash{'display_attrs_'.$i} = 1; } } } else { for (my $i=0; $i<=16; $i++) { - $attrchk[$i] = 'checked' if $hash{'display_attrs_'.$i} == 1; + $attrchk[$i] = 'checked="checked"' if $hash{'display_attrs_'.$i} == 1; } } @@ -467,32 +467,31 @@ ENDHEADER $r->print(< $lt{'hd'} - - $lt{'av'} + + $lt{'av'} - $lt{'ti'} - $lt{'au'} - $lt{'kw'} - $lt{'ln'} - $lt{'nt'} - $lt{'sd'} + $lt{'ti'} + $lt{'au'} + $lt{'kw'} + $lt{'ln'} + $lt{'nt'} + $lt{'sd'} - $lt{'si'} - $lt{'la'} - $lt{'lm'} - $lt{'sa'} - $lt{'ab'} + $lt{'si'} + $lt{'la'} + $lt{'lm'} + $lt{'sa'} + $lt{'ab'} - $lt{'st'} - $lt{'li'} - $lt{'sr'} - $lt{'sb'} - $lt{'gl'} + $lt{'st'} + $lt{'li'} + $lt{'sr'} + $lt{'sb'} + $lt{'gl'} @@ -504,13 +503,15 @@ END $select_file_categories{''} = &mt('All file types'); foreach my $cat (@file_categories) { my $types = join(",",&Apache::loncommon::filecategorytypes($cat)); - $select_file_categories{$types} = $cat; + $select_file_categories{$types} = &mt($cat); push(@select_form_order,$types); } $select_file_categories{'select_form_order'} = \@select_form_order; my $type_element= - &Apache::loncommon::select_form($typeselect,'only', - %select_file_categories); + &Apache::loncommon::select_form( + $typeselect, + 'only', + %select_file_categories); $type_element = ''.&mt('File Type Displayed: [_1]', $type_element).''; $r->print($type_element @@ -550,8 +551,8 @@ END &Apache::lonhtmlcommon::store_recent('residx',$storeuri,$storeuri); # -------------------------------------------------- Check All and Uncheck all if ($env{'form.catalogmode'} eq 'import') { - $r->print(''); - $r->print(''); + $r->print(''); + $r->print(''); } # ----------------- output starting row to the indexed file/directory hierarchy my $titleclr="#ddffff"; @@ -880,7 +881,7 @@ sub display_line { $r->print("\n"); $r->print (''."\n"); @@ -889,14 +890,14 @@ sub display_line { $startdir.'" />'."\n"); $r->print (''."\n"); $r->print ('print (' name="'.$msg.'" type="image" class="LC_indexer_icon" />'. + $r->print (' name="'.$msg.'" alt="'.$msg.'" type="image" class="LC_indexer_icon" />'. "\n"); $r->print(&mt("Up")."$tabtag\n"); return OK; } # Do we have permission to look at this? - if($filecom[15] ne '1') { return OK if (!&Apache::lonnet::allowed('bre',$pathprefix.$filecom[0])); } + if($filecom[15] ne '1') { return OK if ((!&Apache::lonnet::allowed('bre',$pathprefix.$filecom[0])) && (!&Apache::lonnet::allowed('bro',$pathprefix.$filecom[0]))); } # make absolute links appear on different background if ($absolute) { $fileclr='#ccdd99'; } @@ -914,7 +915,7 @@ sub display_line { $r->print (''); $r->print ('print (' name="'.$msg.'" type="image" class="LC_indexer_icon" />'. + $r->print (' name="'.$msg.'" alt="'.$msg.'" type="image" class="LC_indexer_icon" />'. "\n"); my $quotable_filecom = &Apache::loncommon::escape_single($filecom[0]); $r->print (''); $r->print ('print (' name="'.$msg.'" type="image" class="LC_indexer_icon" />'. + $r->print (' name="'.$msg.'" alt="'.$msg.'" type="image" class="LC_indexer_icon" />'. "\n"); my $quotable_curdir = &Apache::loncommon::escape_single($curdir); $r->print ('\n"); $r->print("print("checked"); @@ -1032,7 +1033,7 @@ sub display_line { $r->print (''); $r->print ('print (' name="'.$msg.'" type="image" class="LC_indexer_icon" />'. + $r->print (' name="'.$msg.'" alt="'.$msg.'" type="image" class="LC_indexer_icon" />'. "\n"); } # Filetype icons @@ -1186,7 +1187,7 @@ sub display_line { $r->print (''); $r->print ('print (' name="'.$msg.'" type="image" class="LC_indexer_icon" />'. + $r->print (' name="'.$msg.'" alt="'.$msg.'" type="image" class="LC_indexer_icon" />'. "\n"); my $quotable_curdir = &Apache::loncommon::escape_single($curdir); $r->print (''."\n"); $r->print (''.