1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-01-30 23:52:11 +01:00

Rolling back the change to starting that used localeCompare - it was causing incorrect sorting in IE9 (unit test failures)

This commit is contained in:
Allan Jardine 2011-12-15 15:23:52 +00:00
parent 1e2d1a994b
commit b447a0d4a9
2 changed files with 12 additions and 12 deletions

View File

@ -10956,17 +10956,17 @@
"string-pre": function ( a ) "string-pre": function ( a )
{ {
if ( typeof a != 'string' ) { a = ''; } if ( typeof a != 'string' ) { a = ''; }
return a.toLocaleLowerCase(); return a.toLowerCase();
}, },
"string-asc": function ( x, y ) "string-asc": function ( x, y )
{ {
return x.localeCompare(y); return ((x < y) ? -1 : ((x > y) ? 1 : 0));
}, },
"string-desc": function ( x, y ) "string-desc": function ( x, y )
{ {
return y.localeCompare(x); return ((x < y) ? 1 : ((x > y) ? -1 : 0));
}, },
@ -10975,17 +10975,17 @@
*/ */
"html-pre": function ( a ) "html-pre": function ( a )
{ {
return a.replace( /<.*?>/g, "" ).toLocaleLowerCase(); return a.replace( /<.*?>/g, "" ).toLowerCase();
}, },
"html-asc": function ( x, y ) "html-asc": function ( x, y )
{ {
return x.localeCompare(y); return ((x < y) ? -1 : ((x > y) ? 1 : 0));
}, },
"html-desc": function ( x, y ) "html-desc": function ( x, y )
{ {
return y.localeCompare(x); return ((x < y) ? 1 : ((x > y) ? -1 : 0));
}, },

View File

@ -6,17 +6,17 @@ $.extend( DataTable.ext.oSort, {
"string-pre": function ( a ) "string-pre": function ( a )
{ {
if ( typeof a != 'string' ) { a = ''; } if ( typeof a != 'string' ) { a = ''; }
return a.toLocaleLowerCase(); return a.toLowerCase();
}, },
"string-asc": function ( x, y ) "string-asc": function ( x, y )
{ {
return x.localeCompare(y); return ((x < y) ? -1 : ((x > y) ? 1 : 0));
}, },
"string-desc": function ( x, y ) "string-desc": function ( x, y )
{ {
return y.localeCompare(x); return ((x < y) ? 1 : ((x > y) ? -1 : 0));
}, },
@ -25,17 +25,17 @@ $.extend( DataTable.ext.oSort, {
*/ */
"html-pre": function ( a ) "html-pre": function ( a )
{ {
return a.replace( /<.*?>/g, "" ).toLocaleLowerCase(); return a.replace( /<.*?>/g, "" ).toLowerCase();
}, },
"html-asc": function ( x, y ) "html-asc": function ( x, y )
{ {
return x.localeCompare(y); return ((x < y) ? -1 : ((x > y) ? 1 : 0));
}, },
"html-desc": function ( x, y ) "html-desc": function ( x, y )
{ {
return y.localeCompare(x); return ((x < y) ? 1 : ((x > y) ? -1 : 0));
}, },