comparison app/model/Probe.js @ 927:a1783726d43e

Serialize empty solldatum values to 'null'.
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 11 Sep 2015 14:33:11 +0200
parents c75f13578315
children f4eb53ba63fc
comparison
equal deleted inserted replaced
926:c75f13578315 927:a1783726d43e
102 convert: function(v) { 102 convert: function(v) {
103 if (!v) { 103 if (!v) {
104 return v; 104 return v;
105 } 105 }
106 return new Date(v); 106 return new Date(v);
107 },
108 serialize: function(value) {
109 if (value === '') {
110 return null;
111 }
112 return value;
107 } 113 }
108 }, { 114 }, {
109 name: 'solldatumEnde', 115 name: 'solldatumEnde',
110 type: 'date', 116 type: 'date',
111 convert: function(v) { 117 convert: function(v) {
112 if (!v) { 118 if (!v) {
113 return v; 119 return v;
114 } 120 }
115 return new Date(v); 121 return new Date(v);
122 },
123 serialize: function(value) {
124 if (value === '') {
125 return null;
126 }
127 return value;
116 } 128 }
117 }, { 129 }, {
118 name: 'readonly', 130 name: 'readonly',
119 type: 'boolean', 131 type: 'boolean',
120 persist: false 132 persist: false

http://lada.wald.intevation.org