Bug 26008

Summary: Remove the use of jquery.checkboxes plugin from OPAC cart
Product: Koha Reporter: Owen Leonard <oleonard>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: aleisha, jonathan.druart, lucas, sally.healey, testopia
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.03
Circulation function:
Bug Depends on: 26005    
Bug Blocks: 26006    
Attachments: Bug 26008: Remove the use of jquery.checkboxes plugin from OPAC cart
Bug 26008: Remove the use of jquery.checkboxes plugin from OPAC cart
Bug 26008: Remove the use of jquery.checkboxes plugin from OPAC cart
(follow-up) Removed checkboxed class

Description Owen Leonard 2020-07-17 14:35:04 UTC
As described in Bug 26006 the jquery.checkboxes plugin is old and unmaintained. Its use should replaced in the OPAC cart, for handling checkbox actions like "select all" and "clear all." The plugin is very old and unmaintained. We should use our own JS to replace it.
Comment 1 Owen Leonard 2020-07-17 14:54:17 UTC
Created attachment 107024 [details] [review]
Bug 26008: Remove the use of jquery.checkboxes plugin from OPAC cart

This patch removes the use of the jquery.checkboxes plugin from the OPAC
cart and replaces its functionality with "plain" jQuery.

To test, apply the patch and add some items to the Cart in the OPAC.

 - Open the Cart window in the OPAC by clicking the "Cart" link in the
   header.
 - Test that the "Select all" and "Clear all" links work correctly to
   check and uncheck all checkboxes.
   - Controls like "Remove" and "Place hold" should be enabled or
     disabled according to whether there are any checked checkboxes.
 - Test that manually checking a checkbox correctly enables or disables
   the link options too.
 - Test that the "Remove" or "Place hold" controls work correctly,
   applying to only the checked checkboxes.
Comment 2 ByWater Sandboxes 2020-07-31 15:12:09 UTC
Created attachment 107648 [details] [review]
Bug 26008: Remove the use of jquery.checkboxes plugin from OPAC cart

This patch removes the use of the jquery.checkboxes plugin from the OPAC
cart and replaces its functionality with "plain" jQuery.

To test, apply the patch and add some items to the Cart in the OPAC.

 - Open the Cart window in the OPAC by clicking the "Cart" link in the
   header.
 - Test that the "Select all" and "Clear all" links work correctly to
   check and uncheck all checkboxes.
   - Controls like "Remove" and "Place hold" should be enabled or
     disabled according to whether there are any checked checkboxes.
 - Test that manually checking a checkbox correctly enables or disables
   the link options too.
 - Test that the "Remove" or "Place hold" controls work correctly,
   applying to only the checked checkboxes.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment 3 Katrin Fischer 2020-08-10 20:52:17 UTC
Created attachment 108020 [details] [review]
Bug 26008: Remove the use of jquery.checkboxes plugin from OPAC cart

This patch removes the use of the jquery.checkboxes plugin from the OPAC
cart and replaces its functionality with "plain" jQuery.

To test, apply the patch and add some items to the Cart in the OPAC.

 - Open the Cart window in the OPAC by clicking the "Cart" link in the
   header.
 - Test that the "Select all" and "Clear all" links work correctly to
   check and uncheck all checkboxes.
   - Controls like "Remove" and "Place hold" should be enabled or
     disabled according to whether there are any checked checkboxes.
 - Test that manually checking a checkbox correctly enables or disables
   the link options too.
 - Test that the "Remove" or "Place hold" controls work correctly,
   applying to only the checked checkboxes.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Jonathan Druart 2020-08-12 10:32:39 UTC
Should not we remove the checkboxed class on the 2 forms of opac-basket.tt?
Comment 5 Owen Leonard 2020-08-12 18:27:22 UTC
Created attachment 108154 [details] [review]
(follow-up) Removed checkboxed class

Bug 26008: (follow-up) Removed checkboxed class

This patch removes the "checkboxed" class which was previously
associated with the jquery.checkboxes plugin and is now obsolete.
Comment 6 Jonathan Druart 2020-08-13 05:57:37 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 7 Lucas Gass (lukeg) 2020-08-17 15:22:14 UTC
backported to 20.05.x. for 20.05.03


I did not see the commit for the follow up in master, has that been pushed yet?
Comment 8 Jonathan Druart 2020-08-17 15:41:17 UTC
I've squashed them.
Comment 9 Aleisha Amohia 2020-08-18 02:21:37 UTC
enhancement, not backported to 19.11.x