[Lada-commits] [PATCH 5 of 7] add getEidi function to model

Wald Commits scm-commit at wald.intevation.org
Fri Jul 12 15:59:13 CEST 2013


# HG changeset patch
# User Torsten Irländer <torsten.irlaender at intevation.de>
# Date 1373637429 -7200
# Node ID 92facbaece4294b5a744a30db2ea41e32ef0dc68
# Parent  401d559e046192b52c0a03a089172d5dcc5eb801
add getEidi function to model

diff -r 401d559e0461 -r 92facbaece42 app/model/Messung.js
--- 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;
     }
 });
 


More information about the Lada-commits mailing list