annotate app/model/Status.js @ 480:3ef95496cd28

Added more files to the ignore file
author Torsten Irländer <torsten.irlaender@intevation.de>
date Tue, 21 Jan 2014 17:00:25 +0100
parents debfcc7713e3
children f7446ebfe5d0
rev   line source
472
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 335
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: 335
diff changeset
2 * Software engineering by Intevation GmbH
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 335
diff changeset
3 *
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 335
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: 335
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: 335
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: 335
diff changeset
7 */
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 335
diff changeset
8
322
49a42c7f1d1f Added docstring
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 308
diff changeset
9 /**
49a42c7f1d1f Added docstring
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 308
diff changeset
10 * Model class for Status
49a42c7f1d1f Added docstring
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 308
diff changeset
11 */
170
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
12 Ext.define('Lada.model.Status', {
335
34ac1c9db042 Inherit form model.base. Formatting
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 322
diff changeset
13 extend: 'Lada.model.Base',
170
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
14 fields: [
220
8e41a5a6cb7f Fixed variable name
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 200
diff changeset
15 {name: "sid"},
170
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
16 {name: "messungsId"},
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
17 {name: "probeId"},
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
18 {name: "erzeuger"},
200
945a727209d3 Fixed attribute names in the Status model
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 170
diff changeset
19 {name: "status", defaultValue: 1},
308
59c1d9ad6555 Use ts2date function from lib.Helpers. Remove old code
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 225
diff changeset
20 {name: "sdatum", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
200
945a727209d3 Fixed attribute names in the Status model
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 170
diff changeset
21 {name: "skommentar"}
170
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
22 ],
225
d27017394c8f Fix ID-property
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 220
diff changeset
23 idProperty: "sid",
170
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
24 proxy: {
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
25 type: 'rest',
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
26 appendId: true, //default
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
27 url: 'server/rest/status',
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
28 reader: {
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
29 type: 'json',
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
30 root: 'data'
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
31 }
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
32 },
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
33 getEidi: function() {
220
8e41a5a6cb7f Fixed variable name
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 200
diff changeset
34 var sid = this.get('sid');
170
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
35 var messId = this.get('messungsId');
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
36 var probeId = this.get('probeId');
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
37 return "/" + sid + "/" + messId + "/" + probeId;
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
38 }
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
39 });

http://lada.wald.intevation.org