Bugzilla – Attachment 108409 Details for
Bug 26214
Remove the use of jquery.checkboxes plugin on late orders page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26214: Remove the use of jquery.checkboxes plugin on late orders page
0001-Bug-26214-Remove-the-use-of-jquery.checkboxes-plugin.patch (text/plain), 4.15 KB, created by
Amit Gupta
on 2020-08-17 16:00:30 UTC
(
hide
)
Description:
Bug 26214: Remove the use of jquery.checkboxes plugin on late orders page
Filename:
MIME Type:
Creator:
Amit Gupta
Created:
2020-08-17 16:00:30 UTC
Size:
4.15 KB
patch
obsolete
>From d89858c86eb293482bed19d51900de18ff598f93 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 14 Aug 2020 14:47:40 +0000 >Subject: [PATCH] Bug 26214: Remove the use of jquery.checkboxes plugin on late > orders page > >This patch replaces the use of the jquery.checkboxes plugin on late >orders page in acquisitions. > >Unrelated changes: The "Check all" and "Uncheck all" links are moved out >of the table header so that it matches similar interfaces. Sorting is >now disabled on the checkboxes column and the table is sorted by default >on the "Order line" column. > >To test, apply the patch and go to Acquisitions -> Late orders. > > - On the initial view, there should be no "Check all" or "Uncheck all" > links. > - Select a vendor in the left-hand sidebar form. > - When the filtered table is redisplayed the "Check all" and "Uncheck > all" links should now be visible. > - Test that the links work correctly. > - Confirm that the checkboxes column cannot be sorted and that the > table is sorted by default by order line number. > >Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> >--- > .../prog/en/modules/acqui/lateorders.tt | 23 +++++++++++++--------- > 1 file changed, 14 insertions(+), 9 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt >index cafacca..d573938 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt >@@ -50,14 +50,13 @@ > </p> > [% END %] > [% SET total = 0 %] >+ [% IF bookseller_filter %] >+ <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> >+ [% END %] > <table id="late_orders"> > <thead> > <tr> >- [% IF bookseller_filter %] >- <th><a id="CheckAll" href="#">Check all</a><br /><a id="CheckNone" href="#">Uncheck all</a></th> >- [% ELSE %] >- <th></th> >- [% END %] >+ <th class="NoSort"></th> > <th>Order line</th> > <th class="title-string">Order date</th> > <th class="title-string">Estimated delivery date</th> >@@ -273,7 +272,6 @@ > [% Asset.js("js/acquisitions-menu.js") | $raw %] > [% INCLUDE 'datatables.inc' %] > [% INCLUDE 'columns_settings.inc' %] >- [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] > [% INCLUDE 'calendar.inc' %] > <script> > var late_orderst; >@@ -292,10 +290,11 @@ > var columns_settings = [% TablesSettings.GetColumns( 'acqui', 'lateorders', 'late_orders', 'json' ) | $raw %]; > late_orderst = KohaTable("late_orders", { > "aoColumnDefs": [ >- { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false }, >+ { "targets": [ "NoSort" ],"sortable": false,"searchable": false }, > { "sType": "anti-the", "aTargets" : [ "anti-the" ] }, > { "sType": "title-string", "aTargets" : [ "title-string" ] } > ], >+ "sorting": [[ 1, "asc" ]], > "sPaginationType": "full", > "bAutoWidth": false, > "fnDrawCallback": function() { >@@ -306,8 +305,14 @@ > } > }, columns_settings ); > $('input:checkbox[name=ordernumber]').bind('click', check_uncheck); >- $('#CheckAll').click(function(){ $(late_orderst.fnGetNodes()).find("td").checkCheckboxes();}); >- $('#CheckNone').click(function(){ $(late_orderst.fnGetNodes()).find("td").unCheckCheckboxes();}); >+ $('#CheckAll').click(function(e){ >+ e.preventDefault(); >+ $("#late_orders input:checkbox").prop("checked", true); >+ }); >+ $('#CheckNone').click(function(e){ >+ e.preventDefault(); >+ $("#late_orders input:checkbox").prop("checked", false); >+ }); > > // Generates a dynamic link for exporting the selection's data as CSV > $("#exportbutton, #export-csv-menu a").click(function() { >-- >2.7.4 >
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 26214
:
108287
|
108288
|
108409
|
108421