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

Code style.
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 31 Oct 2014 23:23:32 +0100
parents 446e99cfd425
children 8b4ec61c5752
line wrap: on
line diff
--- a/app/controller/Status.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/controller/Status.js	Fri Oct 31 23:23:32 2014 +0100
@@ -8,16 +8,20 @@
 
 Ext.define('Lada.controller.Status', {
     extend: 'Lada.controller.Base',
+
     views: [
         'status.Create'
     ],
+
     stores: [
         'Status'
     ],
+
     init: function() {
         console.log('Initialising the Status controller');
-        this.callParent();
+        this.callParent(arguments);
     },
+
     addListeners: function() {
         this.control({
             'statuslist': {
@@ -42,13 +46,16 @@
             }
         });
     },
+
     addItem: function(button) {
-        console.log('Adding new Status for Messung ' + button.parentId + ' in Probe ' + button.probeId);
         var zusatzwert = Ext.create('Lada.model.Status');
         zusatzwert.set('probeId', button.probeId);
         zusatzwert.set('messungsId', button.parentId);
-        var view = Ext.widget('statuscreate', {model: zusatzwert});
+        var view = Ext.widget('statuscreate', {
+            model: zusatzwert
+        });
     },
+
     editItem: function(grid, record) {
         console.log('Editing Status');
         var mstore = Ext.data.StoreManager.get('Messungen');
@@ -56,14 +63,18 @@
         record.getAuthInfo(this.initEditWindow, messung.get('probeId'));
         console.log("Loaded Status with ID " + record.getId()); //outputs ID
     },
+
     initEditWindow: function(record, readonly, owner) {
-        var view = Ext.widget('statuscreate', {model: record});
+        var view = Ext.widget('statuscreate', {
+            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.getStatusStore();
@@ -71,6 +82,7 @@
         var win = form.up('window');
         win.close();
     },
+
     editSuccess: function(form, record, operation) {
         // Reload store
         var store = this.getStatusStore();

http://lada.wald.intevation.org