Mercurial > lada > lada-client
annotate app/model/Status.js @ 698:9635f4e60b13
merged
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Thu, 26 Mar 2015 17:29:00 +0100 |
parents | c31644b3d445 c5b8896768a2 |
children | 0c8e689f3bcb |
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 }, { | |
691 | 18 name: 'owner', |
19 type: 'boolean' | |
20 }, { | |
569 | 21 name: 'messungsId' |
22 }, { | |
593
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
23 name: 'erzeuger' |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
24 }, { |
569 | 25 name: 'status' |
26 }, { | |
593
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
27 name: 'sdatum', |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
28 type: 'date', |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
29 convert: function(v) { |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
30 if (!v) { |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
31 return v; |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
32 } |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
33 return new Date(v); |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
34 }, |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
35 defaultValue: new Date() |
569 | 36 }, { |
37 name: 'skommentar' | |
689
c07419f07a0c
Added field treeModified to models.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
593
diff
changeset
|
38 }, { |
c07419f07a0c
Added field treeModified to models.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
593
diff
changeset
|
39 name: 'treeModified' |
569 | 40 }], |
41 | |
42 idProperty: 'id', | |
43 | |
44 proxy: { | |
45 type: 'rest', | |
46 url: 'lada-server/status', | |
47 reader: { | |
48 type: 'json', | |
49 root: 'data' | |
50 } | |
51 } | |
52 }); |