Mercurial > lada > lada-client
diff app/controller/Filter.js @ 742:6e28ebbe1a73
added documentation for Form and Grid controllers
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Thu, 23 Apr 2015 16:28:04 +0200 |
parents | 2d482dfaa41a |
children | 704bb359c0fe |
line wrap: on
line diff
--- a/app/controller/Filter.js Mon Apr 20 16:07:40 2015 +0200 +++ b/app/controller/Filter.js Thu Apr 23 16:28:04 2015 +0200 @@ -24,6 +24,10 @@ displayFields: null, + /** + * Initialize this Controller + * It has 4 Listeners + */ init: function() { this.control({ // CSS like selector to select element in the viewport. See @@ -72,25 +76,26 @@ // Setup Columns of the probenlist this.displayFields.reverse(); - // Setup Filters of the probenlist - // - // Allowed types are - // * text - // * number - // * datetime - // * bool - // * listmst - // * listumw - // * listver - // * listdbasis - // * listnetz - // - // Iterate over all configured filters and add filters dynamically - // - // 1. Empty filters + /* Setup Filters of the probenlist + * + * Allowed types are + * * text + * * number + * * datetime + * * bool + * * listmst + * * listumw + * * listver + * * listdbasis + * * listnetz + * + * Iterate over all configured filters and add filters dynamically + * + * 1. Empty filters + */ filters.removeAll(); var hide = true; - // 2. Iterate over all configured filters + /* 2. Iterate over all configured filters */ var j; for (j = 0; j < filterFields.length; j++) { var type = filterFields[j].type; @@ -202,7 +207,9 @@ resultGrid.getStore().load(); resultGrid.show(); }, - + /** + * This function resets the filters + */ reset: function(element) { var filters = element.up('panel[name=main]').down('fieldset[name=filtervariables]'); for (var i = filters.items.length - 1; i >= 0; i--) { @@ -210,7 +217,10 @@ filter.clearValue(); } }, - + /** + * This Function is supposed to handle the About action + * It has no function yet. + */ about: function() { var info = this.getInfoStore(); Ext.widget('about', {