Mercurial > lada > lada-client
changeset 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 | 401d559e0461 |
children | f0c59e7ee0bc |
files | app/model/Messung.js |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
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; } });