From 4179130b4415bf15c50dba748f13fb44b549f7ec Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 23 Oct 2020 18:45:37 +0000 Subject: [PATCH] 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 Signed-off-by: Katrin Fischer --- .../lib/jquery/plugins/jquery.checkboxes.min.js | 13 ------------- .../prog/en/modules/labels/label-edit-batch.tt | 2 +- .../intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt | 2 +- .../prog/en/modules/serials/serials-collection.tt | 6 +++--- koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt | 2 +- .../intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt | 2 +- 7 files changed, 8 insertions(+), 21 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/lib/jquery/plugins/jquery.checkboxes.min.js diff --git a/koha-tmpl/intranet-tmpl/lib/jquery/plugins/jquery.checkboxes.min.js b/koha-tmpl/intranet-tmpl/lib/jquery/plugins/jquery.checkboxes.min.js deleted file mode 100644 index 4ea9a512dc..0000000000 --- a/koha-tmpl/intranet-tmpl/lib/jquery/plugins/jquery.checkboxes.min.js +++ /dev/null @@ -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); \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt index 4be84375c4..faa5e64c55 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt @@ -97,7 +97,7 @@ Export full batch[% END %] [% IF ( table_loop ) %] -
+

Items in batch number [% batch_id | html %]

[% FOREACH table_loo IN table_loop %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt index e786485684..6c03c3e2e3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt @@ -65,7 +65,7 @@ Export card batch[% END %] [% IF ( table_loop ) %] - +

Patrons in batch number [% batch_id | html %]

[% FOREACH table_loo IN table_loop %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt index 1aa688293a..e5990e56f5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt @@ -194,12 +194,12 @@ [% ELSE %] [% IF ( delete ) %] [% IF serialsid.grep("${serial.serialid}").size %] - + [% ELSE %] - + [% END %] [% ELSE %] - + [% END %] [% END %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt index e588174d32..52423659c7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt +++ b/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; }

Tags

- +

Displaying [% IF ( filter_approved_all ) %]all[% END %] [% IF ( filter_approved_ok ) %]approved[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt index 5346304268..a7f76f552e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt @@ -177,7 +177,7 @@ [% END %] [% IF (op) %] - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt index 7eac1076d3..ff02730875 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt @@ -129,7 +129,7 @@

Contents of [% shelf.shelfname | html %]

[% pagination_bar | $raw %]
- + -- 2.11.0