[Lada-commits] [PATCH] Fixed building searchparams support empty selection in multiselect

Wald Commits scm-commit at wald.intevation.org
Mon Aug 26 12:14:54 CEST 2013


# HG changeset patch
# User Torsten Irländer <torsten.irlaender at intevation.de>
# Date 1377512006 -7200
# Node ID d001e88affde4e7e825c28323891a8f21e8d7c3f
# Parent  132c7b086fd5dd2209b8ecd2bb280b70aba51ce5
Fixed building searchparams support empty selection in multiselect.

diff -r 132c7b086fd5 -r d001e88affde app/controller/Sql.js
--- a/app/controller/Sql.js	Fri Aug 23 12:58:52 2013 +0200
+++ b/app/controller/Sql.js	Mon Aug 26 12:13:26 2013 +0200
@@ -141,7 +141,10 @@
         for (var i = filters.items.length - 1; i >= 0; i--){
             var filter = filters.items.items[i];
             var value = filter.getValue();
-            searchParams[filter.getName()] = filter.getValue();
+            if (value instanceof Array) {
+                value = value.join(",");
+            }
+            searchParams[filter.getName()] = value;
         }
         console.log('Loading store with the following search params: ' + searchParams);
         result.getStore().load({


More information about the Lada-commits mailing list