Mercurial > lada > lada-client
changeset 301:7b30c20ad1aa
Use ts2date function from lib.Helpers. Remove old code
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Fri, 09 Aug 2013 15:23:59 +0200 |
parents | 66935692f4b9 |
children | c7f0bf80761b |
files | app/model/MKommentar.js |
diffstat | 1 files changed, 2 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/app/model/MKommentar.js Fri Aug 09 15:23:59 2013 +0200 +++ b/app/model/MKommentar.js Fri Aug 09 15:23:59 2013 +0200 @@ -1,12 +1,13 @@ Ext.define('Lada.model.MKommentar', { extend: 'Ext.data.Model', + requires: ['Lada.lib.Helpers'], fields: [ {name: "id"}, {name: "kid"}, {name: "messungsId"}, {name: "probeId"}, {name: "erzeuger"}, - {name: "kdatum", type: 'date', convert: ts2date, defaultValue: new Date()}, + {name: "kdatum", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()}, {name: "ktext"} ], idProperty: "id", @@ -26,8 +27,3 @@ return "/" + kid + "/" + messId + "/" + probeId; } }); - -function ts2date(v, record){ - // Converts a timestamp into a date object. - return new Date(v); -}