annotate app/model/Ort.js @ 481:e45f4df57938

Set typeAhead to false. Causes errors.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Tue, 21 Jan 2014 17:04:19 +0100
parents debfcc7713e3
children f7446ebfe5d0
rev   line source
472
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 331
diff changeset
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 331
diff changeset
2 * Software engineering by Intevation GmbH
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 331
diff changeset
3 *
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 331
diff changeset
4 * This file is Free Software under the GNU GPL (v>=3)
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 331
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 331
diff changeset
6 * the documentation coming with IMIS-Labordaten-Application for details.
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 331
diff changeset
7 */
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 331
diff changeset
8
318
0a5f6db02965 Added docstring
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 303
diff changeset
9 /**
0a5f6db02965 Added docstring
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 303
diff changeset
10 * Model class for Ort
0a5f6db02965 Added docstring
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 303
diff changeset
11 */
94
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
12 Ext.define('Lada.model.Ort', {
331
78491fbae8d3 Inherit form model.base. Formatting
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 318
diff changeset
13 extend: 'Lada.model.Base',
94
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
14 fields: [
149
26ac4c99f8c4 Added Orte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 105
diff changeset
15 // Field from the l_ort table
26ac4c99f8c4 Added Orte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 105
diff changeset
16 {name: "portId", type: 'int'},
26ac4c99f8c4 Added Orte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 105
diff changeset
17 {name: "ortId", type: 'int'},
26ac4c99f8c4 Added Orte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 105
diff changeset
18 {name: "probeId"},
26ac4c99f8c4 Added Orte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 105
diff changeset
19 {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
20 {name: "ortszusatztext"},
303
eb483558bce4 Use ts2date function from lib.Helpers. Remove old code
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 217
diff changeset
21 {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
22 ],
149
26ac4c99f8c4 Added Orte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 105
diff changeset
23 idProperty: "portId",
94
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
24 proxy: {
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
25 type: 'rest',
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
26 appendId: true, //default
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
27 url: 'server/rest/ort',
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
28 api: {
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
29 },
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
30 reader: {
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
31 type: 'json',
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
32 root: 'data'
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
33 }
217
4db982514a5f Fixed issue21
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 154
diff changeset
34 },
4db982514a5f Fixed issue21
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 154
diff changeset
35 getEidi: function() {
4db982514a5f Fixed issue21
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 154
diff changeset
36 var ortId = this.get('portId');
4db982514a5f Fixed issue21
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 154
diff changeset
37 var probeId = this.get('probeId');
4db982514a5f Fixed issue21
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 154
diff changeset
38 return "/" + ortId + "/" + probeId;
94
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
39 }
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
40 });

http://lada.wald.intevation.org