comparison app/model/Ort.js @ 970:f4eb53ba63fc

Setting Timestamps the correct way. Before this commit the times of the instatiation of the model were used as default values, which led to wrong dates.
author Dustin Demuth <dustin@intevation.de>
date Mon, 16 Nov 2015 11:48:15 +0100
parents af16a257d5f6
children f73ca04d73a7
comparison
equal deleted inserted replaced
969:d4603049cd42 970:f4eb53ba63fc
35 convert: function(v) { 35 convert: function(v) {
36 if (!v) { 36 if (!v) {
37 return v; 37 return v;
38 } 38 }
39 return new Date(v); 39 return new Date(v);
40 }, 40 }
41 defaultValue: new Date()
42 }, { 41 }, {
43 name: 'treeModified', 42 name: 'treeModified',
44 serialize: function(value) { 43 serialize: function(value) {
45 if (value === '') { 44 if (value === '') {
46 return null; 45 return null;

http://lada.wald.intevation.org