[LON-CAPA-cvs] cvs: loncom /interface lonsearchcat.pm
matthew
lon-capa-cvs@mail.lon-capa.org
Wed, 03 Jul 2002 20:10:14 -0000
matthew Wed Jul 3 16:10:14 2002 EDT
Modified files:
/loncom/interface lonsearchcat.pm
Log:
Minor aesthetic cleanups.
Fixed a 'bug' where selecting the category of files would result in values
being set for mime type (aka file extension).
Index: loncom/interface/lonsearchcat.pm
diff -u loncom/interface/lonsearchcat.pm:1.134 loncom/interface/lonsearchcat.pm:1.135
--- loncom/interface/lonsearchcat.pm:1.134 Wed Jul 3 15:11:09 2002
+++ loncom/interface/lonsearchcat.pm Wed Jul 3 16:10:14 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Search Catalog
#
-# $Id: lonsearchcat.pm,v 1.134 2002/07/03 19:11:09 matthew Exp $
+# $Id: lonsearchcat.pm,v 1.135 2002/07/03 20:10:14 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -375,22 +375,13 @@
<!-- end of view selection -->
</td></tr>
ENDHEADER
- $scrout.=&searchphrasefield('title','title',
- $ENV{'form.title'});
- $scrout.=&searchphrasefield('author','author',
- $ENV{'form.author'});
- $scrout.=&searchphrasefield('subject','subject',
- $ENV{'form.subject'});
- $scrout.=&searchphrasefield('keywords','keywords',
- $ENV{'form.keywords'});
- $scrout.=&searchphrasefield('URL','url',
- $ENV{'form.url'});
-# $scrout.=&searchphrasefield('Limit by version','version',
-# $ENV{'form.version'});
- $scrout.=&searchphrasefield('notes','notes',
- $ENV{'form.notes'});
- $scrout.=&searchphrasefield('abstract','abstract',
- $ENV{'form.abstract'});
+ $scrout.=&searchphrasefield('title', 'title' ,$ENV{'form.title'});
+ $scrout.=&searchphrasefield('author', 'author' ,$ENV{'form.author'});
+ $scrout.=&searchphrasefield('subject', 'subject' ,$ENV{'form.subject'});
+ $scrout.=&searchphrasefield('keywords','keywords',$ENV{'form.keywords'});
+ $scrout.=&searchphrasefield('URL', 'url' ,$ENV{'form.url'});
+ $scrout.=&searchphrasefield('notes', 'notes' ,$ENV{'form.notes'});
+ $scrout.=&searchphrasefield('abstract','abstract',$ENV{'form.abstract'});
# Hack - an empty table row.
$scrout.="<tr><td> </td><td> </td></tr>\n";
$scrout.=&searchphrasefield('file<br />extension','mime',
@@ -438,8 +429,6 @@
$scrout.="</select>\n";
}
#----------------------------------------------------------------
- #
- #
$scrout.=&selectbox('Limit by language','language',
$ENV{'form.language'},'any','Any Language',
\&{Apache::loncommon::languagedescription},
@@ -803,6 +792,10 @@
push @queries,&build_SQL_query($field,$ENV{'form.'.$field});
}
}
+ # I dislike the hack below.
+ if ($ENV{'form.category'}) {
+ $ENV{'form.mime'}='';
+ }
# Evaluate option lists
if ($ENV{'form.language'} and $ENV{'form.language'} ne 'any') {
push @queries,"(language like \"$ENV{'form.language'}\")";
@@ -1301,8 +1294,10 @@
unless ($resultflag) {
$r->print("\nThere were no results that matched your query\n");
}
-# $r->print('<script type="text/javascript">'.'popwin.close()</script>'."\n"); $r->rflush();
+ $r->print('<script type="text/javascript">'.'popwin.close()</script>'.
+ "\n");
$r->print("</body>\n</html>\n");
+ $r->rflush();
return;
}
@@ -1600,16 +1595,13 @@
# rows of 10 each. No longer used to index images.
my $sn=1;
foreach my $sk (sort keys %rhash) {
- # '<a href="
$grid.="'<a href=\"";
- # javascript:displayinfo('+
$grid.="javascript:opener.displayinfo('+";
- # "'"+'key
$grid.="\"'\"+'";
$grid.=$sk;
my $hc;
if ($rhash{$sk} eq 'con_lost') {
- $hc="BAD CONNECTION, CONTACT SYSTEM ADMINISTRATOR ";
+ $hc="BAD CONNECTION ";
}
else {
$hc="'+\"'\"+\"+hc['$sk']+\"+\"'\"+'";