--- loncom/interface/lonindexer.pm 2003/09/26 00:23:09 1.77 +++ loncom/interface/lonindexer.pm 2003/11/08 10:33:27 1.80 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Directory Indexer # -# $Id: lonindexer.pm,v 1.77 2003/09/26 00:23:09 www Exp $ +# $Id: lonindexer.pm,v 1.80 2003/11/08 10:33:27 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -118,7 +118,7 @@ sub handler { # Get the parameters from the query string &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, ['catalogmode','launch','acts','mode','form','element', - 'only','omit']); + 'only','omit','titleelement']); #------------------------------------------------------------------- my $closebutton=''; my $groupimportbutton=''; @@ -179,11 +179,12 @@ END # $element is the name of the element in $formname which receives # the URL. # &Apache::lonxml::debug('Checking mode, form, element'); - &setvalues(\%hash,'form.mode' ,\%ENV,'form.mode' ); - &setvalues(\%hash,'form.form' ,\%ENV,'form.form' ); - &setvalues(\%hash,'form.element',\%ENV,'form.element'); - &setvalues(\%hash,'form.only' ,\%ENV,'form.only' ); - &setvalues(\%hash,'form.omit' ,\%ENV,'form.omit' ); + &setvalues(\%hash,'form.mode' ,\%ENV,'form.mode' ); + &setvalues(\%hash,'form.form' ,\%ENV,'form.form' ); + &setvalues(\%hash,'form.element' ,\%ENV,'form.element'); + &setvalues(\%hash,'form.titleelement',\%ENV,'form.titleelement'); + &setvalues(\%hash,'form.only' ,\%ENV,'form.only' ); + &setvalues(\%hash,'form.omit' ,\%ENV,'form.omit' ); # Deal with 'omit' and 'only' if (exists $ENV{'form.omit'}) { @@ -194,12 +195,14 @@ END } my $mode = $ENV{'form.mode'}; - my ($form,$element); + my ($form,$element,$titleelement); if ($mode eq 'edit' || $mode eq 'parmset') { - $form = $ENV{'form.form'}; - $element = $ENV{'form.element'}; + $form = $ENV{'form.form'}; + $element = $ENV{'form.element'}; + $titleelement = $ENV{'form.titleelement'}; } - &Apache::lonxml::debug("mode=$mode form=$form element=$element"); + &Apache::lonxml::debug("mode=$mode form=$form element=$element + titleelement=$titleelement"); # ------ set catalogmodefunctions to have extra needed javascript functionality my $catalogmodefunctions=''; if ($ENV{'form.catalogmode'} eq 'interactive' or @@ -248,6 +251,7 @@ END // mode = $mode function select_data(title,url) { changeURL(url); + changeTitle(title); self.close(); } @@ -262,8 +266,20 @@ function changeURL(val) { alert("The file you selected is: "+val); } } - END + if (!$titleelement) { + $catalogmodefunctions.='function changeTitle(val) {}'; + } else { + $catalogmodefunctions.=<print(&Apache::loncommon::bodytag('B 'st' => 'Statistics', 'au' => 'Author', 'kw' => 'Keywords', - 'la' => 'Language', + 'ln' => 'Language', 'sr' => 'Show resource', 'av' => 'All versions', 'ud' => 'Update Display' @@ -429,7 +445,7 @@ $r->print(&Apache::loncommon::bodytag('B $lt{'au'} $lt{'kw'} - $lt{'la'} + $lt{'ln'} $lt{'sr'} $lt{'av'}   @@ -668,7 +684,7 @@ sub match_ext { push @trimlist,$line; } } - @trimlist = sort (@trimlist); + @trimlist = sort {uc($a) cmp uc($b)} (@trimlist); return @trimlist; }