Mercurial > lada > lada-client
diff app/controller/FilterResult.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 | e002234d7da5 |
children | 704bb359c0fe |
line wrap: on
line diff
--- a/app/controller/FilterResult.js Mon Apr 20 16:07:40 2015 +0200 +++ b/app/controller/FilterResult.js Thu Apr 23 16:28:04 2015 +0200 @@ -15,6 +15,9 @@ 'Lada.view.window.ProbeEdit' ], + /** + * Initialize the Controller with 4 listeners + */ init: function() { this.control({ 'filterresultgrid': { @@ -33,6 +36,12 @@ this.callParent(arguments); }, + /** + * This function is called after a Row in the + * {@link Lada.view.grid.FilterResult} + * was double-clicked. + * The function opens a {@link Lada.view.window.ProbeEdit} + */ editItem: function(grid, record) { var win = Ext.create('Lada.view.window.ProbeEdit', { record: record @@ -41,12 +50,20 @@ win.initData(); }, + /** + * This function opens a new window to create a Probe + * {@link Lada.view.window.ProbeEdit} + */ addItem: function() { var win = Ext.create('Lada.view.window.ProbeCreate'); win.show(); win.initData(); }, + /** + * This function opens a {@link Lada.view.window.FileUpload} + * window to upload a LAF-File + */ uploadFile: function() { var win = Ext.create('Lada.view.window.FileUpload', { title: 'Datenimport', @@ -56,6 +73,11 @@ win.show(); }, + /** + * This function can be used to Download the items which + * were selected in the {@link Lada.view.grid.FilterResult} + * The Download does not work with Internet Explorers older than v.10 + */ downloadFile: function(button) { var grid = button.up('grid'); var selection = grid.getView().getSelectionModel().getSelection();