From a2564d2b2a06765b25ea11521b3e8bf5c7e54eea Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 13 Oct 2011 11:59:48 -0400 Subject: [PATCH] Fix for Bug 7019 - Circulation History Sort Order Wrong Content-Type: text/plain; charset="utf-8" The return column sort was not using the right sort algorithm because it was confused by the combination of date data and text data ("Checked out"). I've added an explicit instruction to sort by date. The downside to this change is that checked out items are sorted with the oldest checkouts rather than the newest: Checked Out Checked Out 10/14/1988 07/14/2005 Not perfect, but an improvement over completely incorrect sorting. This patch also adds the necessary check for system dateformat preference to properly sort metric dates. --- .../prog/en/modules/members/readingrec.tt | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) 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 1ab1130..0d3b76b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt @@ -11,9 +11,10 @@ type: 'text' }); $.tablesorter.defaults.widgets = ['zebra']; - $("#table_readingrec").tablesorter({ + $("#table_readingrec").tablesorter({[% IF ( dateformat_metric ) %] + dateFormat: 'uk',[% END %] sortList: [[8,1]], - headers: { 1: { sorter: 'articles' }} + headers: { 1: { sorter: 'articles' }, 9: { sorter: 'shortDate'} } }).tablesorterPager({container: $("#pagertable_readingrec"),positionFixed: false,size: 20}); }); -- 1.7.3