From 8762df80c8b23c409a4b3ecdafc31b1a47d26f8f Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 5 Nov 2013 11:31:20 -0500 Subject: [PATCH] Bug 11203 - Datatables in acqusitions do not ignore "stopwords" in titles Sorting by the "summary" column does not produce the preferred results. Title beginning with 'a', 'an', or 'the' are sorted using those articles. Test plan: 1) Place an order for 2 items with the titles "Alpha" and "The Alpha", along with some other records with titles starting with something between 'a' and 't', and 't' and 'z' 2) Sort the "pending orders" table, note the incorrect sorting 3) Receive all the items 4) Sort the "already received" table, note the incorrect sorting 5) Apply the patch 6) Repeat steps 1-4, note the corrected sorting 7) Check acqui/basket.pl for correct sorting 8) Check acqui/invoice.pl for correct sorting --- .../intranet-tmpl/prog/en/modules/acqui/basket.tt | 7 ++++--- .../intranet-tmpl/prog/en/modules/acqui/invoice.tt | 5 ++++- .../intranet-tmpl/prog/en/modules/acqui/parcel.tt | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt index 5136644..c1c627f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -103,11 +103,12 @@ var orderst = $("#orders").dataTable($.extend(true, {}, dataTablesDefaults, { "sPaginationType": "four_button", [% IF ( active ) %] - [% UNLESS ( closedate ) %] "aoColumnDefs": [ - { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false }, + [% UNLESS ( closedate ) %] + { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false }, + [% END %] + { "sType": "anti-the", "aTargets": [ 0 ] } ], - [% END %] [% END %] } ) ); var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt index 266aa65..85c0506 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt @@ -13,7 +13,10 @@ bInfo: false, bPaginate: false, bFilter: false, - sDom: "t" + sDom: "t", + "aoColumnDefs": [ + { "sType": "anti-the", "aTargets": [ 0 ] } + ] })); }); //]]> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt index db6783b..217bc23 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -24,7 +24,7 @@ "aoColumns": [ { "sType": "num-html" }, { "sType": "num-html" }, - { "sType": "html" }, + { "sType": "anti-the" }, null, null, null, @@ -65,7 +65,7 @@ { "sType": "num-html" }, { "sType": "num-html" }, { "sType": "html" }, - { "sType": "html" }, + { "sType": "anti-the" }, null, null, null, -- 1.7.2.5