diff app/model/MKommentar.js @ 301:7b30c20ad1aa

Use ts2date function from lib.Helpers. Remove old code
author Torsten Irländer <torsten.irlaender@intevation.de>
date Fri, 09 Aug 2013 15:23:59 +0200
parents d3f4a39bf89e
children 7de16725d251
line wrap: on
line diff
--- 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);
-}

http://lada.wald.intevation.org