Mercurial > lada > lada-client
changeset 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 | 8b4ec83ddca3 |
files | app/controller/Sql.js app/view/search/List.js |
diffstat | 2 files changed, 8 insertions(+), 4 deletions(-) [+] |
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
--- 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: '-/-' }] }];