[Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 5254 - no need to scroll left to right on acq z search
Nicole Engard
nengard at gmail.com
Thu Oct 7 18:20:50 CEST 2010
sorry - did it again - i forgot the actual sign off - new patch coming
On Wed, Oct 6, 2010 at 12:12 PM, Nicole Engard
<nengard at bywatersolutions.com> wrote:
> From: Owen Leonard <oleonard at myacpl.org>
>
> - 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");
> + });
> });
> //]]>
> </script>
> - <style type="text/css">
> - #custom-doc { width:54.92em;*width:53.55em;min-width:720px; margin:auto; text-align:left; }
> - </style>
> +<style type="text/css">
> +.linktools { background-color:#FFF;border-top:1px solid #DDD; border-left: 1px solid #DDD; border-right: 1px solid #666; border-bottom:1px solid #666;display: none; white-space: nowrap;}
> +.linktools a { font-size : 85%; text-decoration:none; padding:.3em;;background-color:#FFF; display:block;float:left;border-right:1px solid #DDD;}
> +.linktools a:hover { background-color:#EEE;color:#CC3300;border-right:1px solid #CCC;}
> +tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : transparent !important; }
> +</style>
> </head>
> <body>
> <!-- TMPL_INCLUDE NAME="header.inc" -->
> <!-- TMPL_INCLUDE NAME="acquisitions-search.inc" -->
>
> <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › Order from Z39.50 search</div>
> -<div id="custom-doc" class="yui-t7">
> +<div id="doc3" class="yui-t7">
> <div id="bd">
> <!-- TMPL_IF name="opsearch" -->
> <h2>Z39.50 Search Points</h2>
> @@ -114,13 +140,13 @@ $.tablesorter.addParser({
> <!-- TMPL_IF NAME="breedingid" -->
>
> <!-- TMPL_IF NAME="toggle" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
> - <td><!-- TMPL_VAR name="server" --></td>
> + <td><!-- TMPL_VAR name="server" --> <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=<!-- TMPL_VAR NAME="breedingid" -->" rel="gb_page_center[600,500]">Preview MARC</a> <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=<!-- TMPL_VAR NAME="breedingid" -->" rel="gb_page_center[600,500]">Preview Card</a> <a href="/cgi-bin/koha/acqui/neworderempty.pl?frameworkcode=<!-- TMPL_VAR name="frameworkcode" -->&breedingid=<!-- TMPL_VAR NAME="breedingid" -->&booksellerid=<!-- TMPL_VAR name="booksellerid" -->&basketno=<!-- TMPL_VAR name="basketno" -->">Order</a> <a href="#" id="closemenu" title="Close this menu"> X </a></div></td>
> <td><!-- TMPL_VAR NAME="title" ESCAPE="html" --></td>
> <td><!-- TMPL_VAR NAME="author" --></td>
> <td><!-- TMPL_VAR NAME="isbn" --></td>
> <td><!-- TMPL_VAR NAME="lccn" --></td>
> - <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=<!-- TMPL_VAR NAME="breedingid" -->" title="MARC" rel="gb_page_center[600,500]">MARC</a></td><td><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=<!-- TMPL_VAR NAME="breedingid" -->" title="MARC" rel="gb_page_center[600,500]">Card</a></td>
> - <td><a href="/cgi-bin/koha/acqui/neworderempty.pl?frameworkcode=<!-- TMPL_VAR name="frameworkcode" -->&breedingid=<!-- TMPL_VAR NAME="breedingid" -->&booksellerid=<!-- TMPL_VAR name="booksellerid" -->&basketno=<!-- TMPL_VAR name="basketno" -->">Order</a></td>
> + <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=<!-- TMPL_VAR NAME="breedingid" -->" title="MARC" rel="gb_page_center[600,500]">MARC</a></td><td><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=<!-- TMPL_VAR NAME="breedingid" -->" title="MARC" rel="gb_page_center[600,500]">Card</a></td>
> + <td><a href="/cgi-bin/koha/acqui/neworderempty.pl?frameworkcode=<!-- TMPL_VAR name="frameworkcode" -->&breedingid=<!-- TMPL_VAR NAME="breedingid" -->&booksellerid=<!-- TMPL_VAR name="booksellerid" -->&basketno=<!-- TMPL_VAR name="basketno" -->">Order</a></td>
>
> </tr>
> <!-- /TMPL_IF -->
> 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.5.6.5
>
> _______________________________________________
> Koha-patches mailing list
> Koha-patches at lists.koha-community.org
> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
>
More information about the Koha-patches
mailing list