Mercurial > lada > lada-client
comparison app/controller/Sql.js @ 375:1327dd6ec246
Added more search filters.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Fri, 23 Aug 2013 10:14:36 +0200 |
parents | 832e3c8f9191 |
children | d001e88affde |
comparison
equal
deleted
inserted
replaced
374:832e3c8f9191 | 375:1327dd6ec246 |
---|---|
66 // | 66 // |
67 // Allowed types are | 67 // Allowed types are |
68 // * text | 68 // * text |
69 // * number | 69 // * number |
70 // * datetime | 70 // * datetime |
71 // * bool | |
71 // * listmst | 72 // * listmst |
72 // * listumw | 73 // * listumw |
74 // * listver | |
75 // * listdbasis | |
76 // * listnetz | |
73 // | 77 // |
74 // Iterate over all configured filters and add filters dynamically | 78 // Iterate over all configured filters and add filters dynamically |
75 // | 79 // |
76 // 1. Empty filters | 80 // 1. Empty filters |
77 filters.removeAll(); | 81 filters.removeAll(); |
89 console.log("Found number filter"); | 93 console.log("Found number filter"); |
90 field = Ext.create('Ext.form.field.Number', { name: name, fieldLabel: label }); | 94 field = Ext.create('Ext.form.field.Number', { name: name, fieldLabel: label }); |
91 } else if (type == "datetime") { | 95 } else if (type == "datetime") { |
92 console.log("Found datetime filter"); | 96 console.log("Found datetime filter"); |
93 field = Ext.create('Lada.view.widgets.Datetime', { name: name, fieldLabel: label }); | 97 field = Ext.create('Lada.view.widgets.Datetime', { name: name, fieldLabel: label }); |
98 } else if (type == "bool") { | |
99 console.log("Found bool filter"); | |
100 field = Ext.create('Lada.view.widgets.Testdatensatz', { name: name, fieldLabel: label, emptyText: '' }); | |
94 } else if (type == "listmst") { | 101 } else if (type == "listmst") { |
95 console.log("Found listmst filter"); | 102 console.log("Found listmst filter"); |
96 field = Ext.create('Lada.view.widgets.Mst', { name: name, fieldLabel: label }); | 103 field = Ext.create('Lada.view.widgets.Mst', { name: name, fieldLabel: label, multiSelect: true }); |
97 } else if (type == "listumw") { | 104 } else if (type == "listumw") { |
98 console.log("Found listumw filter"); | 105 console.log("Found listumw filter"); |
99 field = Ext.create('Lada.view.widgets.Uwb', { name: name, fieldLabel: label }); | 106 field = Ext.create('Lada.view.widgets.Uwb', { name: name, fieldLabel: label, multiSelect: true }); |
107 } else if (type == "listdbasis") { | |
108 console.log("Found listdbasis filter"); | |
109 field = Ext.create('Lada.view.widgets.Datenbasis', { name: name, fieldLabel: label, multiSelect: true }); | |
110 } else if (type == "listver") { | |
111 console.log("Found listver filter"); | |
112 field = Ext.create('Lada.view.widgets.Verwaltungseinheit', { name: name, fieldLabel: label, multiSelect: true }); | |
113 } else if (type == "listnetz") { | |
114 console.log("Found listnetz filter"); | |
115 field = Ext.create('Lada.view.widgets.Netzbetreiber', { name: name, fieldLabel: label, multiSelect: true }); | |
100 } | 116 } |
101 if (field) { | 117 if (field) { |
102 console.log("Pushing field to filters"); | 118 console.log("Pushing field to filters"); |
103 filters.add(field); | 119 filters.add(field); |
104 filters.show(); | 120 filters.show(); |