Bug 26202: Remove the use of jquery.checkboxes plugin from batch record modification page

This patch removes the use of the jquery.checkboxes plugin from the
batch record modification page.

To test, apply the patch and go to Tools -> Batch record modification

 - Submit a batch of biblionumbers for modification.
 - On the results page, test the "Select all" and "Clear all" links to
   confirm that they work correctly.

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Owen Leonard 2020-08-13 13:19:19 +00:00 committed by Jonathan Druart
parent 2de2b1330f
commit 9371685b97

View file

@ -302,7 +302,6 @@
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/tools-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
[% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %]
[% Asset.js("js/background-job-progressbar.js") | $raw %]
<script>
@ -317,14 +316,21 @@
$("#show_list_option").show();
}
});
$("#selectall").click(function(e) {
$("#selectall").click(function(e){
e.preventDefault();
$(".records").checkCheckboxes();
$(".records input[type='checkbox']").each(function(){
$(this).prop("checked", true);
});
});
$("#clearall").click(function(e) {
$("#clearall").click(function(e){
e.preventDefault();
$(".records").unCheckCheckboxes();
$(".records input[type='checkbox']").each(function(){
$(this).prop("checked", false);
});
});
$("#selectall").click();
$("table#biblios").dataTable($.extend(true, {}, dataTablesDefaults, {