Mercurial > lada > lada-client
annotate app/model/Probe.js @ 473:b2501a488480
Added license text
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Fri, 17 Jan 2014 11:39:46 +0100 |
parents | debfcc7713e3 |
children | f7446ebfe5d0 |
rev | line source |
---|---|
472
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
438
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:
438
diff
changeset
|
2 * Software engineering by Intevation GmbH |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
438
diff
changeset
|
3 * |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
438
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:
438
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:
438
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:
438
diff
changeset
|
7 */ |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
438
diff
changeset
|
8 |
279
d18465f7b66a
Added documentation (jsduck-tests)
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
187
diff
changeset
|
9 /** |
d18465f7b66a
Added documentation (jsduck-tests)
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
187
diff
changeset
|
10 * A Probe. |
d18465f7b66a
Added documentation (jsduck-tests)
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
187
diff
changeset
|
11 * This class represents and defines the model of a "Probe" |
d18465f7b66a
Added documentation (jsduck-tests)
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
187
diff
changeset
|
12 * */ |
13
a8efc4b96888
Added model for Proben and a Store.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
13 Ext.define('Lada.model.Probe', { |
325
4c4f03c87d49
Inherit from model.Base
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
304
diff
changeset
|
14 extend: 'Lada.model.Base', |
21
4caf4c8c694a
Added more fields to the probenclass
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
13
diff
changeset
|
15 fields: [ |
50
2fbd53b944fc
Move proxy definition into the model. Else the building of the URL does not
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
21
diff
changeset
|
16 {name: "probeId"}, |
21
4caf4c8c694a
Added more fields to the probenclass
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
13
diff
changeset
|
17 {name: "baId"}, |
4caf4c8c694a
Added more fields to the probenclass
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
13
diff
changeset
|
18 {name: "datenbasisId"}, |
4caf4c8c694a
Added more fields to the probenclass
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
13
diff
changeset
|
19 {name: "erzeugerId"}, |
4caf4c8c694a
Added more fields to the probenclass
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
13
diff
changeset
|
20 {name: "hauptprobenNr"}, |
304
8475a625a773
Use ts2date function from lib.Helpers. Remove old code
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
279
diff
changeset
|
21 {name: "letzteAenderung", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()}, |
21
4caf4c8c694a
Added more fields to the probenclass
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
13
diff
changeset
|
22 {name: "media"}, |
4caf4c8c694a
Added more fields to the probenclass
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
13
diff
changeset
|
23 {name: "mediaDesk"}, |
4caf4c8c694a
Added more fields to the probenclass
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
13
diff
changeset
|
24 {name: "mittelungsdauer"}, |
4caf4c8c694a
Added more fields to the probenclass
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
13
diff
changeset
|
25 {name: "mpKat"}, |
4caf4c8c694a
Added more fields to the probenclass
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
13
diff
changeset
|
26 {name: "mplId"}, |
4caf4c8c694a
Added more fields to the probenclass
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
13
diff
changeset
|
27 {name: "mprId"}, |
4caf4c8c694a
Added more fields to the probenclass
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
13
diff
changeset
|
28 {name: "mstId"}, |
4caf4c8c694a
Added more fields to the probenclass
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
13
diff
changeset
|
29 {name: "netzbetreiberId"}, |
4caf4c8c694a
Added more fields to the probenclass
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
13
diff
changeset
|
30 {name: "probeNehmerId"}, |
304
8475a625a773
Use ts2date function from lib.Helpers. Remove old code
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
279
diff
changeset
|
31 {name: "probeentnahmeBeginn", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()}, |
8475a625a773
Use ts2date function from lib.Helpers. Remove old code
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
279
diff
changeset
|
32 {name: "probeentnahmeEnde", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()}, |
21
4caf4c8c694a
Added more fields to the probenclass
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
13
diff
changeset
|
33 {name: "probenartId"}, |
304
8475a625a773
Use ts2date function from lib.Helpers. Remove old code
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
279
diff
changeset
|
34 {name: "solldatumBeginn", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()}, |
8475a625a773
Use ts2date function from lib.Helpers. Remove old code
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
279
diff
changeset
|
35 {name: "solldatumEnde", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()}, |
21
4caf4c8c694a
Added more fields to the probenclass
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
13
diff
changeset
|
36 {name: "test"}, |
187
ef7b8499c924
Added readonly attribute.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
156
diff
changeset
|
37 {name: "umwId"}, |
ef7b8499c924
Added readonly attribute.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
156
diff
changeset
|
38 |
ef7b8499c924
Added readonly attribute.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
156
diff
changeset
|
39 // Readonly-Flag (sent additionaly by the server, not part of the |
ef7b8499c924
Added readonly attribute.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
156
diff
changeset
|
40 // model) |
ef7b8499c924
Added readonly attribute.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
156
diff
changeset
|
41 {name: "readonly"} |
50
2fbd53b944fc
Move proxy definition into the model. Else the building of the URL does not
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
21
diff
changeset
|
42 ], |
134
1620d02d2973
Reset idProperty to probeId again as it seems the the submitted data will have
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
124
diff
changeset
|
43 idProperty: "probeId", |
50
2fbd53b944fc
Move proxy definition into the model. Else the building of the URL does not
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
21
diff
changeset
|
44 proxy: { |
2fbd53b944fc
Move proxy definition into the model. Else the building of the URL does not
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
21
diff
changeset
|
45 type: 'rest', |
2fbd53b944fc
Move proxy definition into the model. Else the building of the URL does not
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
21
diff
changeset
|
46 appendId: true, //default |
2fbd53b944fc
Move proxy definition into the model. Else the building of the URL does not
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
21
diff
changeset
|
47 url: 'server/rest/proben', |
2fbd53b944fc
Move proxy definition into the model. Else the building of the URL does not
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
21
diff
changeset
|
48 reader: { |
77
c846a2e37289
Set default date in Proben to today.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
65
diff
changeset
|
49 type: 'json', |
c846a2e37289
Set default date in Proben to today.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
65
diff
changeset
|
50 root: 'data' |
50
2fbd53b944fc
Move proxy definition into the model. Else the building of the URL does not
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
21
diff
changeset
|
51 } |
2fbd53b944fc
Move proxy definition into the model. Else the building of the URL does not
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
21
diff
changeset
|
52 } |
13
a8efc4b96888
Added model for Proben and a Store.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
53 }); |