comparison app/controller/Sql.js @ 97:9a549ca6e664

Only getTimte from datefield if the value is not null.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Fri, 14 Jun 2013 15:53:21 +0200
parents ecb0c0cf386b
children 19eab475bbe5
comparison
equal deleted inserted replaced
96:ecb0c0cf386b 97:9a549ca6e664
61 if (uwb !== null) { 61 if (uwb !== null) {
62 searchParams['uwb'] = uwb; 62 searchParams['uwb'] = uwb;
63 } 63 }
64 } else { 64 } else {
65 // Get date object an convert it into a timestamp (ms since epoch) 65 // Get date object an convert it into a timestamp (ms since epoch)
66 var ts = Ext.getCmp('pbegin').getValue().getTime(); 66 var datefield = Ext.getCmp('pbegin').getValue();
67 if (ts !== null) { 67 if (datefield !== null) {
68 var ts = Ext.getCmp('pbegin').getValue().getTime();
68 searchParams['begin'] = ts; 69 searchParams['begin'] = ts;
69 } 70 }
70 } 71 }
71 result.getStore().load({ 72 result.getStore().load({
72 params: searchParams 73 params: searchParams

http://lada.wald.intevation.org