changeset 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 59c1d9ad6555
children aeeb0f534411
files app/model/Zusatzwert.js
diffstat 1 files changed, 2 insertions(+), 10 deletions(-) [+]
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);
-}

http://lada.wald.intevation.org