comparison 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
comparison
equal deleted inserted replaced
293:bd77b6055791 294:92b475303806
1 var queries = new Array('query1', 'query2'); 1 var queries = new Array('query1', 'query2');
2 2
3 /**
4 * Controller for the Search
5 * This controller handles all logic related to the search
6 */
3 Ext.define('Lada.controller.Sql', { 7 Ext.define('Lada.controller.Sql', {
4 extend: 'Ext.app.Controller', 8 extend: 'Ext.app.Controller',
5 stores: [ 9 stores: [
6 'Proben', // List of found Proben 10 'Proben', // List of found Proben
7 'Queries' 11 'Queries'
28 }); 32 });
29 }, 33 },
30 onPanelRendered: function() { 34 onPanelRendered: function() {
31 console.log('The panel was rendered'); 35 console.log('The panel was rendered');
32 }, 36 },
37 /**
38 * Function called when the user selects a SQL query in the dropdownlist.
39 * The function will hide/display additional element related to the
40 * selected search query
41 */
33 selectSql: function(element, record, index) { 42 selectSql: function(element, record, index) {
34 var result = Ext.getCmp('result'); 43 var result = Ext.getCmp('result');
35 var filters = Ext.getCmp('queryfilters'); 44 var filters = Ext.getCmp('queryfilters');
36 var sqlquery = Ext.getCmp('sqlquery'); 45 var sqlquery = Ext.getCmp('sqlquery');
37 var sqldesc = Ext.getCmp('sqldesc'); 46 var sqldesc = Ext.getCmp('sqldesc');
64 } else { 73 } else {
65 filters.hide(); 74 filters.hide();
66 }; 75 };
67 buttons.show(); 76 buttons.show();
68 }, 77 },
78 /**
79 * Function is called when the user clicks the search button. The function
80 * will perform a search to the server on refreshes the result list.
81 */
69 search: function(element, record, index) { 82 search: function(element, record, index) {
70 var result = Ext.getCmp('result'); 83 var result = Ext.getCmp('result');
71 console.log('Loading store'); 84 console.log('Loading store');
72 85
73 // Get search parameters: 86 // Get search parameters:

http://lada.wald.intevation.org