annotate app/model/MmtMessprogramm.js @ 1078:fe5fb960da9d

Handle edit and delete status for stammdaten objects.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 13 Apr 2016 13:55:39 +0200
parents f73ca04d73a7
children
rev   line source
745
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
2 * Software engineering by Intevation GmbH
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
3 *
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
4 * This file is Free Software under the GNU GPL (v>=3)
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
6 * the documentation coming with IMIS-Labordaten-Application for details.
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
7 */
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
8
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
9 /**
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
10 * A Messmethoden Messprogramm.
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
11 * This class represents and defines the model of a 'MmtMessprogramm'
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
12 **/
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
13 Ext.define('Lada.model.MmtMessprogramm', {
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
14 extend: 'Ext.data.Model',
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
15
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
16 fields: [{
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
17 name: 'id'
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
18 }, {
758
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents: 757
diff changeset
19 name: 'messprogrammId'
745
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
20 }, {
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
21 name: 'mmtId'
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
22 }, {
758
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents: 757
diff changeset
23 name: 'messgroessen',
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents: 757
diff changeset
24 defaultValue: []
745
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
25 }, {
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
26 name: 'letzteAenderung',
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
27 type: 'date',
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
28 convert: function(v) {
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
29 if (!v) {
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
30 return v;
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
31 }
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
32 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: 758
diff changeset
33 }
745
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
34 }],
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
35
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
36 idProperty: 'id',
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
37
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
38 proxy: {
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
39 type: 'rest',
999
f73ca04d73a7 Refactored Server URL
Dustin Demuth <dustin@intevation.de>
parents: 970
diff changeset
40 url: 'lada-server/rest/messprogrammmmt',
745
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
41 reader: {
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
42 type: 'json',
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
43 root: 'data'
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
44 }
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
45 }
756
f2db1ae1d012 Created a Messmethoden Combobox in a Messprogramme form without higher functionality.
Dustin Demuth <dustin@intevation.de>
parents: 745
diff changeset
46 });

http://lada.wald.intevation.org