Bug 26204: Remove the use of jquery.checkboxes plugin from staff interface lists
authorOwen Leonard <oleonard@myacpl.org>
Thu, 13 Aug 2020 13:54:54 +0000 (13:54 +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
staff interface lists page.

To test, apply the patch, go to Lists, and view the contents of a
list with multiple titles on it.

Check that the "Select all" and "Clear all" links 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/virtualshelves/shelves.tt

index 5beada8..fddb934 100644 (file)
                 });
                 $("span.clearall").html("<a id=\"CheckNone\" href=\"/cgi-bin/koha/shelves.pl\"><i class=\"fa fa-remove\"></i>"+_(" Clear all")+"<\/a>");
                 $("span.checkall").html("<a id=\"CheckAll\" href=\"/cgi-bin/koha/shelves.pl\"><i class=\"fa fa-check\"></i>"+_(" Select all")+"<\/a>");
-                $("#CheckAll").click(function(){
-                    $(".checkboxed").checkCheckboxes();
-                    return false;
+                $("#CheckAll").click(function(e){
+                    e.preventDefault();
+                    $(".selection").each(function(){
+                        $(this).prop("checked", true);
+                    });
                 });
-                $("#CheckNone").click(function(){
-                    $(".checkboxed").unCheckCheckboxes();
-                    return false;
+
+                $("#CheckNone").click(function(e){
+                    e.preventDefault();
+                    $(".selection").each(function(){
+                        $(this).prop("checked", false);
+                    });
                 });
                 $(".placehold").on("click",function(e){
                     placeHold();