diff app/controller/Sql.js @ 6:8e79bda4d55b

Added a list to select predefined SQL Statement for the Proben list.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Mon, 29 Apr 2013 15:18:26 +0200
parents
children e4fcb4ddd782
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/controller/Sql.js	Mon Apr 29 15:18:26 2013 +0200
@@ -0,0 +1,25 @@
+Ext.define('Lada.controller.Sql', {
+    extend: 'Ext.app.Controller',
+    views: [
+        'sql.List'
+    ],
+    init: function() {
+        console.log('Initialising the Sql controller');
+        this.control({
+            // CSS like selector to select element in the viewport. See
+            // ComponentQuery documentation for more details.
+            'viewport > sqllist': {
+                // Map the "render" event to the given function.
+                render: this.onPanelRendered,
+                // Map Doubleclick on rows of the probenlist.
+                itemclick: this.selectSql
+            }
+        });
+    },
+    onPanelRendered: function() {
+        console.log('The panel was rendered');
+    },
+    selectSql: function(grid, record) {
+        console.log('Selected SQL ' + record.get('id'));
+    }
+});

http://lada.wald.intevation.org