changeset 294:92b475303806

Inherit from Base controller
author Torsten Irländer <torsten.irlaender@intevation.de>
date Fri, 09 Aug 2013 15:00:07 +0200
parents bd77b6055791
children 841dc60824b5
files app/controller/Sql.js
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
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