Menu ▾ ▴

#16 SortFunction German Suggestions | € \. etc...

open
nobody
None
5
2007-02-27
2007-02-27
Anonymous
No

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;
},

Discussion


Log in to post a comment.