Mercurial > lada > lada-client
annotate app/model/Status.js @ 868:b90e29b22ea6 2.0.2
Fixed path to image.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Fri, 10 Jul 2015 18:52:54 +0200 |
parents | af16a257d5f6 |
children | 023e622f9551 |
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 }, { | |
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
|
21 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
|
22 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
|
23 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
|
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 }, { |
569 | 29 name: 'status' |
30 }, { | |
593
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
31 name: 'sdatum', |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
32 type: 'date', |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
33 convert: function(v) { |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
34 if (!v) { |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
35 return v; |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
36 } |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
37 return new Date(v); |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
38 }, |
9b3adfb7b1ae
Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
569
diff
changeset
|
39 defaultValue: new Date() |
569 | 40 }, { |
41 name: 'skommentar' | |
689
c07419f07a0c
Added field treeModified to models.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
593
diff
changeset
|
42 }, { |
711
af16a257d5f6
Updated the model to have correct tree_modified value and parent_modified
Raimund Renkert <raimund.renkert@intevation.de>
parents:
702
diff
changeset
|
43 name: 'treeModified', |
af16a257d5f6
Updated the model to have correct tree_modified value and parent_modified
Raimund Renkert <raimund.renkert@intevation.de>
parents:
702
diff
changeset
|
44 serialize: function(value) { |
af16a257d5f6
Updated the model to have correct tree_modified value and parent_modified
Raimund Renkert <raimund.renkert@intevation.de>
parents:
702
diff
changeset
|
45 if (value === '') { |
af16a257d5f6
Updated the model to have correct tree_modified value and parent_modified
Raimund Renkert <raimund.renkert@intevation.de>
parents:
702
diff
changeset
|
46 return null; |
af16a257d5f6
Updated the model to have correct tree_modified value and parent_modified
Raimund Renkert <raimund.renkert@intevation.de>
parents:
702
diff
changeset
|
47 } |
af16a257d5f6
Updated the model to have correct tree_modified value and parent_modified
Raimund Renkert <raimund.renkert@intevation.de>
parents:
702
diff
changeset
|
48 return value; |
af16a257d5f6
Updated the model to have correct tree_modified value and parent_modified
Raimund Renkert <raimund.renkert@intevation.de>
parents:
702
diff
changeset
|
49 } |
af16a257d5f6
Updated the model to have correct tree_modified value and parent_modified
Raimund Renkert <raimund.renkert@intevation.de>
parents:
702
diff
changeset
|
50 }, { |
af16a257d5f6
Updated the model to have correct tree_modified value and parent_modified
Raimund Renkert <raimund.renkert@intevation.de>
parents:
702
diff
changeset
|
51 name: 'parentModified', |
af16a257d5f6
Updated the model to have correct tree_modified value and parent_modified
Raimund Renkert <raimund.renkert@intevation.de>
parents:
702
diff
changeset
|
52 serialize: function(value) { |
af16a257d5f6
Updated the model to have correct tree_modified value and parent_modified
Raimund Renkert <raimund.renkert@intevation.de>
parents:
702
diff
changeset
|
53 if (value === '') { |
af16a257d5f6
Updated the model to have correct tree_modified value and parent_modified
Raimund Renkert <raimund.renkert@intevation.de>
parents:
702
diff
changeset
|
54 return null; |
af16a257d5f6
Updated the model to have correct tree_modified value and parent_modified
Raimund Renkert <raimund.renkert@intevation.de>
parents:
702
diff
changeset
|
55 } |
af16a257d5f6
Updated the model to have correct tree_modified value and parent_modified
Raimund Renkert <raimund.renkert@intevation.de>
parents:
702
diff
changeset
|
56 return value; |
af16a257d5f6
Updated the model to have correct tree_modified value and parent_modified
Raimund Renkert <raimund.renkert@intevation.de>
parents:
702
diff
changeset
|
57 } |
569 | 58 }], |
59 | |
60 idProperty: 'id', | |
61 | |
62 proxy: { | |
63 type: 'rest', | |
64 url: 'lada-server/status', | |
65 reader: { | |
66 type: 'json', | |
67 root: 'data' | |
68 } | |
69 } | |
70 }); |