Mercurial > lada > lada-client
annotate app/model/Status.js @ 952:0ecbcafdb32f
Follow redirections and do not overwrite existing files.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Wed, 04 Nov 2015 14:52:55 +0100 |
parents | 023e622f9551 |
children | 45c67a784b31 |
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 }, { | |
702
0c8e689f3bcb
Added readonly to models, Probenzusatzwertgrid does now check wheter a record is readonly and disables the roweditor in such a case
Dustin Demuth <dustin@intevation.de>
parents:
698
diff
changeset
|
18 name: 'readonly', |
0c8e689f3bcb
Added readonly to models, Probenzusatzwertgrid does now check wheter a record is readonly and disables the roweditor in such a case
Dustin Demuth <dustin@intevation.de>
parents:
698
diff
changeset
|
19 type: 'boolean', |
0c8e689f3bcb
Added readonly to models, Probenzusatzwertgrid does now check wheter a record is readonly and disables the roweditor in such a case
Dustin Demuth <dustin@intevation.de>
parents:
698
diff
changeset
|
20 persist: false |
0c8e689f3bcb
Added readonly to models, Probenzusatzwertgrid does now check wheter a record is readonly and disables the roweditor in such a case
Dustin Demuth <dustin@intevation.de>
parents:
698
diff
changeset
|
21 }, { |
945
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
711
diff
changeset
|
22 name: 'owner', |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
711
diff
changeset
|
23 type: 'boolean', |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
711
diff
changeset
|
24 }, { |
569 | 25 name: 'messungsId' |
26 }, { | |
593
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
27 name: 'erzeuger' |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
28 }, { |
945
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
711
diff
changeset
|
29 name: 'statusStufe', |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
711
diff
changeset
|
30 type: 'int' |
569 | 31 }, { |
945
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
711
diff
changeset
|
32 name: 'statusWert', |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
711
diff
changeset
|
33 type: 'int' |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
711
diff
changeset
|
34 }, { |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
711
diff
changeset
|
35 name: 'treeModified', |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
711
diff
changeset
|
36 serialize: function(value) { |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
711
diff
changeset
|
37 if (value === '') { |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
711
diff
changeset
|
38 return null; |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
711
diff
changeset
|
39 } |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
711
diff
changeset
|
40 return value; |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
711
diff
changeset
|
41 } |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
711
diff
changeset
|
42 }, { |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
711
diff
changeset
|
43 name: 'parentModified', |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
711
diff
changeset
|
44 serialize: function(value) { |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
711
diff
changeset
|
45 if (value === '') { |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
711
diff
changeset
|
46 return null; |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
711
diff
changeset
|
47 } |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
711
diff
changeset
|
48 return value; |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
711
diff
changeset
|
49 } |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
711
diff
changeset
|
50 }, { |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
711
diff
changeset
|
51 name: 'datum', |
593
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
52 type: 'date', |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
53 convert: function(v) { |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
54 if (!v) { |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
55 return v; |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
56 } |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
57 return new Date(v); |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
58 }, |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
59 defaultValue: new Date() |
569 | 60 }, { |
945
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
711
diff
changeset
|
61 name: 'text' |
569 | 62 }], |
63 | |
64 idProperty: 'id', | |
65 | |
66 proxy: { | |
67 type: 'rest', | |
68 url: 'lada-server/status', | |
69 reader: { | |
70 type: 'json', | |
71 root: 'data' | |
72 } | |
73 } | |
74 }); |