From ef089661ffea4184b4a38efea0e5f1133625946d Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 1 Oct 2021 12:25:20 +0100 Subject: [PATCH] Bug 15812: (follow-up) Enable click cell to select This patch adds handling to allow clicking anywhere in the table cell to select/deselect the patron Signed-off-by: Owen Leonard Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart --- koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt | 7 +++++++ .../prog/en/modules/members/tables/members_results.tt | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt index e20bd380c0..6195367695 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt @@ -556,6 +556,13 @@ return false; } + $('#memberresultst tbody').on('click','td',function(e){ + var $checkbox = $(this).find("input[type=checkbox]"); + if (e.target.type != "checkbox") { + $checkbox.prop('checked', !$checkbox.prop("checked")); + } + }); + // User has clicked on the Clear button function clearFilters(redraw) { $("#searchform select").val(''); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt index eeb0da6742..5e219d2c9f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt @@ -13,7 +13,7 @@ { [% IF CAN_user_borrowers_edit_borrowers || CAN_user_tools_manage_patron_lists %] "dt_borrowernumber": - "", + "", [% END %] "dt_cardnumber": "[% IF ( CAN_user_circulate_circulate_remaining_permissions ) %][% data.cardnumber | html | $To %][% ELSE %][% data.cardnumber | html | $To %][% END %]", -- 2.39.5