Mercurial > lada > lada-client
annotate app/model/Status.js @ 674:19d3b1f2613e
merged.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Thu, 19 Mar 2015 14:52:20 +0100 |
parents | 9b3adfb7b1ae |
children | c07419f07a0c c5b8896768a2 |
rev | line source |
---|---|
569 | 1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz |
2 * Software engineering by Intevation GmbH | |
3 * | |
4 * This file is Free Software under the GNU GPL (v>=3) | |
5 * and comes with ABSOLUTELY NO WARRANTY! Check out | |
6 * the documentation coming with IMIS-Labordaten-Application for details. | |
7 */ | |
8 | |
9 /** | |
10 * Model class for Status | |
11 */ | |
12 Ext.define('Lada.model.Status', { | |
13 extend: 'Ext.data.Model', | |
14 | |
15 fields: [{ | |
16 name: 'id' | |
17 }, { | |
18 name: 'messungsId' | |
19 }, { | |
593
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
20 name: 'erzeuger' |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
21 }, { |
569 | 22 name: 'status' |
23 }, { | |
593
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
24 name: 'sdatum', |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
25 type: 'date', |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
26 convert: function(v) { |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
27 if (!v) { |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
28 return v; |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
29 } |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
30 return new Date(v); |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
31 }, |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
32 defaultValue: new Date() |
569 | 33 }, { |
34 name: 'skommentar' | |
35 }], | |
36 | |
37 idProperty: 'id', | |
38 | |
39 proxy: { | |
40 type: 'rest', | |
41 url: 'lada-server/status', | |
42 reader: { | |
43 type: 'json', | |
44 root: 'data' | |
45 } | |
46 } | |
47 }); |