comparison app/model/Messung.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 a2c2039bb5d9
children f73ca04d73a7
comparison
equal deleted inserted replaced
969:d4603049cd42 970:f4eb53ba63fc
38 convert: function(v) { 38 convert: function(v) {
39 if (!v) { 39 if (!v) {
40 return new Date(); 40 return new Date();
41 } 41 }
42 return new Date(v); 42 return new Date(v);
43 }, 43 }
44 defaultValue: new Date()
45 }, { 44 }, {
46 name: 'status' 45 name: 'status'
47 }, { 46 }, {
48 name: 'fertig', 47 name: 'fertig',
49 type: 'boolean' 48 type: 'boolean'
53 convert: function(v) { 52 convert: function(v) {
54 if (!v) { 53 if (!v) {
55 return new Date(); 54 return new Date();
56 } 55 }
57 return new Date(v); 56 return new Date(v);
58 }, 57 }
59 defaultValue: new Date()
60 }, { 58 }, {
61 name: 'geplant', 59 name: 'geplant',
62 type: 'boolean' 60 type: 'boolean'
63 }, { 61 }, {
64 name: 'messungsIdAlt' 62 name: 'messungsIdAlt'

http://lada.wald.intevation.org