diff app/controller/Sql.js @ 294:92b475303806

Inherit from Base controller
author Torsten Irländer <torsten.irlaender@intevation.de>
date Fri, 09 Aug 2013 15:00:07 +0200
parents 424f18da3c64
children ae1b4c828649
line wrap: on
line diff
--- a/app/controller/Sql.js	Fri Aug 09 15:00:07 2013 +0200
+++ b/app/controller/Sql.js	Fri Aug 09 15:00:07 2013 +0200
@@ -1,5 +1,9 @@
 var queries = new Array('query1', 'query2');
 
+/**
+ * Controller for the Search
+ * This controller handles all logic related to the search
+ */
 Ext.define('Lada.controller.Sql', {
     extend: 'Ext.app.Controller',
     stores: [
@@ -30,6 +34,11 @@
     onPanelRendered: function() {
         console.log('The panel was rendered');
     },
+    /**
+     * Function called when the user selects a SQL query in the dropdownlist.
+     * The function will hide/display additional element related to the
+     * selected search query
+     */
     selectSql: function(element, record, index) {
         var result = Ext.getCmp('result');
         var filters = Ext.getCmp('queryfilters');
@@ -66,6 +75,10 @@
         };
         buttons.show();
     },
+    /**
+     * Function is called when the user clicks the search button. The function
+     * will perform a search to the server on refreshes the result list.
+     */
     search: function(element, record, index) {
         var result = Ext.getCmp('result');
         console.log('Loading store');

http://lada.wald.intevation.org