comparison app/model/Ortdetail.js @ 302:c7f0bf80761b

Use ts2date function from lib.Helpers. Remove old code
author Torsten Irländer <torsten.irlaender@intevation.de>
date Fri, 09 Aug 2013 15:24:00 +0200
parents 16ba7e2465fd
children 18e090d09023
comparison
equal deleted inserted replaced
301:7b30c20ad1aa 302:c7f0bf80761b
1 Ext.define('Lada.model.Ortdetail', { 1 Ext.define('Lada.model.Ortdetail', {
2 extend: 'Ext.data.Model', 2 extend: 'Ext.data.Model',
3 requires: ['Lada.lib.Helpers'],
3 fields: [ 4 fields: [
4 {name: "ortId"}, 5 {name: "ortId"},
5 {name: "bezeichnung"}, 6 {name: "bezeichnung"},
6 {name: "beschreibung"}, 7 {name: "beschreibung"},
7 {name: "unscharf"}, 8 {name: "unscharf"},
8 {name: "nutsCode"}, 9 {name: "nutsCode"},
9 {name: "koordXExtern"}, 10 {name: "koordXExtern"},
10 {name: "koordYExtern"}, 11 {name: "koordYExtern"},
11 {name: "hoeheLand"}, 12 {name: "hoeheLand"},
12 {name: "letzteAenderung", type: 'date', convert: ts2date, defaultValue: new Date()}, 13 {name: "letzteAenderung", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
13 {name: "longitude", type: 'float'}, 14 {name: "longitude", type: 'float'},
14 {name: "latitude", type: 'float'}, 15 {name: "latitude", type: 'float'},
15 {name: "staatId"}, 16 {name: "staatId"},
16 {name: "gemId"}, 17 {name: "gemId"},
17 {name: "otyp"} 18 {name: "otyp"}
27 type: 'json', 28 type: 'json',
28 root: 'data' 29 root: 'data'
29 } 30 }
30 } 31 }
31 }); 32 });
32
33 function ts2date(v, record){
34 // Converts a timestamp into a date object.
35 return new Date(v);
36 }
37

http://lada.wald.intevation.org