- Sortierung Erweitert für Tabellen mit Spalten im Format '31.12.2014 15:32'

This commit is contained in:
Andreas Österreicher
2014-03-24 15:18:32 +00:00
parent 8aa54621e9
commit 04555b931e
2 changed files with 25 additions and 1 deletions
+14 -1
View File
@@ -742,6 +742,18 @@
type: "numeric"
});
ts.addParser({
id: "DatummitUhrzeit",
is: function(s) {
alert("CHECK");
return s.match(new RegExp(/^[0-9]{1,2}.[0-9]{1,2}.[0-9]{4} ( (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]))$/));
},
format: function(s) {
return $.tablesorter.formatFloat(new Date(s).getTime());
},
type: "numeric"
});
ts.addParser({
id: "integer",
is: function(s,table) {
@@ -806,7 +818,8 @@
},
type: "numeric"
});
ts.addParser({
id: "percent",
is: function(s) {
+11
View File
@@ -768,6 +768,17 @@
type: "numeric"
});
ts.addParser({
id: "DatummitUhrzeit",
is: function(s) {
return s.match(new RegExp(/^[0-9]{1,2}.[0-9]{1,2}.[0-9]{4} (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]))$/));
},
format: function(s) {
return $.tablesorter.formatFloat(new Date(s.replace(/(\d{1,2})[\/\.](\d{1,2})[\/\.](\d{4})/, "$3/$2/$1")).getTime());
},
type: "numeric"
});
ts.addParser({
id: "integer",
is: function(s,table) {