comparison app/controller/Sql.js @ 499:8b4ec61c5752

Removed most log messages to make the application less verbose.
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 06 Nov 2014 11:12:21 +0100
parents 9fec6df13be8
children ad7f574b382a
comparison
equal deleted inserted replaced
498:c1b77fb96b01 499:8b4ec61c5752
28 'Queries', 28 'Queries',
29 'Info' 29 'Info'
30 ], 30 ],
31 31
32 init: function() { 32 init: function() {
33 console.log('Initialising the Sql controller');
34 this.control({ 33 this.control({
35 // CSS like selector to select element in the viewport. See 34 // CSS like selector to select element in the viewport. See
36 // ComponentQuery documentation for more details. 35 // ComponentQuery documentation for more details.
37 '#search': { 36 '#search': {
38 // Map Doubleclick on rows of the probenlist. 37 // Map Doubleclick on rows of the probenlist.
101 var name = filterFields[j].dataIndex; 100 var name = filterFields[j].dataIndex;
102 var label = filterFields[j].label; 101 var label = filterFields[j].label;
103 var multi = filterFields[j].multiSelect; 102 var multi = filterFields[j].multiSelect;
104 var field = null; 103 var field = null;
105 if (type == "text") { 104 if (type == "text") {
106 console.log("Found text filter");
107 field = Ext.create('Ext.form.field.Text', { 105 field = Ext.create('Ext.form.field.Text', {
108 name: name, 106 name: name,
109 fieldLabel: label 107 fieldLabel: label
110 }); 108 });
111 } 109 }
112 else if (type == "number") { 110 else if (type == "number") {
113 console.log("Found number filter");
114 field = Ext.create('Ext.form.field.Number', { 111 field = Ext.create('Ext.form.field.Number', {
115 name: name, 112 name: name,
116 fieldLabel: label 113 fieldLabel: label
117 }); 114 });
118 } 115 }
119 else if (type == "datetime") { 116 else if (type == "datetime") {
120 console.log("Found datetime filter");
121 field = Ext.create('Lada.view.widgets.Datetime', { 117 field = Ext.create('Lada.view.widgets.Datetime', {
122 name: name, 118 name: name,
123 fieldLabel: label 119 fieldLabel: label
124 }); 120 });
125 } 121 }
126 else if (type == "bool") { 122 else if (type == "bool") {
127 console.log("Found bool filter");
128 field = Ext.create('Lada.view.widgets.Testdatensatz', { 123 field = Ext.create('Lada.view.widgets.Testdatensatz', {
129 name: name, 124 name: name,
130 fieldLabel: label, 125 fieldLabel: label,
131 emptyText: '' 126 emptyText: ''
132 }); 127 });
133 } 128 }
134 else if (type == "listmst") { 129 else if (type == "listmst") {
135 console.log("Found listmst filter");
136 field = Ext.create('Lada.view.widgets.Mst', { 130 field = Ext.create('Lada.view.widgets.Mst', {
137 name: name, 131 name: name,
138 fieldLabel: label, 132 fieldLabel: label,
139 multiSelect: multi 133 multiSelect: multi
140 }); 134 });
141 } 135 }
142 else if (type == "listumw") { 136 else if (type == "listumw") {
143 console.log("Found listumw filter");
144 field = Ext.create('Lada.view.widgets.Uwb', { 137 field = Ext.create('Lada.view.widgets.Uwb', {
145 name: name, 138 name: name,
146 fieldLabel: label, 139 fieldLabel: label,
147 multiSelect: multi 140 multiSelect: multi
148 }); 141 });
149 } 142 }
150 else if (type == "listdbasis") { 143 else if (type == "listdbasis") {
151 console.log("Found listdbasis filter");
152 field = Ext.create('Lada.view.widgets.Datenbasis', { 144 field = Ext.create('Lada.view.widgets.Datenbasis', {
153 name: name, 145 name: name,
154 fieldLabel: label, 146 fieldLabel: label,
155 multiSelect: multi 147 multiSelect: multi
156 }); 148 });
157 } 149 }
158 else if (type == "listver") { 150 else if (type == "listver") {
159 console.log("Found listver filter");
160 field = Ext.create('Lada.view.widgets.Verwaltungseinheit', { 151 field = Ext.create('Lada.view.widgets.Verwaltungseinheit', {
161 name: name, 152 name: name,
162 fieldLabel: label, 153 fieldLabel: label,
163 multiSelect: multi 154 multiSelect: multi
164 }); 155 });
165 } 156 }
166 else if (type == "listnetz") { 157 else if (type == "listnetz") {
167 console.log("Found listnetz filter");
168 field = Ext.create('Lada.view.widgets.Netzbetreiber', { 158 field = Ext.create('Lada.view.widgets.Netzbetreiber', {
169 name: name, 159 name: name,
170 fieldLabel: label, 160 fieldLabel: label,
171 multiSelect: multi 161 multiSelect: multi
172 }); 162 });
173 } 163 }
174 if (field) { 164 if (field) {
175 console.log("Pushing field to filters");
176 filters.add(field); 165 filters.add(field);
177 filters.show(); 166 filters.show();
178 hide = false; 167 hide = false;
179 } 168 }
180 } 169 }
205 searchParams[filter.getName()] = value; 194 searchParams[filter.getName()] = value;
206 } 195 }
207 result.getStore().load({ 196 result.getStore().load({
208 params: searchParams 197 params: searchParams
209 }); 198 });
210 console.log('Store loaded');
211 result.show(); 199 result.show();
212 }, 200 },
213 201
214 reset: function(element, record, index) { 202 reset: function(element, record, index) {
215 var buttons = Ext.getCmp('SearchBtnPanel'); 203 var buttons = Ext.getCmp('SearchBtnPanel');

http://lada.wald.intevation.org