Mercurial > lada > lada-client
changeset 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 | 7b30c20ad1aa |
children | eb483558bce4 |
files | app/model/Ortdetail.js |
diffstat | 1 files changed, 2 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/app/model/Ortdetail.js Fri Aug 09 15:23:59 2013 +0200 +++ b/app/model/Ortdetail.js Fri Aug 09 15:24:00 2013 +0200 @@ -1,5 +1,6 @@ Ext.define('Lada.model.Ortdetail', { extend: 'Ext.data.Model', + requires: ['Lada.lib.Helpers'], fields: [ {name: "ortId"}, {name: "bezeichnung"}, @@ -9,7 +10,7 @@ {name: "koordXExtern"}, {name: "koordYExtern"}, {name: "hoeheLand"}, - {name: "letzteAenderung", type: 'date', convert: ts2date, defaultValue: new Date()}, + {name: "letzteAenderung", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()}, {name: "longitude", type: 'float'}, {name: "latitude", type: 'float'}, {name: "staatId"}, @@ -29,9 +30,3 @@ } } }); - -function ts2date(v, record){ - // Converts a timestamp into a date object. - return new Date(v); -} -