[Lada-commits] [PATCH 25 of 56] Use ts2date function from lib.Helpers. Remove old code

Wald Commits scm-commit at wald.intevation.org
Tue Aug 13 09:53:51 CEST 2013


# HG changeset patch
# User Torsten Irländer <torsten.irlaender at intevation.de>
# Date 1376054640 -7200
# Node ID 51897f9a6bbb89447bf25d5d9051c52261149070
# Parent  59c1d9ad655511070e584386ea4aeaf018383724
Use ts2date function from lib.Helpers. Remove old code

diff -r 59c1d9ad6555 -r 51897f9a6bbb app/model/Zusatzwert.js
--- 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);
-}


More information about the Lada-commits mailing list