From 080ae7a8b9587aaa31b0adfb8925981dc574aa65 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 21 Apr 2016 12:39:53 -0400 Subject: [PATCH] Bug 16321 - 'Show all details' checkbox triggers JS error after jQuery upgrade This patch fixes problems with show/hide actions on a few pages caused by some problematic jQuery syntax. To test, apply the patch and go to Acquisitions. Testing basket.tt: - Locate a vendor which has an open basket with multiple orders. - View the details of that basket. - Click the 'Show all details' checkbox above the table of orders. - Checking the box should trigger the display of additional columns in the table. - Unchecking the box should hide them again. Testing invoice.tt: - Go to Acquisitions -> Invoices and perform an invoice search. - Click to view an invoice which includes one or more received records. - Click the 'Show all details' checkbox above the table of titles and confirm that it fuctions as described above. Testing newordersubscription.tt: - Go to Acquisitions and locate a vendor which is linked to a subscription - Create or add to a basket for that vendor. - Add an order using the 'From a subscription' option. - Perform a search for subscriptions. - In the table of subscriptions search results, checking or unchecking the "Show only renewed" checkbox should work correctly. Signed-off-by: Chris Cormack Signed-off-by: Jonathan Druart Signed-off-by: Brendan Gallagher --- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt | 2 +- .../intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt index 5aec704c87..6fe023d997 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -23,7 +23,7 @@ $(document).ready(function() { $("#show_all_details").click(function(){ - updateColumnsVisibility($(this+":checked").val()); + updateColumnsVisibility($(this).is(":checked")); }); $("#show_all_details").attr('checked', false); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt index 59e20f904b..0708745043 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt @@ -41,7 +41,7 @@ })); [% END %] $("#show_all_details").click(function(){ - updateColumnsVisibility($(this+":checked").val()); + updateColumnsVisibility( $(this).is(":checked") ); }); $("#show_all_details").attr('checked', false); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt index d6e65a0fb9..77bef275b9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt @@ -27,7 +27,7 @@ } ) ) $("#show_only_renewed").click(function(){ - updateRowsVisibility($(this+":checked").val()); + updateRowsVisibility( $(this).is(":checked") ); }); $("#show_only_renewed").attr('checked', false); updateRowsVisibility(false); -- 2.39.5