From 524e97480724069555adb9065347b1c35f58bec9 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 4 Oct 2010 16:07:47 -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. --- acqui/z3950_search.pl | 9 ++++- cataloguing/z3950_search.pl | 11 ++++- .../prog/en/modules/acqui/z3950_search.tmpl | 42 ++++++++++++++++---- .../prog/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 0215873..182e121 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 9b6c8f1..6311c0b 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 f9f96ae..2219dfa 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 55859c7..f0b11f8 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); - } }); }); -- 1.7.0.4