Bugzilla – Attachment 108408 Details for
Bug 26159
Remove the use of jquery.checkboxes plugin from batch record delete page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26159: Remove the use of jquery.checkboxes plugin from batch record delete page
0001-Bug-26159-Remove-the-use-of-jquery.checkboxes-plugin.patch (text/plain), 4.70 KB, created by
Amit Gupta
on 2020-08-17 15:54:50 UTC
(
hide
)
Description:
Bug 26159: Remove the use of jquery.checkboxes plugin from batch record delete page
Filename:
MIME Type:
Creator:
Amit Gupta
Created:
2020-08-17 15:54:50 UTC
Size:
4.70 KB
patch
obsolete
>From 479d13a6b0ea372b6c5bd09ca061f6068dd68713 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 6 Aug 2020 11:42:33 +0000 >Subject: [PATCH] Bug 26159: Remove the use of jquery.checkboxes plugin from > batch record delete page > >This patch removes the use of the jquery.checkboxes plugin from the >batch delete records page. > >To test, apply the patch and go to Tools -> Batch record deletion. > > - Submit a batch of biblionumbers which includes one or more > checked-out items, one or more on-hold items, and one or more records > with no items. > - On the confirmation page, test the selection links at the top of the > results table. Each one should work correctly. > - Submit a batch of authority record ids which includes some records > which are in use and some which aren't. > - On the confirmation page, test the selection links at the top of the > results table. Each one should work correctly. > >Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> >--- > .../prog/en/modules/tools/batch_delete_records.tt | 67 +++++++++++++++------- > 1 file changed, 46 insertions(+), 21 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt >index 4e1bead..8889b15 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt >@@ -224,7 +224,6 @@ > [% MACRO jsinclude BLOCK %] > [% Asset.js("js/tools-menu.js") | $raw %] > [% INCLUDE 'datatables.inc' %] >- [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] > <script> > var MSG_CANNOT_BE_DELETED = _("This record cannot be deleted, at least one item is currently checked out."); > $(document).ready(function() { >@@ -238,27 +237,53 @@ > $("#show_list_option").show(); > } > }); >- $("#selectall").click(function(e){ >- e.preventDefault(); >- $(".records").checkCheckboxes(":input[type='checkbox']:not(:disabled)"); >- }); >- $("#clearall").click(function(e){ >- e.preventDefault(); >- $(".records").unCheckCheckboxes(":input[type='checkbox']:not(:disabled)"); >- }); >- $("#selectwithoutitems").click(function(e){ >- e.preventDefault(); >- $("#biblios").checkCheckboxes(":input[data-items='0']:not(:disabled)"); >- }); >- $("#selectnotreserved").click(function(e){ >- e.preventDefault(); >- $("#biblios").checkCheckboxes(":input[data-reserves='0']:not(:disabled)"); >+ $("#selectall").click(function(e){ >+ e.preventDefault(); >+ $(".records input[type='checkbox']:not(:disabled)").each(function(){ >+ $(this).prop("checked", true); >+ }); >+ }); >+ >+ $("#clearall").click(function(e){ >+ e.preventDefault(); >+ $(".records input[type='checkbox']:not(:disabled)").each(function(){ >+ $(this).prop("checked", false); >+ }); >+ }); >+ >+ $("#selectwithoutitems").click(function(e){ >+ e.preventDefault(); >+ $(".records input[type='checkbox']:not(:disabled)").each(function(){ >+ if( $(this).data("items") == 0 ){ >+ $(this).prop("checked", true ); >+ } else { >+ $(this).prop("checked", false ); >+ } >+ }); >+ }); >+ >+ $("#selectnotreserved").click(function(e){ >+ e.preventDefault(); >+ $(".records input[type='checkbox']:not(:disabled)").each(function(){ >+ if( $(this).data("reserves") == 0 ){ >+ $(this).prop("checked", true ); >+ } else { >+ $(this).prop("checked", false ); >+ } >+ }); >+ }); >+ >+ $("#clearlinkedtobiblio").click(function(e){ >+ e.preventDefault(); >+ $(".records input[type='checkbox']:not(:disabled)").each(function(){ >+ if( $(this).data("usage") == 0 ){ >+ $(this).prop("checked", true ); >+ } else { >+ $(this).prop("checked", false ); >+ } >+ }); >+ }); > >- }); >- $("#clearlinkedtobiblio").click(function(e){ >- e.preventDefault(); >- $("#authorities").unCheckCheckboxes(":not(input[data-usage='0'])"); >- }); > $("#selectall").click(); > > [% IF recordtype == 'biblio' %] >-- >2.7.4 >
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 26159
:
108173
|
108408
|
108422