Bugzilla – Attachment 108422 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
Bug-26159-Remove-the-use-of-jquerycheckboxes-plugi.patch (text/plain), 4.76 KB, created by
Katrin Fischer
on 2020-08-17 22:00:29 UTC
(
hide
)
Description:
Bug 26159: Remove the use of jquery.checkboxes plugin from batch record delete page
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-08-17 22:00:29 UTC
Size:
4.76 KB
patch
obsolete
>From b1d86f497d44230876c94f18f2845c5305365056 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> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../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 4e1beada06..8889b158e2 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.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 26159
:
108173
|
108408
| 108422