[Lada-commits] [PATCH] Show messzeitpunkt in messung listing. Convert timestamp to date
Wald Commits
scm-commit at wald.intevation.org
Wed Jul 3 16:14:36 CEST 2013
# HG changeset patch
# User Torsten Irländer <torsten.irlaender at intevation.de>
# Date 1372860816 -7200
# Node ID c5422819d7b99610f583dd2ff9f49c2db045e483
# Parent 738d657d8b6b4e6c8a6beb9b4365513725e7259f
Show messzeitpunkt in messung listing. Convert timestamp to date.
diff -r 738d657d8b6b -r c5422819d7b9 app/model/Messung.js
--- 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);
+}
diff -r 738d657d8b6b -r c5422819d7b9 app/view/messungen/List.js
--- 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',
More information about the Lada-commits
mailing list