From 2b5000c7d47b59fdc1d228ff13e80ee52013dfa4 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 19 Nov 2012 17:11:21 +0100 Subject: [PATCH] Bug 8986: Followup FIX a JS error if there is no valid card number Signed-off-by: Owen Leonard I can't reproduce the JS error but the template changes are correct with regard to how the page should handle errors. Signed-off-by: Jared Camins-Esakov --- .../prog/en/modules/tools/modborrowers.tt | 34 +++++++++++-------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt index 377a87dc3e..62d2eb3449 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt @@ -9,24 +9,26 @@ var patron_attributes_lib = new Array(); var patron_attributes_values = new Array(); $(document).ready(function() { - $("#borrowerst").tablesorter({ - [% IF ( op == 'show' ) %]headers: { 0: { sorter: false}},[% END %] - widgets : ['zebra'], - sortList: [[1,0]] - }); + [% IF borrowers %] + $("#borrowerst").tablesorter({ + headers: { 0: { sorter: false}}, + widgets : ['zebra'], + sortList: [[1,0]] + }); - $("#selectallbutton").click(function() { - $("#borrowerst").find("input:checkbox").each(function() { - $(this).attr("checked", true); + $("#selectallbutton").click(function() { + $("#borrowerst").find("input:checkbox").each(function() { + $(this).attr("checked", true); + }); + return false; }); - return false; - }); - $("#clearallbutton").click(function() { - $("#borrowerst").find("input:checkbox").each(function() { - $(this).attr("checked", false); + $("#clearallbutton").click(function() { + $("#borrowerst").find("input:checkbox").each(function() { + $(this).attr("checked", false); + }); + return false; }); - return false; - }); + [% END %] var values = new Array(); var lib = new Array(); @@ -187,6 +189,7 @@ [% END %] [% END %] + [% IF borrowers %]
@@ -323,6 +326,7 @@ [% END %] + [% END %] [% END %] [% IF ( op == 'show_results' ) %]

-- 2.39.5