SortFunction German Suggestions | € \. etc...
Brought to you by:
workingwithme
determineSortFunction : function(itm) {
var sortfn = this.sortCaseInsensitive;
if (itm.match(/^\d\d[\.\/-]\d\d[\.\/-]\d\d\d\d$/)) { // added [\.]
sortfn = this.sortDate;
}
if (itm.match(/^\d\d[\.\/-]\d\d[\.\/-]\d\d$/)) { // added [\.]
sortfn = this.sortDate;
}
if (itm.match(/^[£$€]|[£$€]$/)) { // added €]|[£$€]$
sortfn = this.sortCurrency;
}
if (itm.match(/^\d?\.?\d+$/)) {
sortfn = this.sortNumeric;
}
if (itm.match(/^[+-]?\d*\.?\d+([eE]-?\d+)?$/)) {
sortfn = this.sortNumeric;
}
if (itm.match(/^([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])$/)) {
sortfn = this.sortIP;
}
return sortfn;
},