diff app/controller/MKommentare.js @ 491:850ccfe5f3c4

Code style.
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 31 Oct 2014 23:23:32 +0100
parents 446e99cfd425
children 7c0653e8d9f7
line wrap: on
line diff
--- a/app/controller/MKommentare.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/controller/MKommentare.js	Fri Oct 31 23:23:32 2014 +0100
@@ -11,19 +11,24 @@
  */
 Ext.define('Lada.controller.MKommentare', {
     extend: 'Lada.controller.Base',
+
     views: [
         'mkommentare.Create'
     ],
+
     stores: [
         'KommentareM'
     ],
+
     models: [
         'KommentarM'
     ],
+
     init: function() {
         console.log('Initialising the MKommentare controller');
-        this.callParent();
+        this.callParent(arguments);
     },
+
     addListeners: function() {
         this.control({
             'mkommentarelist': {
@@ -44,13 +49,14 @@
             }
         });
     },
+
     addItem: function(button) {
-        console.log('Adding new MKommentar for Messung ' + button.parentId + ' Probe ' + button.probeId);
         var kommentar = Ext.create('Lada.model.KommentarM');
         kommentar.set('probeId', button.probeId);
         kommentar.set('messungsId', button.parentId);
         var view = Ext.widget('mkommentarecreate', {model: kommentar});
     },
+
     editItem: function(grid, record) {
         console.log('Editing Kommentar');
         var mstore = Ext.data.StoreManager.get('Messungen');
@@ -58,14 +64,18 @@
         record.getAuthInfo(this.initEditWindow, messung.get('probeId'))
         console.log("Loaded MKommentar with ID " + record.getId()); //outputs ID
     },
+
     initEditWindow: function(record, readonly, owner) {
-        var view = Ext.widget('mkommentarecreate', {model: record});
+        var view = Ext.widget('mkommentarecreate', {
+            model: record
+        });
         var ignore = Array();
         if (readonly) {
             var form = view.down('form');
             form.setReadOnly(true, ignore);
         }
     },
+
     createSuccess: function(form, record, operation) {
         // Reload store
         var store = this.getKommentareMStore();

http://lada.wald.intevation.org