Bugzilla – Attachment 108418 Details for
Bug 26212
Remove the use of jquery.checkboxes plugin from pending offline circulations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26212: Remove the use of jquery.checkboxes plugin from pending offline circulations
Bug-26212-Remove-the-use-of-jquerycheckboxes-plugi.patch (text/plain), 4.18 KB, created by
Katrin Fischer
on 2020-08-17 21:43:25 UTC
(
hide
)
Description:
Bug 26212: Remove the use of jquery.checkboxes plugin from pending offline circulations
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-08-17 21:43:25 UTC
Size:
4.18 KB
patch
obsolete
>From a3fbb188d09d2d5d2341d8b37af5d4b1cff3186a Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 14 Aug 2020 13:39:17 +0000 >Subject: [PATCH] Bug 26212: Remove the use of jquery.checkboxes plugin from > pending offline circulations > >This patch removes the use of the jquery.checkboxes plugin from the >pending offline circulations page, replacing it with in-page JS. > >Unrelated: The JS-based creation of the "select all" and "clear all" >controls has been replaced with HTML links. Labels are added to the >results table to make checkbox selection easier. > >To test, apply the patch and go to Circulation. > >- Upload an offline circulation file (.koc) with multiple transactions. > If you don't want to generate this file using the desktop application > or Firefox add-on you can create a text file like this (tab > separated): > > Version=1.0 Generator=koct-firefox GeneratorVersion=0.1 > 2020-08-14 13:24:21 issue 0109132 33000000093476 > >- Go to Pending offline circulation actions. You should see the list of > transactions you uploaded. >- Test that the "Check all" and "Uncheck all" controls work correctly. > >Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../prog/en/modules/offline_circ/list.tt | 30 ++++++++++++---------- > 1 file changed, 16 insertions(+), 14 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/list.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/list.tt >index 451b8f223d..65d1ff4c87 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/list.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/list.tt >@@ -21,8 +21,11 @@ > [% IF ( pending_operations ) %] > > <form> >- <p><span class="checkall"></span> | >- <span class="clearall"></span></p> >+ <p> >+ <a id="CheckAll" href="#"><i class="fa fa-check"></i> Check all</a> >+ <a id="CheckNone" href="#"><i class="fa fa-remove"></i> Uncheck all</a> >+ </p> >+ > <table id="operations"> > <thead> > <tr> >@@ -37,8 +40,10 @@ > <tbody> > [% FOREACH operation IN pending_operations %] > <tr class="oc-[% operation.action | html %]"> >- <td><input type="checkbox" name="operationid" value="[% operation.operationid | html %]" /></td> >- <td>[% operation.timestamp | html %]</td> >+ <td><input type="checkbox" name="operationid" id="operationid[% operation.operationid | html %]" value="[% operation.operationid | html %]" /></td> >+ <td> >+ <label for="operationid[% operation.operationid | html %]">[% operation.timestamp | html %]</label> >+ </td> > <td> > [% SWITCH ( operation.action ) -%] > [% CASE "issue" -%] >@@ -89,19 +94,16 @@ > </div> > > [% MACRO jsinclude BLOCK %] >- [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] >- <script type="text/javascript"> >+ <script> > $(document).ready(function() { > >- $("span.clearall").html("<a id=\"CheckNone\" href=\"/cgi-bin/koha/offline_circ/list.pl\">"+_("Uncheck all")+"<\/a>"); >- $("span.checkall").html("<a id=\"CheckAll\" href=\"/cgi-bin/koha/offline_circ/list.pl\">"+_("Check all")+"<\/a>"); >- $('#CheckNone').click(function() { >- $("#operations").unCheckCheckboxes(); >- return false; >+ $('#CheckNone').click(function(e) { >+ e.preventDefault(); >+ $("#operations input:checkbox").prop("checked", false ); > }); >- $('#CheckAll').click(function() { >- $("#operations").checkCheckboxes(); >- return false; >+ $('#CheckAll').click(function(e) { >+ e.preventDefault(); >+ $("#operations input:checkbox").prop("checked", true ); > }); > $('#process,#delete').click(function() { > var action = $(this).attr("id"); >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26212
:
108282
|
108284
|
108413
| 108418