--- loncom/interface/lonindexer.pm 2009/05/21 00:36:16 1.181.4.1 +++ loncom/interface/lonindexer.pm 2009/12/02 18:22:20 1.181.6.2 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Directory Indexer # -# $Id: lonindexer.pm,v 1.181.4.1 2009/05/21 00:36:16 raeburn Exp $ +# $Id: lonindexer.pm,v 1.181.6.2 2009/12/02 18:22:20 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 @@ -407,8 +407,14 @@ function gothere(val) { ENDHEADER my ($headerdom)=($uri=~m{^/res/($match_domain)/}); - $r->print(&Apache::loncommon::start_page('Browse Resources',$js, - {'domain' => $headerdom,})); + my %args = ( + 'domain' => $headerdom, + ); + if ($env{'form.catalogmode'}) { + # "Popup mode" + $args{'only_body'} = 1; + } + $r->print(&Apache::loncommon::start_page('Browse Resources',$js,\%args)); # ---------------------------------- get state of file types to be showing if ($env{'form.only'}) { $typeselect = $env{'form.only'}; @@ -421,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; } } @@ -461,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'} @@ -544,8 +549,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"; @@ -874,7 +879,7 @@ sub display_line { $r->print("\n"); $r->print (''."\n"); @@ -883,7 +888,7 @@ 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; @@ -908,7 +913,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"); @@ -1026,7 +1031,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 @@ -1180,7 +1185,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 (''.