diff app/controller/Sql.js @ 527:9545adcfceeb

Removed sql statement and added column header to query selection.
author Raimund Renkert <raimund.renkert@intevation.de>
date Tue, 16 Dec 2014 18:27:59 +0100
parents 16fbbad55589
children
line wrap: on
line diff
--- a/app/controller/Sql.js	Tue Dec 16 18:16:25 2014 +0100
+++ b/app/controller/Sql.js	Tue Dec 16 18:27:59 2014 +0100
@@ -59,7 +59,7 @@
     selectSql: function(element, record) {
         var result = Ext.getCmp('result');
         var filters = Ext.getCmp('queryfilters');
-        //var sqlquery = Ext.getCmp('sqlquery');
+        var columns = Ext.getCmp('results');
         var sqldesc = Ext.getCmp('sqldesc');
         var buttons = Ext.getCmp('SearchBtnPanel');
         var displayFields = record[0].data.results;
@@ -67,7 +67,11 @@
 
         this.reset();
 
-        //sqlquery.setValue(record[0].data.sql);
+        columnString = [];
+        for (var i = 0; i < displayFields.length; i++) {
+            columnString.push(displayFields[i].header);
+        }
+        columns.setValue(columnString.join(', '));
         sqldesc.setValue(record[0].data.description);
 
         // Setup Columns of the probenlist

http://lada.wald.intevation.org