From 93b25edbc8d99d1083905e963da3eab8ec52736f Mon Sep 17 00:00:00 2001 From: Ɓukasz Date: Thu, 17 Dec 2015 18:09:13 +0100 Subject: surnameTable function doesn't sort surnames correctly in Polish #783 --- app/Functions/FunctionsPrintLists.php | 6 ++++-- 1 file 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 (ab ? 1 : 0);}; jQuery.fn.dataTableExt.oSort["num-desc"]=function(a,b) {a=parseFloat(a); b=parseFloat(b); return (a>b) ? -1 : (a