diff app/view/window/MessungEdit.js @ 890:def27cdd0dfa

Added Documentation to Windows
author Dustin Demuth <dustin@intevation.de>
date Thu, 23 Jul 2015 16:40:50 +0200
parents 13c0e64e1873
children 8054232535ba
line wrap: on
line diff
--- a/app/view/window/MessungEdit.js	Thu Jul 23 16:40:28 2015 +0200
+++ b/app/view/window/MessungEdit.js	Thu Jul 23 16:40:50 2015 +0200
@@ -32,6 +32,9 @@
     record: null,
     grid: null,
 
+    /**
+     * This function initialises the Window
+     */
     initComponent: function() {
         if (this.record === null) {
             Ext.Msg.alert('Keine valide Messung ausgewählt!');
@@ -119,6 +122,9 @@
         this.callParent(arguments);
     },
 
+    /**
+     * Initialise the Data of this Window
+     */
     initData: function() {
         this.clearMessages();
         var that = this;
@@ -170,16 +176,27 @@
         });
     },
 
+    /**
+     * Disable the Forms in this Window.
+     * Also disable this Windows Children
+     */
     disableForm: function() {
         this.down('messungform').setReadOnly(true);
         this.disableChildren();
     },
 
+    /**
+     * Enable the Forms in this Window.
+     * Also enble this Windows Children
+     */
     enableForm: function() {
         this.down('messungform').setReadOnly(false);
         this.enableChildren();
     },
 
+    /**
+     * Disable the Chilelements of this window
+     */
     disableChildren: function() {
             this.down('fset[name=messwerte]').down('messwertgrid').setReadOnly(true);
             this.down('fset[name=messwerte]').down('messwertgrid').readOnly = true;
@@ -189,6 +206,9 @@
             this.down('fset[name=messungskommentare]').down('mkommentargrid').readOnly = true;
     },
 
+    /**
+     * Enable the Childelements of this window
+     */
     enableChildren: function() {
             this.down('fset[name=messwerte]').down('messwertgrid').setReadOnly(false);
             this.down('fset[name=messwerte]').down('messwertgrid').readOnly = false;
@@ -198,9 +218,18 @@
             this.down('fset[name=messungskommentare]').down('mkommentargrid').readOnly = false;
     },
 
+    /**
+     * Instructs the fields / forms listed in this method to set a message.
+     * @param errors These Errors shall be shown
+     * @param warnings These Warning shall be shown
+     */
     setMessages: function(errors, warnings) {
         this.down('messungform').setMessages(errors, warnings);
     },
+
+    /**
+     * Instructs the fields / forms listed in this method to clear their messages.
+     */
     clearMessages: function() {
         this.down('messungform').clearMessages();
     }

http://lada.wald.intevation.org