annotate app/model/Ort.js @ 322:49a42c7f1d1f

Added docstring
author Torsten Irländer <torsten.irlaender@intevation.de>
date Tue, 13 Aug 2013 08:05:33 +0200
parents 0a5f6db02965
children 78491fbae8d3
rev   line source
318
0a5f6db02965 Added docstring
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 303
diff changeset
1 /**
0a5f6db02965 Added docstring
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 303
diff changeset
2 * Model class for Ort
0a5f6db02965 Added docstring
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 303
diff changeset
3 */
94
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
4 Ext.define('Lada.model.Ort', {
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
5 extend: 'Ext.data.Model',
303
eb483558bce4 Use ts2date function from lib.Helpers. Remove old code
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 217
diff changeset
6 requires: ['Lada.lib.Helpers'],
94
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
7 fields: [
149
26ac4c99f8c4 Added Orte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 105
diff changeset
8 // Field from the l_ort table
26ac4c99f8c4 Added Orte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 105
diff changeset
9 {name: "portId", type: 'int'},
26ac4c99f8c4 Added Orte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 105
diff changeset
10 {name: "ortId", type: 'int'},
26ac4c99f8c4 Added Orte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 105
diff changeset
11 {name: "probeId"},
26ac4c99f8c4 Added Orte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 105
diff changeset
12 {name: "ortsTyp"},
154
16ba7e2465fd Implemented creating and editing new l_ort. Created editing orte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 149
diff changeset
13 {name: "ortszusatztext"},
303
eb483558bce4 Use ts2date function from lib.Helpers. Remove old code
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 217
diff changeset
14 {name: "letzteAenderung", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()}
94
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
15 ],
149
26ac4c99f8c4 Added Orte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 105
diff changeset
16 idProperty: "portId",
94
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
17 proxy: {
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
18 type: 'rest',
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
19 appendId: true, //default
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
20 url: 'server/rest/ort',
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
21 api: {
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
22 },
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
23 reader: {
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
24 type: 'json',
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
25 root: 'data'
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
26 }
217
4db982514a5f Fixed issue21
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 154
diff changeset
27 },
4db982514a5f Fixed issue21
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 154
diff changeset
28 getEidi: function() {
4db982514a5f Fixed issue21
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 154
diff changeset
29 var ortId = this.get('portId');
4db982514a5f Fixed issue21
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 154
diff changeset
30 var probeId = this.get('probeId');
4db982514a5f Fixed issue21
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 154
diff changeset
31 return "/" + ortId + "/" + probeId;
94
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
32 }
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
33 });

http://lada.wald.intevation.org