Mercurial > lada > lada-client
annotate app/model/Status.js @ 689:c07419f07a0c
Added field treeModified to models.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Wed, 25 Mar 2015 16:45:29 +0100 |
parents | 9b3adfb7b1ae |
children | c31644b3d445 |
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' | |
689
c07419f07a0c
Added field treeModified to models.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
593
diff
changeset
|
35 }, { |
c07419f07a0c
Added field treeModified to models.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
593
diff
changeset
|
36 name: 'treeModified' |
569 | 37 }], |
38 | |
39 idProperty: 'id', | |
40 | |
41 proxy: { | |
42 type: 'rest', | |
43 url: 'lada-server/status', | |
44 reader: { | |
45 type: 'json', | |
46 root: 'data' | |
47 } | |
48 } | |
49 }); |