[Lada-commits] [PATCH] Enabled multiselect for query filter. (Used as example in final workshop)

Wald Commits scm-commit at wald.intevation.org
Wed Oct 9 14:58:32 CEST 2013


# HG changeset patch
# User Raimund Renkert <rrenkert at intevation.de>
# Date 1381323726 -7200
# Node ID 957a4a9fd260e6b78736a95677cdebd5bf256eec
# Parent  a4eb98a6ea20237d644d89319323318871fd4915
Enabled multiselect for query filter. (Used as example in final workshop)

diff -r a4eb98a6ea20 -r 957a4a9fd260 app/controller/Sql.js
--- 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");


More information about the Lada-commits mailing list