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
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
2 * Software engineering by Intevation GmbH
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
3 *
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
4 * This file is Free Software under the GNU GPL (v>=3)
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
6 * the documentation coming with IMIS-Labordaten-Application for details.
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
7 */
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
8
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
9 /**
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
10 * Model class for Status
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
11 */
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
12 Ext.define('Lada.model.Status', {
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
13 extend: 'Ext.data.Model',
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
14
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
15 fields: [{
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
16 name: 'id'
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
17 }, {
691
c5b8896768a2 Added Owner to Model
Dustin Demuth <dustin@intevation.de>
parents: 593
diff changeset
18 name: 'owner',
c5b8896768a2 Added Owner to Model
Dustin Demuth <dustin@intevation.de>
parents: 593
diff changeset
19 type: 'boolean'
c5b8896768a2 Added Owner to Model
Dustin Demuth <dustin@intevation.de>
parents: 593
diff changeset
20 }, {
569
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
21 name: 'messungsId'
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
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
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
25 name: 'status'
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
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
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
36 }, {
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
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
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
40 }],
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
41
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
42 idProperty: 'id',
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
43
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
44 proxy: {
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
45 type: 'rest',
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
46 url: 'lada-server/status',
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
47 reader: {
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
48 type: 'json',
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
49 root: 'data'
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
50 }
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
51 }
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
52 });

http://lada.wald.intevation.org