comparison app/model/Messwert.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 19b78162e128 f73ca04d73a7
comparison
equal deleted inserted replaced
969:d4603049cd42 970:f4eb53ba63fc
47 convert: function(v) { 47 convert: function(v) {
48 if (!v) { 48 if (!v) {
49 return new Date(); 49 return new Date();
50 } 50 }
51 return new Date(v); 51 return new Date(v);
52 }, 52 }
53 defaultValue: new Date()
54 }, { 53 }, {
55 name: 'treeModified', 54 name: 'treeModified',
56 serialize: function(value) { 55 serialize: function(value) {
57 if (value === '') { 56 if (value === '') {
58 return null; 57 return null;

http://lada.wald.intevation.org