Bug 26806: Remove the jquery.checkboxes plugin from the staff client

This patch removes the jquery.checkboxes plugin from the staff client.

It also removes some leftover instances of the "checkboxed" class which
was used in some cases to enable the checkbox plugin on selected
elements.

To test, apply the patch and check that the jquery.checkboxes plugin no
longer exists in /intranet-tmpl/lib/jquery/plugins.

To test changes to the templates, confirm that "Check all" and "Check
none" links still work on these pages:

- The tags review page. See the test plan for Bug 26120.
- The inventory page. See the test plan for Bug 26150.
- The list contents page. See the test plan for Bug 26204.

The other modified templates contained the "checkboxed" class but it
served no purpose:

- Serials -> Serials collection
- Labels -> Edit label batch
- Patron cards -> Edit card batch

If you search the Koha codebase for instances of "checkboxed" the only
results should be from the OPAC (if Bug 26805 hasn't been applied) and
in Z39.50 templates where the class is still used by JavaScript.

Signed-off-by: David Nind <david@davidnind.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-10-23 18:45:37 +00:00 committed by Jonathan Druart
parent 93176f9e61
commit b3b87dc7d9
7 changed files with 8 additions and 21 deletions

View File

@ -1,13 +0,0 @@
/*
*
* Copyright (c) 2006-2008 Sam Collett (http://www.texotela.co.uk)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* Version 2.1
* Demo: http://www.texotela.co.uk/code/jquery/checkboxes/
*
* $LastChangedDate$
* $Rev$
*/
;(function(d){d.fn.toggleCheckboxes=function(a,b){a=a||"*";b=b||false;var c=d([]);this.each(function(){var e=d("input[type=checkbox]",this).filter(a).each(function(){this.checked=!this.checked}).filter(":checked");c=e});if(!b){c=this}return c};d.fn.checkCheckboxes=function(a,b){a=a||"*";b=b||false;var c=d([]);this.each(function(){var e=d("input[type=checkbox]",this).filter(a).each(function(){this.checked=true}).filter(":checked");c=e});if(!b){c=this}return c};d.fn.unCheckCheckboxes=function(a,b){a=a||"*";b=b||false;var c=d([]);this.each(function(){var e=d("input[type=checkbox]",this).filter(a).each(function(){this.checked=false}).filter(":not(:checked)");c=e});if(!b){c=this}return c};d.radioCheckboxGroup=function(e,a){a=a||"*";var b="input[type=checkbox]";if(e){b+="[name="+e+"]"}var c=d(b).filter(a);c.click(function(){c.not(this).each(function(){this.checked=false}).end()})}})(jQuery);

View File

@ -97,7 +97,7 @@
<a class="btn btn-default" id="exportbatch" href="#"><i class="fa fa-share-square-o"></i> Export full batch</a>[% END %]
</div>
[% IF ( table_loop ) %]
<form name="items" class="checkboxed">
<form name="items">
<h2>Items in batch number [% batch_id | html %]</h2>
<table id="batcht">
[% FOREACH table_loo IN table_loop %]

View File

@ -65,7 +65,7 @@
<a class="btn btn-default" id="exportbatch" href="#"><i class="fa fa-share-square-o"></i> Export card batch</a>[% END %]
</div>
[% IF ( table_loop ) %]
<form name="items" class="checkboxed">
<form name="items">
<h2>Patrons in batch number [% batch_id | html %]</h2>
<table id="batcht">
[% FOREACH table_loo IN table_loop %]

View File

@ -194,12 +194,12 @@
[% ELSE %]
[% IF ( delete ) %]
[% IF serialsid.grep("${serial.serialid}").size %]
<input type="checkbox" class="checkboxed" name="serialid" value="[% serial.serialid | html %]" disabled checked />
<input type="checkbox" name="serialid" value="[% serial.serialid | html %]" disabled checked />
[% ELSE %]
<input type="checkbox" class="checkboxed" name="serialid" value="[% serial.serialid | html %]" disabled />
<input type="checkbox" name="serialid" value="[% serial.serialid | html %]" disabled />
[% END %]
[% ELSE %]
<input type="checkbox" class="checkboxed" name="serialid" value="[% serial.serialid | html %]" />
<input type="checkbox" name="serialid" value="[% serial.serialid | html %]" />
[% END %]
[% END %]
[% END %]

View File

@ -28,7 +28,7 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; }
<div class="row">
<div class="col-sm-8 col-sm-push-2">
<h1>Tags</h1>
<form method="post" action="/cgi-bin/koha/tags/review.pl" class="checkboxed">
<form method="post" action="/cgi-bin/koha/tags/review.pl">
<h4>Displaying
[% IF ( filter_approved_all ) %]all[% END %]
[% IF ( filter_approved_ok ) %]approved[% END %]

View File

@ -177,7 +177,7 @@
[% END %]
[% IF (op) %]
<form method="post" action="/cgi-bin/koha/tools/inventory.pl" class="checkboxed">
<form method="post" action="/cgi-bin/koha/tools/inventory.pl">
<input type="hidden" name="minlocation" value="[% minlocation | html %]" />
<input type="hidden" name="maxlocation" value="[% maxlocation | html %]" />
<input type="hidden" name="location" value="[% location | html %]" />

View File

@ -129,7 +129,7 @@
<h3>Contents of <em>[% shelf.shelfname | html %]</em></h3>
<div class="pages">[% pagination_bar | $raw %]</div>
<form action="/cgi-bin/koha/virtualshelves/shelves.pl" id="listform" method="post" class="checkboxed">
<form action="/cgi-bin/koha/virtualshelves/shelves.pl" id="listform" method="post">
<input type="hidden" name="op" value="remove_biblios" />
<input type="hidden" name="referer" value="view" />
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />