Owen Leonard
33054ce13a
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>
18 lines
766 B
PHP
18 lines
766 B
PHP
<script type="text/javascript">
|
|
//<![CDATA[
|
|
var MSG_DT_FIRST = _("First");
|
|
var MSG_DT_LAST = _("Last");
|
|
var MSG_DT_NEXT = _("Next");
|
|
var MSG_DT_PREVIOUS = _("Previous");
|
|
var MSG_DT_EMPTY_TABLE = _("No data available in table");
|
|
var MSG_DT_INFO = _("Showing _START_ to _END_ of _TOTAL_");
|
|
var MSG_DT_INFO_EMPTY = _("No entries to show");
|
|
var MSG_DT_INFO_FILTERED = _("(filtered from _MAX_ total entries)");
|
|
var MSG_DT_LENGTH_MENU = _("Show _MENU_ entries");
|
|
var MSG_DT_LOADING_RECORDS = _("Loading...");
|
|
var MSG_DT_PROCESSING = _("Processing...");
|
|
var MSG_DT_SEARCH = _("Search:");
|
|
var MSG_DT_ZERO_RECORDS = _("No matching records found");
|
|
var CONFIG_EXCLUDE_ARTICLES_FROM_SORT = _("a an the");
|
|
//]]>
|
|
</script>
|