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

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


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

diff -r 7b30c20ad1aa -r c7f0bf80761b app/model/Ortdetail.js
--- a/app/model/Ortdetail.js	Fri Aug 09 15:23:59 2013 +0200
+++ b/app/model/Ortdetail.js	Fri Aug 09 15:24:00 2013 +0200
@@ -1,5 +1,6 @@
 Ext.define('Lada.model.Ortdetail', {
     extend: 'Ext.data.Model',
+    requires: ['Lada.lib.Helpers'],
     fields: [
         {name: "ortId"},
         {name: "bezeichnung"},
@@ -9,7 +10,7 @@
         {name: "koordXExtern"},
         {name: "koordYExtern"},
         {name: "hoeheLand"},
-        {name: "letzteAenderung", type: 'date', convert: ts2date, defaultValue: new Date()},
+        {name: "letzteAenderung", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
         {name: "longitude", type: 'float'},
         {name: "latitude", type: 'float'},
         {name: "staatId"},
@@ -29,9 +30,3 @@
         }
     }
 });
-
-function ts2date(v, record){
-    // Converts a timestamp into a date object.
-    return new Date(v);
-}
-


More information about the Lada-commits mailing list