[Lada-commits] [PATCH 10 of 56] Inherit from Base controller

Wald Commits scm-commit at wald.intevation.org
Tue Aug 13 09:53:36 CEST 2013


# HG changeset patch
# User Torsten Irländer <torsten.irlaender at intevation.de>
# Date 1376053207 -7200
# Node ID 92b475303806d9fd8c2ca12132e7b4975f2b3c58
# Parent  bd77b605579169fc4c07d5a1313e064c28991976
Inherit from Base controller

diff -r bd77b6055791 -r 92b475303806 app/controller/Sql.js
--- 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');


More information about the Lada-commits mailing list