From 3ecc2772f7851959cfc55765d298ea8c0af10d3c Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 13 Apr 2010 15:48:32 -0400 Subject: [PATCH] Fix for Bug 4302, shouldn't have to scroll left to right on z search results Adds inline pop-up menu for each row of Z39.50 search results, similar to the one recently added to the additem screen. This allows the user to click anywhere in the row to display the menu and access the preview/import links. Signed-off-by: Galen Charlton --- .../prog/en/includes/cataloging-toolbar.inc | 2 +- .../en/modules/cataloguing/z3950_search.tmpl | 46 +++++++++++++++---- 2 files changed, 38 insertions(+), 10 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cataloging-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cataloging-toolbar.inc index a555bab1a2..d834de9e7f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cataloging-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cataloging-toolbar.inc @@ -39,7 +39,7 @@ function PopupZ3950() { var strQuery = GetZ3950Terms(); if(strQuery){ - window.open("/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber="+strQuery,"z3950search",'width=740,height=450,location=yes,toolbar=no,scrollbars=yes,resize=yes'); + window.open("/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber="+strQuery,"z3950search",'width=760,height=450,location=yes,toolbar=no,scrollbars=yes,resize=yes'); } } /* provide Z3950 search points */ 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 5fbe223226..55859c7387 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 @@ -18,6 +18,10 @@ $.tablesorter.addParser({ type: 'text' }); +function closemenu(){ + $(".linktools").hide(); + $("tr").removeClass("selected"); +} $(document).ready(function(){ $("#CheckAll").click(function(){ $(".checkboxed").checkCheckboxes(); @@ -29,12 +33,35 @@ $(document).ready(function(){ }); $("#resultst").tablesorter({ sortList: [[1,0]], - headers: { 0: {sorter:false}, 1: { sorter: 'articles' },5: { sorter: false },6: { sorter: false } }, + headers: { 1: { sorter: 'articles' },7: { sorter: false },8: { sorter: false } }, widgets: ['zebra'] }); + /* Inline edit/delete links */ + $("td").click(function(event){ + $(".linktools").hide(); + $("tr").removeClass("selected"); + 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); + } + }); }); + //]]> + + @@ -42,6 +69,11 @@ $(document).ready(function(){
+ + + +
+

Z39.50 Search Points

@@ -103,13 +135,9 @@ $(document).ready(function(){ - - - - - - - + + "> + @@ -118,7 +146,7 @@ $(document).ready(function(){ " title="MARC" rel="gb_page_center[600,500]">MARC " title="MARC" rel="gb_page_center[600,500]">Card - ,)">Import + ,); return false">Import -- 2.39.5