diff app/model/Messung.js @ 171:c5422819d7b9

Show messzeitpunkt in messung listing. Convert timestamp to date.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Wed, 03 Jul 2013 16:13:36 +0200
parents 5eb0cfac0e30
children 92facbaece42
line wrap: on
line diff
--- a/app/model/Messung.js	Wed Jul 03 16:08:22 2013 +0200
+++ b/app/model/Messung.js	Wed Jul 03 16:13:36 2013 +0200
@@ -7,7 +7,7 @@
         {name: "mmtId"},
         {name: "nebenprobenNr"},
         {name: "messdauer"},
-        {name: "messzeitpunkt"},
+        {name: "messzeitpunkt", convert: ts2date},
         {name: "fertig", type: "boolean"},
         {name: "letzteAenderung", type:"date"},
         {name: "geplant", type: "boolean"}
@@ -23,3 +23,8 @@
         }
     }
 });
+
+function ts2date(v, record){
+    // Converts a timestamp into a date object.
+    return new Date(v);
+}

http://lada.wald.intevation.org