Mercurial > lada > lada-client
diff app/model/Messung.js @ 212:92facbaece42
add getEidi function to model
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Fri, 12 Jul 2013 15:57:09 +0200 |
parents | c5422819d7b9 |
children | fe199b8828a8 |
line wrap: on
line diff
--- a/app/model/Messung.js Fri Jul 12 15:56:41 2013 +0200 +++ b/app/model/Messung.js Fri Jul 12 15:57:09 2013 +0200 @@ -7,12 +7,12 @@ {name: "mmtId"}, {name: "nebenprobenNr"}, {name: "messdauer"}, - {name: "messzeitpunkt", convert: ts2date}, + {name: "messzeitpunkt", convert: ts2date, defaultValue: new Date()}, {name: "fertig", type: "boolean"}, {name: "letzteAenderung", type:"date"}, {name: "geplant", type: "boolean"} ], - idProperty: "convertedId", + idProperty: "id", proxy: { type: 'rest', appendId: true, //default @@ -21,6 +21,11 @@ type: 'json', root: 'data' } + }, + getEidi: function() { + var messId = this.get('messungsId'); + var probeId = this.get('probeId'); + return "/" + messId + "/" + probeId; } });