Mercurial > lada > lada-client
diff app/model/Staat.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 | 5f373d9d55cd |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/model/Staat.js Tue Jul 02 14:08:18 2013 +0200 @@ -0,0 +1,26 @@ +Ext.define('Lada.model.Staat', { + extend: 'Ext.data.Model', + fields: [ + {name: "staatId", type: 'int'}, + {name: "staat"}, + {name: "staatIso"}, + {name: "staatKurz"} + ], + idProperty: "staatId", + proxy: { + type: 'rest', + appendId: true, //default + url: 'server/rest/staat', + api: { + }, + reader: { + type: 'json', + root: 'data' + } + } +}); + +function ts2date(v, record){ + // Converts a timestamp into a date object. + return new Date(v); +}