comparison app/model/Ort.js @ 488:f7446ebfe5d0

Added and updated models.
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 31 Oct 2014 21:10:35 +0100
parents debfcc7713e3
children 850ccfe5f3c4
comparison
equal deleted inserted replaced
487:a05cbc6e63cb 488:f7446ebfe5d0
10 * Model class for Ort 10 * Model class for Ort
11 */ 11 */
12 Ext.define('Lada.model.Ort', { 12 Ext.define('Lada.model.Ort', {
13 extend: 'Lada.model.Base', 13 extend: 'Lada.model.Base',
14 fields: [ 14 fields: [
15 // Field from the l_ort table 15 {name: "id", type: 'int'},
16 {name: "portId", type: 'int'},
17 {name: "ortId", type: 'int'}, 16 {name: "ortId", type: 'int'},
18 {name: "probeId"}, 17 {name: "probeId"},
19 {name: "ortsTyp"}, 18 {name: "ortsTyp"},
20 {name: "ortszusatztext"}, 19 {name: "ortszusatztext"},
21 {name: "letzteAenderung", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()} 20 {name: "letzteAenderung", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()}
22 ], 21 ],
23 idProperty: "portId", 22 idProperty: "id",
24 proxy: { 23 proxy: {
25 type: 'rest', 24 type: 'rest',
26 appendId: true, //default
27 url: 'server/rest/ort', 25 url: 'server/rest/ort',
28 api: {
29 },
30 reader: { 26 reader: {
31 type: 'json', 27 type: 'json',
32 root: 'data' 28 root: 'data'
33 } 29 }
34 },
35 getEidi: function() {
36 var ortId = this.get('portId');
37 var probeId = this.get('probeId');
38 return "/" + ortId + "/" + probeId;
39 } 30 }
40 }); 31 });

http://lada.wald.intevation.org