annotate app/model/Zusatzwert.js @ 530:95bad130be98

Increased list grid height.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 17 Dec 2014 11:31:47 +0100
parents 8b4ec61c5752
children
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
497
7c0653e8d9f7 Fixed some js related issues (unused vars, arrays, etc.) and code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 496
diff changeset
6 * the documentation coming with IMIS-Labordaten-Application for details.
472
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',
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 488
diff changeset
14
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 488
diff changeset
15 fields: [{
497
7c0653e8d9f7 Fixed some js related issues (unused vars, arrays, etc.) and code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 496
diff changeset
16 name: 'id'
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 488
diff changeset
17 }, {
497
7c0653e8d9f7 Fixed some js related issues (unused vars, arrays, etc.) and code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 496
diff changeset
18 name: 'probeId'
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 488
diff changeset
19 }, {
497
7c0653e8d9f7 Fixed some js related issues (unused vars, arrays, etc.) and code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 496
diff changeset
20 name: 'pzsId'
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 488
diff changeset
21 }, {
497
7c0653e8d9f7 Fixed some js related issues (unused vars, arrays, etc.) and code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 496
diff changeset
22 name: 'nwgZuMesswert',
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 488
diff changeset
23 type: 'float'
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 488
diff changeset
24 }, {
497
7c0653e8d9f7 Fixed some js related issues (unused vars, arrays, etc.) and code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 496
diff changeset
25 name: 'messwertPzs',
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 488
diff changeset
26 type: 'float'
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 488
diff changeset
27 }, {
497
7c0653e8d9f7 Fixed some js related issues (unused vars, arrays, etc.) and code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 496
diff changeset
28 name: 'messfehler',
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 488
diff changeset
29 type: 'float'
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 488
diff changeset
30 }, {
497
7c0653e8d9f7 Fixed some js related issues (unused vars, arrays, etc.) and code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 496
diff changeset
31 name: 'letzteAenderung',
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 488
diff changeset
32 type: 'date',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 488
diff changeset
33 convert: Lada.lib.Helpers.ts2date,
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 488
diff changeset
34 defaultValue: new Date()
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 488
diff changeset
35 }],
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 488
diff changeset
36
497
7c0653e8d9f7 Fixed some js related issues (unused vars, arrays, etc.) and code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 496
diff changeset
37 idProperty: 'id',
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 488
diff changeset
38
106
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
39 proxy: {
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
40 type: 'rest',
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
41 url: 'server/rest/zusatzwert',
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
42 reader: {
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
43 type: 'json',
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
44 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
45 },
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
46 writer: {
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
47 type: 'json',
411
0eba67f453d4 Added todo
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 336
diff changeset
48 // TODO: Check if this function is really needed (torsten)
497
7c0653e8d9f7 Fixed some js related issues (unused vars, arrays, etc.) and code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 496
diff changeset
49 // <2013-09-18 15:58>
7c0653e8d9f7 Fixed some js related issues (unused vars, arrays, etc.) and code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 496
diff changeset
50 writeEverything: true
106
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
51 }
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
52 },
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 488
diff changeset
53
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
54 getMesseinheit: function(pzsId) {
496
d07e5086a64b Moved stammdaten stores to app.js and load them via storemanager.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 491
diff changeset
55 var zstore = Ext.data.StoreManager.get('staProbenzusaetze');
d07e5086a64b Moved stammdaten stores to app.js and load them via storemanager.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 491
diff changeset
56 var mstore = Ext.data.StoreManager.get('staMesseinheiten');
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
57 var mehId = zstore.getById(pzsId).get('mehId');
488
f7446ebfe5d0 Added and updated models.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
58 var record = mstore.getById(mehId);
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
59 return record.get('einheit');
106
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
60 }
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
61 });

http://lada.wald.intevation.org