Add case-insensitive options natural sort plugin. Resolves #281

pull/301/head
Ryan Johnston 8 years ago
parent b76ace2d2e
commit ce1d827984

@ -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