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

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


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

diff -r 1e1ee8abf91b -r 53a446d4f424 app/model/Kommentar.js
--- a/app/model/Kommentar.js	Fri Aug 09 15:22:09 2013 +0200
+++ b/app/model/Kommentar.js	Fri Aug 09 15:23:59 2013 +0200
@@ -1,10 +1,11 @@
 Ext.define('Lada.model.Kommentar', {
     extend: 'Ext.data.Model',
+    requires: ['Lada.lib.Helpers'],
     fields: [
         {name: "kId"},
         {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: "kId",
@@ -23,8 +24,3 @@
         return "/" + kid + "/" + probeId;
     }
 });
-
-function ts2date(v, record){
-    // Converts a timestamp into a date object.
-    return new Date(v);
-}


More information about the Lada-commits mailing list