From cd3574bdda2311d56930d18b238f5793ad759272 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Wed, 26 Aug 2026 16:41:23 +0000 Subject: [PATCH] Bug 43383: Use checkbox status of :checked when doing cartsubmit or listsubmit To test: 1. Do a catalog search that brings up multiple results 2. Check the checkbox of in the left column for the first two results 3. Click on the title of the 3rd result to take you to the details page for that item 4. Use the borwser's back button to return to the search results 5. Notice the first 2 titles are still checked. 6. Now check the 3rd result and click 'Add to list' 7. Only the 3rd title is added, even though all 3 are checked. 8. Try steps 1 - 7 again but with 'Add to cart', same behavior. 9. Try setps 1 - 7 again but with 'Place hold', all 3 items are selected. 10. APPLY PATCH, clear browser cache and run through all the steps again. This time your selction should be rememebered. Bonus points for trying in as many browsers as possible. Signed-off-by: Bastien CHAUVET Signed-off-by: Brendan Lawlor Signed-off-by: Pedro Amorim --- koha-tmpl/intranet-tmpl/prog/js/pages/results.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/results.js b/koha-tmpl/intranet-tmpl/prog/js/pages/results.js index 2e412547de..61d1c6896c 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/pages/results.js +++ b/koha-tmpl/intranet-tmpl/prog/js/pages/results.js @@ -160,13 +160,13 @@ $(document).ready(function () { $("#cartsubmit").click(function (e) { e.preventDefault(); - addMultiple(); + addMultiple($(".selection:checked")); }); $(".addtolist").on("click", function (e) { e.preventDefault(); var shelfnumber = $(this).data("shelfnumber"); - var vshelf = vShelfAdd(); + var vshelf = vShelfAdd($(".selection:checked")); if (vshelf) { if ($(this).hasClass("morelists")) { openWindow(