Bug 26150: Remove the use of jquery.checkboxes plugin from inventory page
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tools / inventory.tt
index 18379a1..2db78af 100644 (file)
     [% Asset.js("js/tools-menu.js") | $raw %]
     [% INCLUDE 'datatables.inc' %]
     [% INCLUDE 'calendar.inc' %]
-    [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
     <script type="text/javascript">
         function checkForm() {
             if ( $('#uploadbarcodes').val() ) {
                 return false;
             });
 
-
-            $(".checkall").click(function(){
-                    $(".checkboxed").checkCheckboxes();
-                    return false;
+            var checkboxes = $("#inventoryt input:checkbox");
+            $(".checkall").click(function(e){
+                e.preventDefault();
+                checkboxes.each(function(){
+                    $(this).prop("checked", true);
                 });
-            $(".clearall").click(function(){
-                    $(".checkboxed").unCheckCheckboxes();
-                    return false;
+            });
+            $(".clearall").click(function(e){
+                e.preventDefault();
+                checkboxes.each(function(){
+                    $(this).prop("checked", false);
                 });
+            });
             $("#inventory_form").on("submit",function(){
                 return checkForm();
             });