[Lada-commits] [PATCH 1 of 2] Removed sql statement and added column header to query selection

Wald Commits scm-commit at wald.intevation.org
Tue Dec 16 18:28:14 CET 2014


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1418750879 -3600
# Node ID 9545adcfceebdcd162b4a6eb398d978fae14f02d
# Parent  16fbbad55589052fede6b51b9a45e86e5ec11d5f
Removed sql statement and added column header to query selection.

diff -r 16fbbad55589 -r 9545adcfceeb app/controller/Sql.js
--- 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
diff -r 16fbbad55589 -r 9545adcfceeb app/view/search/List.js
--- a/app/view/search/List.js	Tue Dec 16 18:16:25 2014 +0100
+++ b/app/view/search/List.js	Tue Dec 16 18:27:59 2014 +0100
@@ -60,9 +60,9 @@
                 shrinkWrap: 3,
                 value: '-/-'
             }, {
-                id: 'sqlquery',
+                id: 'results',
                 xtype: 'displayfield',
-                fieldLabel: 'Abfrage',
+                fieldLabel: 'Spalten',
                 value: '-/-'
             }]
         }];


More information about the Lada-commits mailing list