diff app/model/Messung.js @ 103:3552b0ee4526

Added Messungenlist to the Proben eddit view.
author Torsten Irländer <torsten@irlaender.de>
date Mon, 17 Jun 2013 16:59:04 +0200
parents
children 237a4efe715a
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/Messung.js	Mon Jun 17 16:59:04 2013 +0200
@@ -0,0 +1,30 @@
+Ext.define('Lada.model.Messung', {
+    extend: 'Ext.data.Model',
+        fields: [
+        {name: "id"},
+        {name: "messungsId", mapping: "id.messungsId"},
+        {name: "convertedId", convert: buildId},
+        {name: "lprobeId"},
+        {name: "mmtId"},
+        {name: "nebenprobenNr"},
+        {name: "messdauer"},
+        {name: "messzeitpunkt"},
+        {name: "fertig", type: "boolean"},
+        {name: "letzteAenderung", type:"date"},
+        {name: "geplant", type: "boolean"}
+    ],
+    idProperty: "convertedId",
+    proxy: {
+        type: 'rest',
+        appendId: true, //default
+        url: 'server/rest/messung',
+        reader: {
+            type: 'json',
+            root: 'data'
+        }
+    }
+});
+
+function buildId(v, record){
+    return record.get('probeId') + record.get('messungsId');
+}

http://lada.wald.intevation.org