From f987d35a2241a6178406a3d92ccbf9277087f2d1 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 6 Oct 2010 12:13:02 -0400 Subject: [PATCH] Fix for Bug 5254 - no need to scroll left to right on acq z search - Adding inline preview/import menu to match cataloging z39.50 search - Improving behavior of inline menu on both pages - Adding white space to ISBN/ISSN output on both pages to allow line breaks, improving table width and horizontal scrolling. Signed-off-by: Nicole Engard Signed-off-by: Galen Charlton --- acqui/z3950_search.pl | 9 +++- cataloguing/z3950_search.pl | 11 ++++- .../prog/en/modules/acqui/z3950_search.tmpl | 42 +++++++++++++++---- .../en/modules/cataloguing/z3950_search.tmpl | 17 ++++---- 4 files changed, 60 insertions(+), 19 deletions(-) diff --git a/acqui/z3950_search.pl b/acqui/z3950_search.pl index 0215873c1e..182e12158e 100755 --- a/acqui/z3950_search.pl +++ b/acqui/z3950_search.pl @@ -254,7 +254,14 @@ sub displayresults { ##Add necessary encoding changes to here -TG my $oldbiblio = TransformMarcToKoha( $dbh, $marcrecord, "" ); $oldbiblio->{isbn} =~ s/ |-|\.//g if $oldbiblio->{isbn}; - $oldbiblio->{issn} =~ s/ |-|\.//g if $oldbiblio->{issn}; + # pad | and ( with spaces to allow line breaks in the HTML + $oldbiblio->{isbn} =~ s/\|/ \| /g if $oldbiblio->{isbn}; + $oldbiblio->{isbn} =~ s/\(/ \(/g if $oldbiblio->{isbn}; + + $oldbiblio->{issn} =~ s/ |-|\.//g if $oldbiblio->{issn}; + # pad | and ( with spaces to allow line breaks in the HTML + $oldbiblio->{issn} =~ s/\|/ \| /g if $oldbiblio->{issn}; + $oldbiblio->{issn} =~ s/\(/ \(/g if $oldbiblio->{issn}; my ( $notmarcrecord, $alreadyindb, $alreadyinfarm, $imported, $breedingid diff --git a/cataloguing/z3950_search.pl b/cataloguing/z3950_search.pl index 9b6c8f1d19..6311c0b332 100755 --- a/cataloguing/z3950_search.pl +++ b/cataloguing/z3950_search.pl @@ -237,8 +237,15 @@ warn "query ".$query if $DEBUG; # In rel2_2 i am not sure what encoding is so no character conversion is done here ##Add necessary encoding changes to here -TG my $oldbiblio = TransformMarcToKoha( $dbh, $marcrecord, "" ); - $oldbiblio->{isbn} =~ s/ |-|\.//g, - $oldbiblio->{issn} =~ s/ |-|\.//g, + $oldbiblio->{isbn} =~ s/ |-|\.//g if $oldbiblio->{isbn}; + # pad | and ( with spaces to allow line breaks in the HTML + $oldbiblio->{isbn} =~ s/\|/ \| /g if $oldbiblio->{isbn}; + $oldbiblio->{isbn} =~ s/\(/ \(/g if $oldbiblio->{isbn}; + + $oldbiblio->{issn} =~ s/ |-|\.//g if $oldbiblio->{issn}; + # pad | and ( with spaces to allow line breaks in the HTML + $oldbiblio->{issn} =~ s/\|/ \| /g if $oldbiblio->{issn}; + $oldbiblio->{issn} =~ s/\(/ \(/g if $oldbiblio->{issn}; my ( $notmarcrecord, $alreadyindb, $alreadyinfarm, $imported, $breedingid diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl index f9f96ae1e3..2219dfa7ba 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl @@ -14,6 +14,7 @@ $.tablesorter.addParser({ }); $(document).ready(function(){ + $.tablesorter.defaults.widgets = ['zebra']; $("#CheckAll").click(function(){ $(".checkboxed").checkCheckboxes(); return false; @@ -22,23 +23,48 @@ $.tablesorter.addParser({ $(".checkboxed").unCheckCheckboxes(); return false; }); + + $("#closemenu").click(function(e){ + $(".linktools").hide(); + $("tr").removeClass("selected"); + }); + $("#resultst").tablesorter({ sortList: [[1,0]], - headers: { 0: {sorter:false}, 1: { sorter: 'articles' },5: { sorter: false },6: { sorter: false }} + headers: { 1: { sorter: 'articles' },5: { sorter: false },6: { sorter: false }} }); + /* Inline edit/delete links */ + $("td").click(function(event){ + var $tgt = $(event.target); + $(".linktools").hide(); + $("tr").removeClass("selected"); + if($tgt.is("a")||$tgt.is(":nth-child(5)")||$tgt.is(":nth-child(6)")||$tgt.is(":nth-child(7)")||$tgt.is(":nth-child(8)")){ + return true; + } else { + var position = $(this).offset(); + var top = position.top+5; + var left = position.left+5; + $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left); + } + var row = $(this).parent(); + row.addClass("selected"); + }); }); //]]> - + -
+

Z39.50 Search Points

@@ -114,13 +140,13 @@ $.tablesorter.addParser({ - + - " title="MARC" rel="gb_page_center[600,500]">MARC" title="MARC" rel="gb_page_center[600,500]">Card - &breedingid=&booksellerid=&basketno=">Order + " title="MARC" rel="gb_page_center[600,500]">MARC" title="MARC" rel="gb_page_center[600,500]">Card + &breedingid=&booksellerid=&basketno=">Order diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl index 55859c7387..f0b11f85fc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl @@ -38,18 +38,19 @@ $(document).ready(function(){ }); /* Inline edit/delete links */ $("td").click(function(event){ + var $tgt = $(event.target); $(".linktools").hide(); $("tr").removeClass("selected"); + if($tgt.is("a")||$tgt.is(":nth-child(7)")||$tgt.is(":nth-child(8)")||$tgt.is(":nth-child(9)")||$tgt.is(":nth-child(10)")){ + return true; + } else { + var position = $(this).offset(); + var top = position.top+5; + var left = position.left+5; + $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left); + } var row = $(this).parent(); row.addClass("selected"); - - var $tgt = $(event.target); - if($tgt.is("a")||$tgt.is(":nth-child(7)")||$tgt.is(":nth-child(8)")||$tgt.is(":nth-child(9)")||$tgt.is(":nth-child(10)")){ return true; } else { - var position = $(this).offset(); - var top = position.top+5; - var left = position.left+5; - $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left); - } }); }); -- 2.39.5