From 7ca10802caf132e98dd26746696c4df7aefb2274 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 --- .../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 377a87d..62d2eb3 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 @@
Select All | Clear All
[% END %] [% END %] + [% IF borrowers %]
@@ -323,6 +326,7 @@ [% END %] + [% END %] [% END %] [% IF ( op == 'show_results' ) %]

-- 1.7.10.4