changeset 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 738d657d8b6b
children cfa0cc437781
files app/model/Messung.js app/view/messungen/List.js
diffstat 2 files changed, 7 insertions(+), 2 deletions(-) [+]
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);
+}
--- a/app/view/messungen/List.js	Wed Jul 03 16:08:22 2013 +0200
+++ b/app/view/messungen/List.js	Wed Jul 03 16:13:36 2013 +0200
@@ -33,7 +33,7 @@
             {header: 'Mess.ID', dataIndex: "messungsId", width: 50},
             {header: 'NPR-Nr.', dataIndex: "nebenprobenNr", width: 50},
             {header: 'MMT', dataIndex: "mmtId", width: 50},
-            {header: 'Messzeit', dataIndex: "messdauer"},
+            {header: 'Messzeit', dataIndex: "messzeitpunkt"},
             {
                 header: 'Status',
                 dataIndex: 'id',

http://lada.wald.intevation.org