Bugzilla – Attachment 107648 Details for
Bug 26008
Remove the use of jquery.checkboxes plugin from OPAC cart
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26008: Remove the use of jquery.checkboxes plugin from OPAC cart
Bug-26008-Remove-the-use-of-jquerycheckboxes-plugi.patch (text/plain), 3.68 KB, created by
ByWater Sandboxes
on 2020-07-31 15:12:09 UTC
(
hide
)
Description:
Bug 26008: Remove the use of jquery.checkboxes plugin from OPAC cart
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2020-07-31 15:12:09 UTC
Size:
3.68 KB
patch
obsolete
>From 512663db9af9ccba399d46024203d053986b26d1 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 17 Jul 2020 14:43:39 +0000 >Subject: [PATCH] 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> >--- > .../opac-tmpl/bootstrap/en/modules/opac-basket.tt | 33 +++++++++------------- > 1 file changed, 14 insertions(+), 19 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >index d85427b60a..d7563ff176 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >@@ -324,7 +324,6 @@ > [% INCLUDE 'opac-bottom.inc' %] > > [% BLOCK jsinclude %] >- [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] > [% Asset.js("lib/hc-sticky.js") | $raw %] > [% INCLUDE 'datatables.inc' %] > <script> >@@ -430,26 +429,22 @@ > tagCanceled(); > }); > >- $("#CheckAll").click(function(){ >- var checked = []; >- $(".checkboxed").checkCheckboxes("*", true).each( >- function() { >- selRecord(this.value,true); >- } >- ); >+ $("#CheckAll").click(function(e){ >+ e.preventDefault(); >+ $(".cb").each(function(){ >+ $(this).prop("checked", true); >+ selRecord(this.value, true); >+ }); > enableCheckboxActions(); >- return false; > }); > >- $("#CheckNone").click(function(){ >- var checked = []; >- $(".checkboxed").unCheckCheckboxes("*",true).each( >- function() { >- selRecord(this.value,false); >- } >- ); >+ $("#CheckNone").click(function(e){ >+ e.preventDefault(); >+ $(".cb").each(function(){ >+ $(this).prop("checked", false); >+ selRecord(this.value, false); >+ }); > enableCheckboxActions(); >- return false; > }); > > if( $("#itemst").length > 0 ){ >@@ -490,8 +485,8 @@ > > function enableCheckboxActions(){ > // Enable/disable controls if checkboxes are checked >- var checkedBoxes = $(".checkboxed input:checkbox:checked"); >- if ($(checkedBoxes).size()) { >+ var checkedBoxes = $(".cb:checked"); >+ if ( checkedBoxes.length ) { > $("#selections").html(_("With selected titles: ")); > $("#selections-toolbar .links a").removeClass("disabled"); > } else { >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26008
:
107024
|
107648
|
108020
|
108154