From 7652d80c68bc3c65fcee6e48cfafab062672a815 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 9 Dec 2014 13:00:02 -0500 Subject: [PATCH] Bug 7741 [Follow-up] Clear search terms in Z3950 search page Content-Type: text/plain; charset="utf-8" This patch makes a follow-up change and takes as its basis a dependency on Bug 13218 - usability enhancement for z39.50 search. If we have a one-column search form it's possible to put the "Clear search form" link at the bottom of the form rather than in the header, logically associating it with the grouping of form fields which will be affected. Doing so also allows us to eliminate all the custom styling which was an issue for QA. Other changes made by this patch: Fixing the indentation error, correcting the case of the link text ("Clear search form" instead of "Clear Search Form"), and adding "preventDefault()" to the click handler so that clicking the link doesn't scroll the user back to the top of the page. To test, apply the previous patch and this one on top of Bug 13218. Repeat the test plan. --- .../prog/en/modules/acqui/z3950_search.tt | 6 ++++-- .../en/modules/cataloguing/z3950_auth_search.tt | 10 ++++++---- .../prog/en/modules/cataloguing/z3950_search.tt | 6 ++++-- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt index b24386f..c28ea1f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt @@ -32,7 +32,8 @@ $(".linktools").hide(); $("tr").removeClass("selected"); }); - $("#resetZ3950Search").click(function() { + $("#resetZ3950Search").click(function(e) { + e.preventDefault(); $("form[name='f']").find("input[type=text]").val(""); }); @@ -89,7 +90,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
[% IF ( opsearch ) %] -

Order from external source Clear Search Form

+

Order from external source

@@ -117,6 +118,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : +

Clear search form

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt index 5f537c2..d1b3e21 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt @@ -58,9 +58,10 @@ $(document).ready(function(){ } else return true; }); - $("#resetZ3950Search").click(function() { - $("form[name='f']").find("input[type=text]").val(""); - }); + $("#resetZ3950Search").click(function(e) { + e.preventDefault(); + $("form[name='f']").find("input[type=text]").val(""); + }); }); [% IF ( total_pages ) %] @@ -103,7 +104,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : [% END %]
[% IF ( opsearch ) %] -

Z39.50 Authority search pointsClear Search Form

+

Z39.50 Authority search points

@@ -121,6 +122,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
  • +

    Clear search form

    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt index f50d09f..03e1f89 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt @@ -59,7 +59,8 @@ $(document).ready(function(){ } else return true; }); - $("#resetZ3950Search").click(function() { + $("#resetZ3950Search").click(function(e) { + e.preventDefault(); $("form[name='f']").find("input[type=text]").val(""); }); }); @@ -104,7 +105,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : [% END %]
    [% IF ( opsearch ) %] -

    Z39.50/SRU search Clear Search Form

    +

    Z39.50/SRU search

    @@ -122,6 +123,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
  • +

    Clear search form

    -- 1.7.9.5