summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/Functions/FunctionsPrintLists.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/Functions/FunctionsPrintLists.php b/app/Functions/FunctionsPrintLists.php
index f9b43a08a8..5401e205db 100644
--- a/app/Functions/FunctionsPrintLists.php
+++ b/app/Functions/FunctionsPrintLists.php
@@ -1524,6 +1524,8 @@ class FunctionsPrintLists {
$controller
->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
->addInlineJavascript('
+ jQuery.fn.dataTableExt.oSort["unicode-asc" ]=function(a,b) {return a.replace(/<[^<]*>/, "").localeCompare(b.replace(/<[^<]*>/, ""))};
+ jQuery.fn.dataTableExt.oSort["unicode-desc"]=function(a,b) {return b.replace(/<[^<]*>/, "").localeCompare(a.replace(/<[^<]*>/, ""))};
jQuery.fn.dataTableExt.oSort["num-asc" ]=function(a,b) {a=parseFloat(a); b=parseFloat(b); return (a<b) ? -1 : (a>b ? 1 : 0);};
jQuery.fn.dataTableExt.oSort["num-desc"]=function(a,b) {a=parseFloat(a); b=parseFloat(b); return (a>b) ? -1 : (a<b ? 1 : 0);};
jQuery(".surname-list").dataTable( {
@@ -1531,10 +1533,10 @@ class FunctionsPrintLists {
jQueryUI: true,
autoWidth: false,
paging: false,
- sorting: [],
+ sorting: [[1, "asc"]],
columns: [
/* 0 name */ { dataSort: 1 },
- /* 1 NAME */ { visible: false },
+ /* 1 NAME */ { type: "unicode", visible: false },
/* 2 count */ { dataSort: 3, class: "center" },
/* 3 COUNT */ { visible: false }
],