annotate app/model/Zusatzwert.js @ 484:dfb9c0c34271

Fixed INSTALL doc.
author Raimund Renkert <rrenkert@intevation.de>
date Mon, 24 Feb 2014 13:22:12 +0100
parents debfcc7713e3
children f7446ebfe5d0
rev   line source
472
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 411
diff changeset
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 411
diff changeset
2 * Software engineering by Intevation GmbH
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 411
diff changeset
3 *
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 411
diff changeset
4 * This file is Free Software under the GNU GPL (v>=3)
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 411
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 411
diff changeset
6 * the documentation coming with IMIS-Labordaten-Application for details.
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 411
diff changeset
7 */
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 411
diff changeset
8
323
83db862d0f3f Added docstring
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 309
diff changeset
9 /**
83db862d0f3f Added docstring
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 309
diff changeset
10 * Model class for Zusatzwerte
83db862d0f3f Added docstring
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 309
diff changeset
11 */
106
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
12 Ext.define('Lada.model.Zusatzwert', {
336
e4a0645058a5 Inherit form model.base. Formatting
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 323
diff changeset
13 extend: 'Lada.model.Base',
106
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
14 fields: [
138
4287f29b5b81 Fixed fields in model (Forgotten broken mapping)
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 137
diff changeset
15 {name: "pzsId"},
4287f29b5b81 Fixed fields in model (Forgotten broken mapping)
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 137
diff changeset
16 {name: "probeId"},
114
189a93e31be9 Worked on Zusatzwerte. No all values are displayed correct in the List and
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 106
diff changeset
17 {name: "nwgZuMesswert", type: 'float'},
189a93e31be9 Worked on Zusatzwerte. No all values are displayed correct in the List and
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 106
diff changeset
18 {name: "messwertPzs", type: 'float'},
189a93e31be9 Worked on Zusatzwerte. No all values are displayed correct in the List and
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 106
diff changeset
19 {name: "messfehler", type: 'float'},
309
51897f9a6bbb Use ts2date function from lib.Helpers. Remove old code
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 142
diff changeset
20 {name: "letzteAenderung", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()}
122
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
21 ],
137
a7eea094d3d6 Removed id property from Zusatzwerte model. Do not set Probenzusatz when
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 136
diff changeset
22 idProperty: "pzsId",
106
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
23 proxy: {
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
24 type: 'rest',
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
25 appendId: true, //default
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
26 url: 'server/rest/zusatzwert',
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
27 reader: {
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
28 type: 'json',
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
29 root: 'data'
122
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
30 },
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
31 writer: {
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
32 type: 'json',
411
0eba67f453d4 Added todo
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 336
diff changeset
33 // TODO: Check if this function is really needed (torsten)
0eba67f453d4 Added todo
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 336
diff changeset
34 // <2013-09-18 15:58>
122
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
35 writeEverything : true
106
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
36 }
131
968806c1a3cb Implement custom getEidi function to build a ID from the pzsId and the
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 127
diff changeset
37 },
968806c1a3cb Implement custom getEidi function to build a ID from the pzsId and the
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 127
diff changeset
38 getEidi: function () {
136
4dc84682110d Removed nested elements in Zusatzwerte. Change getting aditional info for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 131
diff changeset
39 var pzsId = this.get('pzsId');
131
968806c1a3cb Implement custom getEidi function to build a ID from the pzsId and the
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 127
diff changeset
40 var probeId = this.get('probeId');
968806c1a3cb Implement custom getEidi function to build a ID from the pzsId and the
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 127
diff changeset
41 return "/" + pzsId + "/" + probeId;
142
dee9da79f055 Added function to model with return the beschreibung of the messeinheit of a
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 138
diff changeset
42 },
dee9da79f055 Added function to model with return the beschreibung of the messeinheit of a
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 138
diff changeset
43 getMesseinheit: function(pzsId) {
dee9da79f055 Added function to model with return the beschreibung of the messeinheit of a
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 138
diff changeset
44 var zstore = Ext.getStore('Probenzusatzwerte');
dee9da79f055 Added function to model with return the beschreibung of the messeinheit of a
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 138
diff changeset
45 var mstore = Ext.getStore('Messeinheit');
dee9da79f055 Added function to model with return the beschreibung of the messeinheit of a
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 138
diff changeset
46 var mehId = zstore.getById(pzsId).get('mehId');
dee9da79f055 Added function to model with return the beschreibung of the messeinheit of a
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 138
diff changeset
47 var record = mstore.findRecord('mehId', mehId);
dee9da79f055 Added function to model with return the beschreibung of the messeinheit of a
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 138
diff changeset
48 return record.get('einheit');
106
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
49 }
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
50 });

http://lada.wald.intevation.org