Fix ordering: natural sort with case insensitive wasn't working

- #281
pull/306/head
Allan Jardine 8 years ago
parent 1a0034ed55
commit 815ca8e59d

@ -94,10 +94,6 @@ function naturalSort (a, b, html) {
}
jQuery.extend( jQuery.fn.dataTableExt.oSort, {
"natural-ci-pre": function ( a ) {
return a.toString().toLowerCase();
},
"natural-asc": function ( a, b ) {
return naturalSort(a,b,true);
},
@ -115,10 +111,16 @@ jQuery.extend( jQuery.fn.dataTableExt.oSort, {
},
"natural-ci-asc": function( a, b ) {
a = a.toString().toLowerCase();
b = b.toString().toLowerCase();
return naturalSort(a,b,true);
},
"natural-ci-desc": function( a, b ) {
a = a.toString().toLowerCase();
b = b.toString().toLowerCase();
return naturalSort(a,b,true) * -1;
}
} );

Loading…
Cancel
Save