Browse Source

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>
20.11.x
Owen Leonard 11 months ago
committed by Jonathan Druart
parent
commit
b3b87dc7d9
  1. 13
      koha-tmpl/intranet-tmpl/lib/jquery/plugins/jquery.checkboxes.min.js
  2. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt
  3. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt
  4. 6
      koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt
  5. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt
  6. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt
  7. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt

13
koha-tmpl/intranet-tmpl/lib/jquery/plugins/jquery.checkboxes.min.js

@ -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);

2
koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt

@ -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 %]

2
koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt

@ -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 %]

6
koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt

@ -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 %]

2
koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt

@ -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 %]

2
koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt

@ -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 %]" />

2
koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt

@ -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 %]" />

Loading…
Cancel
Save