diff app/model/Ortdetail.js @ 153:e9fb4814153a

Added files for Staat, Ort and Verwaltungseinheiten.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Tue, 02 Jul 2013 14:08:18 +0200
parents
children 16ba7e2465fd
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/Ortdetail.js	Tue Jul 02 14:08:18 2013 +0200
@@ -0,0 +1,37 @@
+Ext.define('Lada.model.Ortdetail', {
+    extend: 'Ext.data.Model',
+    fields: [
+        {name: "ortId"},
+        {name: "bezeichnung"},
+        {name: "beschreibung"},
+        {name: "usnscharf"},
+        {name: "nutsCode"},
+        {name: "koordXExtern"},
+        {name: "koordYExtern"},
+        {name: "hoeheLand"},
+        {name: "letzteAenderung", type: 'date', convert: ts2date, defaultValue: new Date()},
+        {name: "longitude", type: 'float'},
+        {name: "latitude", type: 'float'},
+        {name: "staatId"},
+        {name: "gemId"},
+        {name: "oTyp"}
+    ],
+    idProperty: "ortId",
+    proxy: {
+        type: 'rest',
+        appendId: true, //default
+        url: 'server/rest/ortinfo',
+        api: {
+        },
+        reader: {
+            type: 'json',
+            root: 'data'
+        }
+    }
+});
+
+function ts2date(v, record){
+    // Converts a timestamp into a date object.
+    return new Date(v);
+}
+

http://lada.wald.intevation.org