Bug 26213: Remove the use of jquery.checkboxes plugin when adding orders from MARC file

This patch removes the use of the jquery.checkboxes plugin from the page
for adding orders to a basket from a staged MARC file.

This patch fixes an unreported bug wherein the "select all" and "clear
all" controls affected not only MARC record checkboxes but also the
"show inactive funds" checkboxes.

To test, apply the patch and go to Acquisitions.

- Go to Vendor -> Add to basket -> From a staged file.
- Select a staged file with multiple records.
- Test the "Select all" and "Clear all" links at the top of the "Select
  to import" tab. They should work correctly to select and deselect
  checkboxes corresponding to staged MARC records.

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>
(cherry picked from commit 8344ee7b4c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f681964591)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
This commit is contained in:
Owen Leonard 2020-08-14 14:18:00 +00:00 committed by Aleisha Amohia
parent edb729421f
commit 760faa0a7a
2 changed files with 6 additions and 9 deletions

View File

@ -15,7 +15,6 @@
[%# As long as cataloging plugins rely on <script> tags added inline, JS must be in the header %]
[% Asset.js("js/acquisitions-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
[% Asset.js("js/acq.js") | $raw %]
[% Asset.js("js/funds_sorts.js") | $raw %]
[% Asset.js("js/addorderiso2709.js") | $raw %]

View File

@ -37,15 +37,13 @@ $(document).ready(function() {
$("div.biblio.unselected select").prop('disabled', false);
$("div.biblio.unselected input").prop('disabled', false);
$("#checkAll").click(function(){
$("#Aform").checkCheckboxes();
$("input:checkbox[name='import_record_id']").change();
return false;
$("#checkAll").click(function(e){
e.preventDefault();
$("input:checkbox[name='import_record_id']").prop("checked", true).change();
});
$("#unCheckAll").click(function(){
$("#Aform").unCheckCheckboxes();
$("input:checkbox[name='import_record_id']").change();
return false;
$("#unCheckAll").click(function(e){
e.preventDefault();
$("input:checkbox[name='import_record_id']").prop("checked", false).change();
});
$("input#add_order").on("click", function(e){