Mercurial > lada > lada-client
diff app/model/Ort.js @ 303:eb483558bce4
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 | 4db982514a5f |
children | 0a5f6db02965 |
line wrap: on
line diff
--- a/app/model/Ort.js Fri Aug 09 15:24:00 2013 +0200 +++ b/app/model/Ort.js Fri Aug 09 15:24:00 2013 +0200 @@ -1,5 +1,6 @@ Ext.define('Lada.model.Ort', { extend: 'Ext.data.Model', + requires: ['Lada.lib.Helpers'], fields: [ // Field from the l_ort table {name: "portId", type: 'int'}, @@ -7,7 +8,7 @@ {name: "probeId"}, {name: "ortsTyp"}, {name: "ortszusatztext"}, - {name: "letzteAenderung", type: 'date', convert: ts2date, defaultValue: new Date()} + {name: "letzteAenderung", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()} ], idProperty: "portId", proxy: { @@ -27,8 +28,3 @@ return "/" + ortId + "/" + probeId; } }); - -function ts2date(v, record){ - // Converts a timestamp into a date object. - return new Date(v); -}