annotate app/model/Status.js @ 1399:78839fe4b9b7 release-2.5

Do not set a default value for messzeitpunkt in messung.
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 16 Mar 2017 14:44:04 +0100
parents 4270da0f7d3b
children
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 }, {
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',
965
a2c2039bb5d9 Disabled StatusGrid Edit when StatusEdit ist false, Load StatuswerteStore differently, removed a bunch of trailing commas
Dustin Demuth <dustin@intevation.de>
parents: 956
diff changeset
23 type: 'boolean'
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
24 }, {
569
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
25 name: 'messungsId'
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
26 }, {
1217
4270da0f7d3b Merged branch schema-update into default.
Tom Gottfried <tom@intevation.de>
parents: 1020
diff changeset
27 name: 'mstId'
4270da0f7d3b Merged branch schema-update into default.
Tom Gottfried <tom@intevation.de>
parents: 1020
diff changeset
28 }, {
4270da0f7d3b Merged branch schema-update into default.
Tom Gottfried <tom@intevation.de>
parents: 1020
diff changeset
29 name: 'statusKombi',
4270da0f7d3b Merged branch schema-update into default.
Tom Gottfried <tom@intevation.de>
parents: 1020
diff changeset
30 type: 'int'
4270da0f7d3b Merged branch schema-update into default.
Tom Gottfried <tom@intevation.de>
parents: 1020
diff changeset
31 }, {
4270da0f7d3b Merged branch schema-update into default.
Tom Gottfried <tom@intevation.de>
parents: 1020
diff changeset
32 name: 'statusWert',
4270da0f7d3b Merged branch schema-update into default.
Tom Gottfried <tom@intevation.de>
parents: 1020
diff changeset
33 persist: false
593
9b3adfb7b1ae Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 569
diff changeset
34 }, {
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
35 name: 'statusStufe',
1217
4270da0f7d3b Merged branch schema-update into default.
Tom Gottfried <tom@intevation.de>
parents: 1020
diff changeset
36 persist: false
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
37 }, {
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 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
39 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
40 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
41 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
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 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
44 }
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 }, {
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 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
47 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
48 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
49 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
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 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
52 }
023e622f9551 Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents: 711
diff changeset
53 }, {
023e622f9551 Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents: 711
diff changeset
54 name: 'datum',
593
9b3adfb7b1ae Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 569
diff changeset
55 type: 'date',
9b3adfb7b1ae Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 569
diff changeset
56 convert: function(v) {
9b3adfb7b1ae Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 569
diff changeset
57 if (!v) {
9b3adfb7b1ae Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 569
diff changeset
58 return v;
9b3adfb7b1ae Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 569
diff changeset
59 }
9b3adfb7b1ae Updated status model.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 569
diff changeset
60 return new Date(v);
970
f4eb53ba63fc Setting Timestamps the correct way. Before this commit the times of the instatiation of the model were used as default values, which led to wrong dates.
Dustin Demuth <dustin@intevation.de>
parents: 965
diff changeset
61 }
569
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
62 }, {
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
63 name: 'text'
569
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
64 }],
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
65
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
66 idProperty: 'id',
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
67
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
68 proxy: {
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
69 type: 'rest',
999
f73ca04d73a7 Refactored Server URL
Dustin Demuth <dustin@intevation.de>
parents: 970
diff changeset
70 url: 'lada-server/rest/status',
569
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
71 reader: {
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
72 type: 'json',
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
73 root: 'data'
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
74 }
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
75 }
d9593b520b3b Added a model for Status
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
76 });

http://lada.wald.intevation.org