Mercurial > lada > lada-client
diff app/model/Kommentar.js @ 107:84f32c62670f
Added form to create kommentare
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Wed, 19 Jun 2013 11:43:25 +0200 |
parents | 8356595f4fdb |
children | 7b1140bd8b3d |
line wrap: on
line diff
--- a/app/model/Kommentar.js Tue Jun 18 14:02:48 2013 +0200 +++ b/app/model/Kommentar.js Wed Jun 19 11:43:25 2013 +0200 @@ -6,7 +6,7 @@ {name: "convertedId", convert:buildId}, {name: "probeId"}, {name: "erzeuger"}, - {name: "kdatum"}, + {name: "kdatum", type: 'date', convert: ts2date, defaultValue: new Date()}, {name: "ktext"} ], idProperty: "convertedId", @@ -24,3 +24,8 @@ function buildId(v, record){ return record.get('probeId') + record.get('kid'); } + +function ts2date(v, record){ + // Converts a timestamp into a date object. + return new Date(v); +}