comparison app/controller/Sql.js @ 252:1bce2d59b7e9

Update description and sql statement when chosing another query
author Torsten Irländer <torsten.irlaender@intevation.de>
date Wed, 24 Jul 2013 15:24:23 +0200
parents d79b3bab600c
children 424f18da3c64
comparison
equal deleted inserted replaced
251:d79b3bab600c 252:1bce2d59b7e9
31 console.log('The panel was rendered'); 31 console.log('The panel was rendered');
32 }, 32 },
33 selectSql: function(element, record, index) { 33 selectSql: function(element, record, index) {
34 var result = Ext.getCmp('result'); 34 var result = Ext.getCmp('result');
35 var filters = Ext.getCmp('queryfilters'); 35 var filters = Ext.getCmp('queryfilters');
36 var sqlquery = Ext.getCmp('sqlquery');
37 var sqldesc = Ext.getCmp('sqldesc');
36 var buttons = Ext.getCmp('SearchBtnPanel'); 38 var buttons = Ext.getCmp('SearchBtnPanel');
37 var displayFields = record[0].data.fields; 39 var displayFields = record[0].data.fields;
38 var filterFields = record[0].data.filters; 40 var filterFields = record[0].data.filters;
39 this.reset(); 41 this.reset();
42
43 sqlquery.setValue(record[0].data.sql);
44 sqldesc.setValue(record[0].data.description);
40 45
41 // Setup Columns of the probenlist 46 // Setup Columns of the probenlist
42 result.setupColumns(displayFields); 47 result.setupColumns(displayFields);
43 48
44 // Setup Columns of the probenlist 49 // Setup Columns of the probenlist

http://lada.wald.intevation.org