annotate app/model/Messwert.js @ 179:f1f0351b6e2f

Show List of Messungskommentare
author Torsten Irländer <torsten.irlaender@intevation.de>
date Thu, 04 Jul 2013 12:21:25 +0200
parents 3d3ad1f031bf
children 53e50427888b
rev   line source
167
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
1 Ext.define('Lada.model.Messwert', {
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
2 extend: 'Ext.data.Model',
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
3 fields: [
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
4 {name: "id"},
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
5 {name: "messungsId", mapping:"id.messungsId"},
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
6 {name: "probeId", mapping:"id.probeId"},
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
7 {name: "messgroesseId", mapping:"id.messgroesseId"},
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
8 {name: "messwert", type:"float"},
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
9 {name: "messfehler", type:"float"},
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
10 {name: "nwgZuMesswert", type:"float"},
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
11 {name: "mehId"},
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
12 {name: "grenzwertueberschreitung", type: "boolean"},
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
13 {name: "letzteAenderung", type:"date"}
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
14 ],
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
15 idProperty: "id",
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
16 proxy: {
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
17 type: 'rest',
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
18 appendId: true, //default
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
19 url: 'server/rest/messwert',
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
20 reader: {
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
21 type: 'json',
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
22 root: 'data'
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
23 }
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
24 },
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
25 getEidi: function() {
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
26 var mid = this.get('messgroesseId');
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
27 var messId = this.get('messungsId');
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
28 var probeId = this.get('probeId');
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
29 return "/" + mid + "/" + messId + "/" + probeId;
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
30 }
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
31 });

http://lada.wald.intevation.org