|
|
@ -1,11 +1,11 @@
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Sorting in Javascript for Chinese Character. The Chinese Characters are sorted on the radical and number of
|
|
|
|
* Sorting in Javascript for Chinese Character. The Chinese Characters are sorted on the radical and number of
|
|
|
|
*strokes. This plug-in performs sorting for Chinese characters.
|
|
|
|
* strokes. This plug-in performs sorting for Chinese characters.
|
|
|
|
* https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/localeCompare
|
|
|
|
* <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/localeCompare">localeCompare MDC documentation</a>.
|
|
|
|
* Please note about localcompare http://www.datatables.net/forums/discussion/9700/sorting-non-ascii-characters-and-data-content-html-tag-sorting/p1
|
|
|
|
* <a href="http://www.datatables.net/forums/discussion/9700/sorting-non-ascii-characters-and-data-content-html-tag-sorting/p1">Please also note about localeCompare and IE9.</a>
|
|
|
|
* @name Chinese-String
|
|
|
|
* @name Chinese (string)
|
|
|
|
* @anchor chinese-string
|
|
|
|
* @anchor chinese-string
|
|
|
|
* @author <a href="http://www.lcube.se/sorting-chinese-characters-in-javascript/">Patrik Lindström</a>
|
|
|
|
* @author <a href="http://www.lcube.se/sorting-chinese-characters-in-javascript/">Patrik Lindstr<EFBFBD>m</a>
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
jQuery.extend( jQuery.fn.dataTableExt.oSort, {
|
|
|
|
jQuery.extend( jQuery.fn.dataTableExt.oSort, {
|
|
|
@ -15,5 +15,4 @@
|
|
|
|
"chinese-string-desc" : function (s1, s2) {
|
|
|
|
"chinese-string-desc" : function (s1, s2) {
|
|
|
|
return s2.localeCompare(s1);
|
|
|
|
return s2.localeCompare(s1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
);
|
|
|
|
|
|
|
|