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

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


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

diff -r 5f373d9d55cd -r 59c1d9ad6555 app/model/Status.js
--- a/app/model/Status.js	Fri Aug 09 15:24:00 2013 +0200
+++ b/app/model/Status.js	Fri Aug 09 15:24:00 2013 +0200
@@ -1,12 +1,13 @@
 Ext.define('Lada.model.Status', {
     extend: 'Ext.data.Model',
+    requires: ['Lada.lib.Helpers'],
     fields: [
         {name: "sid"},
         {name: "messungsId"},
         {name: "probeId"},
         {name: "erzeuger"},
         {name: "status", defaultValue: 1},
-        {name: "sdatum", type: 'date', convert: ts2date, defaultValue: new Date()},
+        {name: "sdatum", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
         {name: "skommentar"}
     ],
     idProperty: "sid",
@@ -26,8 +27,3 @@
         return "/" + sid + "/" + messId + "/" + probeId;
     }
 });
-
-function ts2date(v, record){
-    // Converts a timestamp into a date object.
-    return new Date(v);
-}


More information about the Lada-commits mailing list