changeset 418:957a4a9fd260

Enabled multiselect for query filter. (Used as example in final workshop)
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 09 Oct 2013 15:02:06 +0200
parents a4eb98a6ea20
children 9c44ce52a33c
files app/controller/Sql.js
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/app/controller/Sql.js	Wed Oct 09 14:48:29 2013 +0200
+++ b/app/controller/Sql.js	Wed Oct 09 15:02:06 2013 +0200
@@ -92,6 +92,7 @@
             var type = filterFields[j].type;
             var name = filterFields[j].dataIndex;
             var label = filterFields[j].label;
+            var multi = filterFields[j].multiSelect;
             var field = null;
             if (type == "text") {
                 console.log("Found text filter");
@@ -107,19 +108,19 @@
                 field = Ext.create('Lada.view.widgets.Testdatensatz', { name: name, fieldLabel: label, emptyText: '' });
             } else if (type == "listmst") {
                 console.log("Found listmst filter");
-                field = Ext.create('Lada.view.widgets.Mst', { name: name, fieldLabel: label });
+                field = Ext.create('Lada.view.widgets.Mst', { name: name, fieldLabel: label, multiSelect: multi });
             } else if (type == "listumw") {
                 console.log("Found listumw filter");
-                field = Ext.create('Lada.view.widgets.Uwb', { name: name, fieldLabel: label });
+                field = Ext.create('Lada.view.widgets.Uwb', { name: name, fieldLabel: label, multiSelect: multi });
             } else if (type == "listdbasis") {
                 console.log("Found listdbasis filter");
-                field = Ext.create('Lada.view.widgets.Datenbasis', { name: name, fieldLabel: label });
+                field = Ext.create('Lada.view.widgets.Datenbasis', { name: name, fieldLabel: label, multiSelect: multi });
             } else if (type == "listver") {
                 console.log("Found listver filter");
-                field = Ext.create('Lada.view.widgets.Verwaltungseinheit', { name: name, fieldLabel: label });
+                field = Ext.create('Lada.view.widgets.Verwaltungseinheit', { name: name, fieldLabel: label, multiSelect: multi });
             } else if (type == "listnetz") {
                 console.log("Found listnetz filter");
-                field = Ext.create('Lada.view.widgets.Netzbetreiber', { name: name, fieldLabel: label });
+                field = Ext.create('Lada.view.widgets.Netzbetreiber', { name: name, fieldLabel: label, multiSelect: multi });
             }
             if (field) {
                 console.log("Pushing field to filters");

http://lada.wald.intevation.org