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

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


# HG changeset patch
# User Torsten Irländer <torsten.irlaender at intevation.de>
# Date 1376054639 -7200
# Node ID 7b30c20ad1aac79ca60c4be413f659fc5c5bde6c
# Parent  66935692f4b9f8dc82281b49250479d87ff7a964
Use ts2date function from lib.Helpers. Remove old code

diff -r 66935692f4b9 -r 7b30c20ad1aa app/model/MKommentar.js
--- 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);
-}


More information about the Lada-commits mailing list