diff app/controller/Sql.js @ 28:4d60b9ebce15

Renamed sql modul into search. Further display The query selection as Combobox instead of a grid.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Thu, 16 May 2013 17:55:53 +0200
parents f964a50bfe57
children 897e3100c6da
line wrap: on
line diff
--- a/app/controller/Sql.js	Fri May 10 12:24:45 2013 +0200
+++ b/app/controller/Sql.js	Thu May 16 17:55:53 2013 +0200
@@ -1,7 +1,7 @@
 Ext.define('Lada.controller.Sql', {
     extend: 'Ext.app.Controller',
     views: [
-        'sql.List'
+        'search.List'
     ],
     stores: [
         'Sql'
@@ -11,19 +11,20 @@
         this.control({
             // CSS like selector to select element in the viewport. See
             // ComponentQuery documentation for more details.
-            'sqllist': {
+            'queryselector': {
                 // Map the "render" event to the given function.
                 render: this.onPanelRendered,
                 // Map Doubleclick on rows of the probenlist.
-                itemclick: this.selectSql
+                select: this.selectSql
             }
         });
     },
     onPanelRendered: function() {
         console.log('The panel was rendered');
     },
-    selectSql: function(grid, record) {
-        var selection = record.get('id');
+    selectSql: function(element, record, index) {
+        //var selection = record.get('id');
+        var selection = index;
         var variables = Ext.getCmp('variables');
         var result = Ext.getCmp('result');
         console.log('Selected SQL ' + selection);
@@ -44,7 +45,9 @@
         //variables.show();
 
         // Show the results.
+        console.log('Loading store');
         result.getStore().load();
+        console.log('Store loaded');
         result.show();
     }
 });

http://lada.wald.intevation.org