From 607d49166775c70eb15ded430b13588ac0ce44f3 Mon Sep 17 00:00:00 2001 From: miker Date: Thu, 23 Mar 2006 06:33:57 +0000 Subject: [PATCH] enhancing search from the html feed output git-svn-id: svn://svn.open-ils.org/ILS/trunk@3414 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm | 22 ++++++----- .../src/perlmods/OpenILS/WWW/SuperCat/Feed.pm | 10 ++--- Open-ILS/web/opac/extras/os.css | 3 +- Open-ILS/xsl/ATOM2XHTML.xsl | 39 ++++++++++++++++--- 4 files changed, 52 insertions(+), 22 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm index bad6b89a65..e393b756bc 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm +++ b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm @@ -108,7 +108,7 @@ sub unapi { for my $h (@$list) { my ($type) = keys %$h; - $body .= "$typeapplication/$type+xml"; + $body .= "$typeapplication/xml"; for my $part ( qw/namespace_uri docs schema_location/ ) { $body .= "<$part>$$h{$type}{$part}" @@ -144,7 +144,7 @@ sub unapi { for my $h (@$list) { my ($type) = keys %$h; - print "$typeapplication/x-$type+xml"; + print "$typeapplication/xml"; for my $part ( qw/namespace_uri docs schema_location/ ) { print "<$part>$$h{$type}{$part}" @@ -212,7 +212,7 @@ sub supercat { for my $h (@$list) { my ($type) = keys %$h; - print "$typeapplication/$type+xml"; + print "$typeapplication/xml"; for my $part ( qw/namespace_uri docs schema_location/ ) { print "<$part>$$h{$type}{$part}" @@ -248,7 +248,7 @@ sub supercat { for my $h (@$list) { my ($type) = keys %$h; - print "$typeapplication/$type+xml"; + print "$typeapplication/xml"; for my $part ( qw/namespace_uri docs schema_location/ ) { print "<$part>$$h{$type}{$part}" @@ -475,8 +475,10 @@ sub opensearch_feed { $type = 'atom'; } + $class = 'keyword' if ($class eq '-'); $terms =~ s/\+/ /go; + $terms =~ s/'//go; #warn "searching for $class -> [$terms] via OS $version, response type $type"; @@ -554,12 +556,12 @@ sub opensearch_feed { $feed->link( unapi => $unapi); - $feed->link( - alternate => - $root . "../$lang/skin/default/xml/rresult.xml?rt=list&" . - join('&', map { 'rl=' . $_->[0] } @{$recs->{ids}} ), - 'text/html' - ); +# $feed->link( +# alternate => +# $root . "../$lang/skin/default/xml/rresult.xml?rt=list&" . +# join('&', map { 'rl=' . $_->[0] } @{$recs->{ids}} ), +# 'text/html' +# ); $feed->link( opac => diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm index 043b4757f0..936a04e1c0 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm +++ b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm @@ -406,7 +406,7 @@ use base 'OpenILS::WWW::SuperCat::Feed::atom'; sub new { my $class = shift; my $self = $class->SUPER::new; - $self->{type} = 'text/html'; + $self->type('text/html'); return $self; } @@ -414,9 +414,9 @@ our ($_parser, $_xslt, $xslt_file); sub toString { my $self = shift; - my $base = $self->base; - my $root = $self->root; - my $search = $self->search; + my $base = $self->base || ''; + my $root = $self->root || ''; + my $search = $self->search || ''; my $lib = $self->lib || '-'; $self->composeDoc; @@ -440,7 +440,7 @@ sub toString { searchTerms => "'$search'", ); - return $new_doc->toString(1); + return $new_doc->toStringHTML(); } diff --git a/Open-ILS/web/opac/extras/os.css b/Open-ILS/web/opac/extras/os.css index f03ee5a7ec..8771e081e6 100644 --- a/Open-ILS/web/opac/extras/os.css +++ b/Open-ILS/web/opac/extras/os.css @@ -18,11 +18,12 @@ input.searchbox { div#searchdiv { z-index:10; - position:absolute; + position:fixed; top: 100; right: 0; background-color: lightgray; border:2px solid lightblue; + border-right: 0px; filter: alpha(opacity=50); -moz-opacity: .5; } diff --git a/Open-ILS/xsl/ATOM2XHTML.xsl b/Open-ILS/xsl/ATOM2XHTML.xsl index 5a928d9e14..3364e0a379 100644 --- a/Open-ILS/xsl/ATOM2XHTML.xsl +++ b/Open-ILS/xsl/ATOM2XHTML.xsl @@ -181,23 +181,43 @@ To-do list: Search:
- +
- +
- +
- +
- +

@@ -461,7 +481,14 @@ To-do list: - + + + + + + + + ; -- 2.43.2