[Lada-commits] [PATCH 19 of 56] Use ts2date function from lib.Helpers. Remove old code
Wald Commits
scm-commit at wald.intevation.org
Tue Aug 13 09:53:45 CEST 2013
# HG changeset patch
# User Torsten Irländer <torsten.irlaender at intevation.de>
# Date 1376054640 -7200
# Node ID eb483558bce4d8793c7f2a923f9cecf779361d42
# Parent c7f0bf80761bc0109eab3502601a7f02aafd4409
Use ts2date function from lib.Helpers. Remove old code
diff -r c7f0bf80761b -r eb483558bce4 app/model/Ort.js
--- a/app/model/Ort.js Fri Aug 09 15:24:00 2013 +0200
+++ b/app/model/Ort.js Fri Aug 09 15:24:00 2013 +0200
@@ -1,5 +1,6 @@
Ext.define('Lada.model.Ort', {
extend: 'Ext.data.Model',
+ requires: ['Lada.lib.Helpers'],
fields: [
// Field from the l_ort table
{name: "portId", type: 'int'},
@@ -7,7 +8,7 @@
{name: "probeId"},
{name: "ortsTyp"},
{name: "ortszusatztext"},
- {name: "letzteAenderung", type: 'date', convert: ts2date, defaultValue: new Date()}
+ {name: "letzteAenderung", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()}
],
idProperty: "portId",
proxy: {
@@ -27,8 +28,3 @@
return "/" + ortId + "/" + probeId;
}
});
-
-function ts2date(v, record){
- // Converts a timestamp into a date object.
- return new Date(v);
-}
More information about the Lada-commits
mailing list