From a09e77cae3266e526a35eec36a48930efcd90dc6 Mon Sep 17 00:00:00 2001 From: Fridolyn SOMERS Date: Thu, 21 Feb 2013 16:27:49 +0100 Subject: [PATCH] Bug 7019: Circulation History Sort Order Wrong (in datatable) The return column sort is using the right sort algorithm because it was confused by the combination of date data and text data ("Checked out"). This patch adds an explicit instruction to sort by date for UK and US formats. Test plan : - set dateformat syspref to "dd/mm/yyyy" - Go to members/readingrec.pl for a borrower having a old issues and checked out issues => Check that sort of "Return date" is correct. For example : With patch : 20/01/2011 06/03/2011 20/03/2011 Checked Out Without patch : 06/03/2011 20/01/2011 20/03/2011 Checked Out - Test also with dateformat syspref "mm/dd/yyyy" --- koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt index 32c91a7..9d57958 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt @@ -13,6 +13,13 @@ dt_add_type_uk_date(); [% END %] $("#table_readingrec").dataTable($.extend(true, {}, dataTablesDefaults, { + "aoColumnDefs": [ + [% IF (dateformat == 'metric') %] + { "aTargets": [ -1 ], "sType": "uk_date" }, + [% ELSIF (dateformat == 'us') %] + { "aTargets": [ -1 ], "sType": "date" }, + [% END %] + ], "sPaginationType": "four_button", })); }); -- 1.7.10.4