Mercurial > lada > lada-client
comparison app/controller/Sql.js @ 378:d001e88affde
Fixed building searchparams support empty selection in multiselect.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Mon, 26 Aug 2013 12:13:26 +0200 |
parents | 1327dd6ec246 |
children | 00bf2d4f3bd1 |
comparison
equal
deleted
inserted
replaced
377:132c7b086fd5 | 378:d001e88affde |
---|---|
139 var searchParams = {}; | 139 var searchParams = {}; |
140 searchParams['qid'] = search.getValue(); | 140 searchParams['qid'] = search.getValue(); |
141 for (var i = filters.items.length - 1; i >= 0; i--){ | 141 for (var i = filters.items.length - 1; i >= 0; i--){ |
142 var filter = filters.items.items[i]; | 142 var filter = filters.items.items[i]; |
143 var value = filter.getValue(); | 143 var value = filter.getValue(); |
144 searchParams[filter.getName()] = filter.getValue(); | 144 if (value instanceof Array) { |
145 value = value.join(","); | |
146 } | |
147 searchParams[filter.getName()] = value; | |
145 } | 148 } |
146 console.log('Loading store with the following search params: ' + searchParams); | 149 console.log('Loading store with the following search params: ' + searchParams); |
147 result.getStore().load({ | 150 result.getStore().load({ |
148 params: searchParams | 151 params: searchParams |
149 }); | 152 }); |