diff app/controller/grid/Messung.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 cc9107d9be17
children 2362f8ab1e9f
line wrap: on
line diff
--- a/app/controller/grid/Messung.js	Mon Apr 20 16:07:40 2015 +0200
+++ b/app/controller/grid/Messung.js	Thu Apr 23 16:28:04 2015 +0200
@@ -16,6 +16,10 @@
         'Lada.view.window.MessungEdit'
     ],
 
+    /**
+     * Inhitialize the controller
+     * It has 3 listeners
+     */
     init: function() {
         this.control({
             'messunggrid': {
@@ -30,6 +34,10 @@
         });
     },
 
+    /**
+     * This function opens a new {@link Lada.view.window.MessungEdit}
+     * Window.
+     */
     editItem: function(grid, record) {
         var probe = grid.up('window').record;
         var win = Ext.create('Lada.view.window.MessungEdit', {
@@ -42,6 +50,9 @@
         win.initData();
     },
 
+    /**
+     * This function opens a window add a Messung
+     */
     add: function(button) {
         var probe = button.up('window').record;
         var win = Ext.create('Lada.view.window.MessungCreate', {
@@ -52,6 +63,13 @@
         win.initData();
     },
 
+    /**
+     * This function removes a Messung
+     * It displays a Confirmation-Popup.
+     * When the Removal was confirmed and the operation was successful,
+     * the Messung-row is removed from the grid.
+     * On failure an Errormessage is shown
+     */
     remove: function(button) {
         var grid = button.up('grid');
         var selection = grid.getView().getSelectionModel().getSelection()[0];

http://lada.wald.intevation.org