Bugzilla – Attachment 65424 Details for
Bug 19021
Inventory column sorting
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 19021 - inventory column sorting
SIGNED-OFF-Bug-19021---inventory-column-sorting.patch (text/plain), 2.36 KB, created by
Owen Leonard
on 2017-08-02 13:34:52 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 19021 - inventory column sorting
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2017-08-02 13:34:52 UTC
Size:
2.36 KB
patch
obsolete
>From c630bb25ed84ae09dfb973b076a5546b50e4c9cd Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Wed, 2 Aug 2017 10:35:49 +0200 >Subject: [PATCH] [SIGNED-OFF] Bug 19021 - inventory column sorting > >In inventory result page, items are shown in a JS DataTable. >For an inventory with barcode file second column is not sortable for no reason. >For an inventory without barcode file first column is not sortable but since it is the default sort order the sorting icon is still displayed. > >This patch corrects by setting default sort order on barcode column. > >Test plan : >- perform inventory with barcode file >- look at result table >- table is sorted by barcode >=> Without patch second column is not sortable >=> With patch all columns are sortable >- perform inventory without barcode file >- look at result table >=> Without patch first column show sort icon and table is not sorted by barcode >=> With patch first column is not sortable and table is sorted by barcode > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > >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 6fcbff8..90cb03d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >@@ -33,9 +33,15 @@ $(document).ready(function(){ > inventorydt = $('#inventoryt').dataTable($.extend(true, {}, dataTablesDefaults, { > 'sPaginationType': 'full_numbers', > [% IF compareinv2barcd %] >- "aoColumnDefs": [ { "bSortable": false, "aTargets": [ 1 ] } ], >+ // sort on barcode >+ "aaSorting": [[ 0, "asc" ]], > [% ELSE %] >- "aoColumnDefs": [ { "bSortable": false, "aTargets": [ 0 ] } ], >+ // first column contains checkboxes >+ "aoColumnDefs": [ >+ { "bSortable": false, "bSearchable": false, "aTargets": [ 0 ] }, >+ ], >+ // second column is barcode >+ "aaSorting": [[ 1, "asc" ]], > [% END %] > 'fnDrawCallback': function() { > //bind the click handler script to the newly created elements held in the table >-- >2.1.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 19021
:
65413
|
65417
|
65424
|
67138
|
67804
|
68715