]> git.koha-community.org Git - koha.git/commit
Bug 5766 - Add configuration for excluding articles from DataTables sorting
authorOwen Leonard <oleonard@myacpl.org>
Fri, 26 Apr 2013 20:18:05 +0000 (16:18 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 8 Jul 2013 15:37:02 +0000 (15:37 +0000)
commit33054ce13afe8a0cb1cf5815bbfe3cd18cd8967d
tree158043672826aaf6485834007c13fec7878ed7b0
parentca33b7fc635d93b3029831da7496372fb34c798f
Bug 5766 - Add configuration for excluding articles from DataTables sorting

Client-side table sorting should exclude articles like "a," "an," and
"the" when sorting by title. This patch adds a custom sorting plugin for
use by DataTables and a configuration line to the DataTables string
configuration file which can be translated for any language.

As an example, this patch modifies the patron checkout history template
to use the new sort on the title column.

To test, apply the patch and clear your browser cache to ensure the
revised JavaScript file is loaded. Sort the table by title. Titles
should be sorted regardless of the presences of "a," "an", or "the" at
the beginning of the title.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and is a good improvement.
I have added German articles to the list for testing purposes
and it worked nicely.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/intranet-tmpl/prog/en/includes/datatables-strings.inc
koha-tmpl/intranet-tmpl/prog/en/js/datatables.js
koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt