comparison app/model/Ort.js @ 94:21c069e2ecdb

Added Orte to the Proben edit window
author Torsten Irländer <torsten.irlaender@intevation.de>
date Thu, 13 Jun 2013 14:24:18 +0200
parents
children 7ad96e3d70c1
comparison
equal deleted inserted replaced
93:ab067fdb91b5 94:21c069e2ecdb
1 Ext.define('Lada.model.Ort', {
2 extend: 'Ext.data.Model',
3 fields: [
4 {name: "ort"},
5 {name: "ortId", mapping:"ort.ortId", type: 'int'},
6 {name: "otyp", mapping:"ort.otyp"},
7 {name: "bezeichnung", mapping:"ort.bezeichnung"},
8 {name: "beschreibung", mapping:"ort.beschreibung"},
9 {name: "unscharf", mapping:"ort.unscharf"},
10 {name: "nutsCode", mapping:"ort.nutsCode"},
11 {name: "koordXExtern", mapping:"ort.koordXExtern"},
12 {name: "koordYExtern", mapping:"ort.koordYExtern"},
13 {name: "hoeheLand", mapping:"ort.hoeheLand", type: 'float'},
14 {name: "letzteAenderung", mapping:"ort.letzteAenderung", type: 'date', convert: ts2date, defaultValue: new Date()},
15 {name: "latitude", mapping:"ort.latitude", type: 'float'},
16 {name: "longitude", mapping:"ort.longitude", type: 'float'}
17 ],
18 idProperty: "ortId",
19 proxy: {
20 type: 'rest',
21 appendId: true, //default
22 url: 'server/rest/ort',
23 api: {
24 },
25 reader: {
26 type: 'json',
27 root: 'data'
28 }
29 }
30 });
31
32 function ts2date(v, record){
33 // Converts a timestamp into a date object.
34 return new Date(v);
35 }

http://lada.wald.intevation.org