Bug 26202: Remove the use of jquery.checkboxes plugin from batch record modification...
authorOwen Leonard <oleonard@myacpl.org>
Thu, 13 Aug 2020 13:19:19 +0000 (13:19 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 18 Aug 2020 13:45:49 +0000 (15:45 +0200)
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>

koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt

index 66de6f4..19aab27 100644 (file)
 [% 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>
                     $("#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, {