Ordering: Add case-insensitive options natural sort plugin.

Merge pull request #301 from freak3dot/master
Resolves #281
pull/303/head
Allan Jardine 8 years ago committed by GitHub
commit eb8648c099

@ -94,6 +94,10 @@ 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);
},
@ -108,6 +112,14 @@ jQuery.extend( jQuery.fn.dataTableExt.oSort, {
"natural-nohtml-desc": function( a, b ) {
return naturalSort(a,b,false) * -1;
},
"natural-ci-asc": function( a, b ) {
return naturalSort(a,b,true);
},
"natural-ci-desc": function( a, b ) {
return naturalSort(a,b,true) * -1;
}
} );

Loading…
Cancel
Save