Mercurial > lada > lada-client
diff app/model/Zusatzwert.js @ 309:51897f9a6bbb
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 | dee9da79f055 |
children | 83db862d0f3f |
line wrap: on
line diff
--- a/app/model/Zusatzwert.js Fri Aug 09 15:24:00 2013 +0200 +++ b/app/model/Zusatzwert.js Fri Aug 09 15:24:00 2013 +0200 @@ -1,12 +1,13 @@ Ext.define('Lada.model.Zusatzwert', { extend: 'Ext.data.Model', + requires: ['Lada.lib.Helpers'], fields: [ {name: "pzsId"}, {name: "probeId"}, {name: "nwgZuMesswert", type: 'float'}, {name: "messwertPzs", type: 'float'}, {name: "messfehler", type: 'float'}, - {name: "letzteAenderung", type: 'date', convert: ts2date, defaultValue: new Date()} + {name: "letzteAenderung", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()} ], idProperty: "pzsId", proxy: { @@ -35,12 +36,3 @@ return record.get('einheit'); } }); - -function buildId(v, record){ - return record.get('probeId') + ',' + record.get('pzsId'); -} - -function ts2date(v, record){ - // Converts a timestamp into a date object. - return new Date(v); -}