[Lada-commits] [PATCH 7 of 9] Code style

Wald Commits scm-commit at wald.intevation.org
Mon Nov 3 10:31:27 CET 2014


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1414794212 -3600
# Node ID 850ccfe5f3c45faab0ac988b16e92c6284a69cfc
# Parent  446e99cfd4257e3857b93d179cab3d2c265ec757
Code style.

diff -r 446e99cfd425 -r 850ccfe5f3c4 .hgignore
--- a/.hgignore	Fri Oct 31 21:28:31 2014 +0100
+++ b/.hgignore	Fri Oct 31 23:23:32 2014 +0100
@@ -8,5 +8,7 @@
 *.orig
 *.jse
 *.rej
+*/.*
+*.swp
 # switch to regexp syntax.
 syntax: regexp
diff -r 446e99cfd425 -r 850ccfe5f3c4 app.js
--- a/app.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app.js	Fri Oct 31 23:23:32 2014 +0100
@@ -24,7 +24,11 @@
 
     // Setting up translations. This is done using a ext-plgin which can be
     // found on https://github.com/elmasse/Ext.i18n.Bundle
-    requires: ['Ext.i18n.Bundle', 'Lada.lib.Helpers', 'Ext.layout.container.Column'],
+    requires: [
+        'Ext.i18n.Bundle',
+        'Lada.lib.Helpers',
+        'Ext.layout.container.Column'
+    ],
     bundle: {
         bundle: 'Lada',
         lang: 'de-DE',
@@ -61,7 +65,8 @@
         if(this.writeEverything || record.writeEverything){
             console.log('getRecordData', this,arguments);
             return record.getAllData();
-        } else {
+        }
+        else {
             return this.callOverridden(arguments);
         }
     }
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/controller/Base.js
--- a/app/controller/Base.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/controller/Base.js	Fri Oct 31 23:23:32 2014 +0100
@@ -28,7 +28,6 @@
      */
     models: [],
     init: function() {
-        console.log('Initialising the Kommentare controller');
         this.addListeners();
     },
     /**
@@ -72,8 +71,8 @@
     deleteItem: function(button) {
         var grid = button.up('grid');
         var selection = grid.getView().getSelectionModel().getSelection()[0];
-        Ext.MessageBox.confirm('Löschen', 'Sind Sie sicher?', function(btn){
-            if(btn === 'yes'){
+        Ext.MessageBox.confirm('Löschen', 'Sind Sie sicher?', function(btn) {
+            if (btn === 'yes') {
                 var store = grid.getStore();
                 var deleteUrl = selection.getProxy().url + selection.getId();
                 Ext.Ajax.request({
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/controller/Kommentare.js
--- a/app/controller/Kommentare.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/controller/Kommentare.js	Fri Oct 31 23:23:32 2014 +0100
@@ -11,19 +11,24 @@
  */
 Ext.define('Lada.controller.Kommentare', {
     extend: 'Lada.controller.Base',
+
     views: [
         'kommentare.Create'
     ],
+
     stores: [
         'KommentareP'
     ],
+
     models: [
         'KommentarP'
     ],
+
     init: function() {
         console.log('Initialising the Kommentare controller');
         this.callParent();
     },
+
     addListeners: function() {
         this.control({
             'kommentarelist': {
@@ -44,25 +49,33 @@
             }
         });
     },
+
     addItem: function(button) {
         console.log('Adding new Kommentar for Probe ' + button.probeId);
         var kommentar = Ext.create('Lada.model.KommentarP');
         kommentar.set('probeId', button.probeId);
-        var view = Ext.widget('kommentarecreate', {model: kommentar});
+        var view = Ext.widget('kommentarecreate', {
+            model: kommentar
+        });
     },
+
     editItem: function(grid, record) {
         console.log('Editing Kommentar');
         record.getAuthInfo(this.initEditWindow)
         console.log("Loaded Kommentar with ID " + record.getId()); //outputs ID
     },
+
     initEditWindow: function(record, readonly, owner) {
-        var view = Ext.widget('kommentarecreate', {model: record});
+        var view = Ext.widget('kommentarecreate', {
+            model: record
+        });
         var ignore = Array();
         if (readonly) {
             var form = view.down('form');
             form.setReadOnly(true, ignore);
         }
     },
+
     createSuccess: function(form, record, operation) {
         var store = this.getKommentarePStore();
         store.reload();
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/controller/MKommentare.js
--- 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();
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/controller/Messungen.js
--- a/app/controller/Messungen.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/controller/Messungen.js	Fri Oct 31 23:23:32 2014 +0100
@@ -11,10 +11,12 @@
  */
 Ext.define('Lada.controller.Messungen', {
     extend: 'Lada.controller.Base',
+
     views: [
         'messungen.Create',
         'messungen.Edit'
     ],
+
     stores: [
         'Proben',
         'Messungen',
@@ -23,10 +25,12 @@
         'Status',
         'StaMessgroessen'
     ],
+
     init: function() {
         console.log('Initialising the Messungen controller');
         this.callParent();
     },
+
     addListeners: function() {
         this.control({
             'messungenlist': {
@@ -54,17 +58,20 @@
             }
         });
     },
+
     saveItem: function(button) {
         console.log('Saving new Messung for Probe ' + button.probeId);
         var form = button.up('window').down('form');
         form.commit();
     },
+
     addItem: function(button) {
         console.log('Adding new Messung for Probe ' + button.probeId);
         var messung = Ext.create('Lada.model.Messung');
         messung.set('probeId', button.probeId);
         var view = Ext.widget('messungencreate', {model: messung});
     },
+
     editItem: function(grid, record) {
         console.log('Editing Messung');
         var kstore = this.getKommentareMStore();
@@ -91,8 +98,11 @@
         record.getAuthInfo(this.initEditWindow);
         console.log("Loaded Messung with ID " + record.getId()); //outputs ID
     },
+
     initEditWindow: function(record, readonly, owner) {
-        var view = Ext.widget('messungenedit', {model: record});
+        var view = Ext.widget('messungenedit', {
+            model: record
+        });
         var ignore = Array();
         if (owner) {
                 ignore.push('fertig');
@@ -102,12 +112,13 @@
             form.setReadOnly(true, ignore);
         }
     },
+
     deleteItem: function(button) {
         // Get selected item in grid
         var grid = button.up('grid');
         var selection = grid.getView().getSelectionModel().getSelection()[0];
-        Ext.MessageBox.confirm('Löschen', 'Sind Sie sicher?', function(btn){
-            if(btn === 'yes'){
+        Ext.MessageBox.confirm('Löschen', 'Sind Sie sicher?', function(btn) {
+            if (btn === 'yes') {
                 var store = grid.getStore();
                 var deleteUrl = selection.getProxy().url + selection.getId();
                 Ext.Ajax.request({
@@ -123,12 +134,14 @@
             }
         });
     },
+
     createSuccess: function(form, record, operation) {
         var store = this.getMessungenStore();
         store.reload();
         var win = form.up('window');
         win.close();
     },
+
     createFailure: function(form, record, operation) {
         Ext.MessageBox.show({
             title: 'Fehler beim Speichern',
@@ -137,12 +150,14 @@
             buttons: Ext.Msg.OK
         });
     },
+
     editSuccess: function(form, record, operation) {
         var store = this.getMessungenStore();
         store.reload();
         var win = form.up('window');
         win.close();
     },
+
     editFailure: function(form, record, operation) {
         Ext.MessageBox.show({
             title: 'Fehler beim Speichern',
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/controller/Messwert.js
--- a/app/controller/Messwert.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/controller/Messwert.js	Fri Oct 31 23:23:32 2014 +0100
@@ -11,9 +11,11 @@
  */
 Ext.define('Lada.controller.Messwert', {
     extend: 'Lada.controller.Base',
+
     views: [
         'messwerte.Create'
     ],
+
     stores: [
         'Proben',
         'Messungen',
@@ -21,10 +23,12 @@
         'StaMesseinheiten',
         'StaMessgroessen'
     ],
+
     init: function() {
         console.log('Initialising the Messwert controller');
-        this.callParent();
+        this.callParent(arguments);
     },
+
     addListeners: function() {
         this.control({
             'messwertelist': {
@@ -45,18 +49,20 @@
             }
         });
     },
+
     saveItem: function(button) {
         console.log('Saving MesswerMesswert');
         var form = button.up('window').down('form');
         form.commit();
     },
+
     addItem: function(button) {
-        console.log('Adding new Messwert for Messung ' + button.parentId + ' for Probe ' + button.probeId);
         var messung = Ext.create('Lada.model.Messwert');
         messung.set('probeId', button.probeId);
         messung.set('messungsId', button.parentId);
         var view = Ext.widget('messwertecreate', {model: messung});
     },
+
     editItem: function(grid, record) {
         console.log('Editing Messwert');
         var mstore = Ext.data.StoreManager.get('Messungen');
@@ -65,19 +71,23 @@
         record.getAuthInfo(this.initEditWindow, messung.get('probeId'));
         console.log("Loaded Messwert with ID " + record.getId()); //outputs ID
     },
+
     initEditWindow: function(record, readonly, owner) {
-        var view = Ext.widget('messwertecreate', {model: record});
+        var view = Ext.widget('messwertecreate', {
+            model: record
+        });
         var ignore = Array();
         if (readonly) {
             var form = view.down('form');
             form.setReadOnly(true, ignore);
         }
     },
+
     deleteItem: function(button) {
         var grid = button.up('grid');
         var selection = grid.getView().getSelectionModel().getSelection()[0];
-        Ext.MessageBox.confirm('Löschen', 'Sind Sie sicher?', function(btn){
-            if(btn === 'yes'){
+        Ext.MessageBox.confirm('Löschen', 'Sind Sie sicher?', function(btn) {
+            if (btn === 'yes') {
                 var store = grid.getStore();
                 var deleteUrl = selection.getProxy().url + selection.getId();
                 Ext.Ajax.request({
@@ -93,6 +103,7 @@
             }
         });
     },
+
     createSuccess: function(form, record, operation) {
         // Reload store
         var store = this.getMesswerteStore();
@@ -100,6 +111,7 @@
         var win = form.up('window');
         win.close();
     },
+
     createFailure: function(form, record, operation) {
         Ext.MessageBox.show({
             title: 'Fehler beim Speichern',
@@ -108,6 +120,7 @@
             buttons: Ext.Msg.OK
         });
     },
+
     editSuccess: function(form, record, operation) {
         // Reload store
         var store = this.getMesswerteStore();
@@ -115,6 +128,7 @@
         var win = form.up('window');
         win.close();
     },
+
     editFailure: function(form, record, operation) {
         Ext.MessageBox.show({
             title: 'Fehler beim Speichern',
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/controller/Orte.js
--- a/app/controller/Orte.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/controller/Orte.js	Fri Oct 31 23:23:32 2014 +0100
@@ -11,24 +11,29 @@
  */
 Ext.define('Lada.controller.Orte', {
     extend: 'Lada.controller.Base',
+
     views: [
         'orte.List',
         'orte.Create',
         'orte.CreateOrt'
     ],
+
     stores: [
         'Orte',
         'StaOrte',
         'StaStaaten',
         'StaVerwaltungseinheiten'
     ],
+
     models: [
         'Ort'
     ],
+
     init: function() {
         console.log('Initialising the Orte controller');
-        this.callParent();
+        this.callParent(arguments);
     },
+
     addListeners: function() {
         this.control({
             'ortelist': {
@@ -59,11 +64,13 @@
             }
         });
     },
+
     createOrt: function(button) {
         console.log('button clicked');
         var win = Ext.create('Lada.view.orte.CreateOrt',{});
         win.show();
     },
+
     saveNewOrt: function(button) {
         console.log('button clicked');
 
@@ -72,7 +79,7 @@
         var ortdetail = Ext.create('Lada.model.Ortdetail');
         var fields = ['beschreibung', 'hoeheLand',
                       'latitude', 'longitude', 'staatId', 'gemId'];
-        for (var i = fields.length - 1; i >= 0; i--){
+        for (var i = fields.length - 1; i >= 0; i--) {
             var ffield = form.findField("ort_"+fields[i]);
             ortdetail.set(fields[i], ffield.getValue());
         }
@@ -94,6 +101,7 @@
             }
         });
     },
+
     saveItem: function(button) {
         console.log('Saving Ort');
         var form = button.up('window').down('form');
@@ -126,7 +134,8 @@
             success: function(batch, options) {
                 if (newortdetail) {
                     // Get ID from new created ortdetail and set it to the ort
-                    var response = options.operations.create[0].store.proxy.reader.jsonData;
+                    var response =
+                        options.operations.create[0].store.proxy.reader.jsonData;
                     form.model.set('ortId', response.ortId);
                 }
                 ortidfield.setValue(ortid);
@@ -136,27 +145,35 @@
             }
         });
         form.commit();
+    },
 
-    },
     addItem: function(button) {
         console.log('Adding new Ort for Probe ' + button.probeId);
         var ort = Ext.create('Lada.model.Ort');
         ort.set('probeId', button.probeId);
-        var view = Ext.widget('ortecreate', {model: ort});
+        var view = Ext.widget('ortecreate', {
+            model: ort
+        });
     },
+
     editItem: function(grid, record) {
         console.log('Editing Ort');
         record.getAuthInfo(this.initEditWindow)
         console.log("Loaded Ort with ID " + record.getId()); //outputs ID
     },
+
     initEditWindow: function(record, readonly, owner) {
-        var view = Ext.widget('ortecreate', {model: record, edit: true});
+        var view = Ext.widget('ortecreate', {
+            model: record,
+            edit: true
+        });
         var ignore = Array();
         if (readonly) {
             var form = view.down('form');
             form.setReadOnly(true, ignore);
         }
     },
+
     createSuccess: function(form, record, operation) {
         // Reload store
         var store = this.getOrteStore();
@@ -164,6 +181,7 @@
         var win = form.up('window');
         win.close();
     },
+
     editSuccess: function(form, record, operation) {
         // Reload store
         var store = this.getOrteStore();
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/controller/Proben.js
--- a/app/controller/Proben.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/controller/Proben.js	Fri Oct 31 23:23:32 2014 +0100
@@ -79,11 +79,13 @@
 
 Ext.define('Lada.controller.Proben', {
     extend: 'Lada.controller.Base',
+
     views: [
         'proben.Edit',
         'proben.Create',
         'proben.Import'
     ],
+
     stores: [
         'Proben',
         'Zusatzwerte',
@@ -92,10 +94,12 @@
         'Orte',
         'Messungen'
     ],
+
     init: function() {
         console.log('Initialising the Proben controller');
-        this.callParent();
+        this.callParent(arguments);
     },
+
     addListeners: function() {
         this.control({
             'probenlist': {
@@ -129,10 +133,12 @@
             }
         });
     },
+
     addItem: function(button) {
         console.log('Adding new Probe');
         var view = Ext.widget('probencreate');
     },
+
     /**
      * Opens a window with a file chooser to select the file to upload
      * @private
@@ -141,13 +147,14 @@
         console.log('Importing');
         var view = Ext.widget('probenimport');
     },
+
     /** Uploads the selected file the the server
      * @private
      */
     uploadItem: function(button) {
         var win = button.up('window');
         var form = win.down('form');
-        if(form.isValid()){
+        if (form.isValid()) {
             form.submit({
                 url: 'server/rest/import/laf',
                 waitMsg: 'Importiere...',
@@ -175,6 +182,7 @@
             });
         }
     },
+
     /**
      * Will download the selected Probe in LAF format in a new window (tab).
      */
@@ -183,7 +191,11 @@
         var selection = grid.getView().getSelectionModel().getSelection();
         var hiddenItems = [];
         for (var i = 0; i < selection.length; i++) {
-            hiddenItems.push({xtype: 'hiddenfield', name: 'probeId', value: selection[i].get('probeId')});
+            hiddenItems.push({
+                xtype: 'hiddenfield',
+                name: 'probeId',
+                value: selection[i].get('probeId')
+            });
         }
         console.log('create download form.');
         var hiddenForm = Ext.create('Ext.form.Panel', {
@@ -198,6 +210,7 @@
         });
         hiddenForm.getForm().submit();
     },
+
     editItem: function(grid, record) {
         console.log('Editing Probe');
         var id = record.get('id');
@@ -232,10 +245,13 @@
                 probeId: id
             }
         });
-        var view = Ext.widget('probenedit', {modelId: id});
+        var view = Ext.widget('probenedit', {
+            modelId: id
+        });
         view.show();
         console.log("Loaded Probe with ID " + record.getId()); //outputs ID
     },
+
     createSuccess: function(form, record, response) {
         // Close Createdialog
         var win = form.up('window');
@@ -273,6 +289,7 @@
             });
         }
     },
+
     editSuccess: function(form, record, response) {
         // Reload store
         var store = this.getProbenStore();
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/controller/Sql.js
--- a/app/controller/Sql.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/controller/Sql.js	Fri Oct 31 23:23:32 2014 +0100
@@ -14,18 +14,21 @@
  */
 Ext.define('Lada.controller.Sql', {
     extend: 'Ext.app.Controller',
+
+    requires: [
+        'Lada.view.widgets.Mst',
+        'Lada.view.widgets.Uwb',
+        'Lada.view.widgets.Datetime',
+        'Lada.view.About'
+    ],
+
     stores: [
         'Proben',    // List of found Proben
         'ProbenList',    // List of found Proben
         'Queries',
         'Info'
     ],
-    requires: [
-        'Lada.view.widgets.Mst',
-        'Lada.view.widgets.Uwb',
-        'Lada.view.widgets.Datetime',
-        'Lada.view.About'
-    ],
+
     init: function() {
         console.log('Initialising the Sql controller');
         this.control({
@@ -50,10 +53,9 @@
                 click: this.about
             }
         });
+        this.callParent(arguments);
     },
-    onPanelRendered: function() {
-        console.log('The panel was rendered');
-    },
+
     /**
      * Function called when the user selects a SQL query in the dropdownlist.
      * The function will hide/display additional element related to the
@@ -104,31 +106,72 @@
             var field = null;
             if (type == "text") {
                 console.log("Found text filter");
-                field = Ext.create('Ext.form.field.Text', { name: name, fieldLabel: label });
-            } else if (type == "number") {
+                field = Ext.create('Ext.form.field.Text', {
+                    name: name,
+                    fieldLabel: label
+                });
+            }
+            else if (type == "number") {
                 console.log("Found number filter");
-                field = Ext.create('Ext.form.field.Number', { name: name, fieldLabel: label });
-            } else if (type == "datetime") {
+                field = Ext.create('Ext.form.field.Number', {
+                    name: name,
+                    fieldLabel: label
+                });
+            }
+            else if (type == "datetime") {
                 console.log("Found datetime filter");
-                field = Ext.create('Lada.view.widgets.Datetime', { name: name, fieldLabel: label });
-            } else if (type == "bool") {
+                field = Ext.create('Lada.view.widgets.Datetime', {
+                    name: name,
+                    fieldLabel: label
+                });
+            }
+            else if (type == "bool") {
                 console.log("Found bool filter");
-                field = Ext.create('Lada.view.widgets.Testdatensatz', { name: name, fieldLabel: label, emptyText: '' });
-            } else if (type == "listmst") {
+                field = Ext.create('Lada.view.widgets.Testdatensatz', {
+                    name: name,
+                    fieldLabel: label,
+                    emptyText: ''
+                });
+            }
+            else if (type == "listmst") {
                 console.log("Found listmst filter");
-                field = Ext.create('Lada.view.widgets.Mst', { name: name, fieldLabel: label, multiSelect: multi });
-            } else if (type == "listumw") {
+                field = Ext.create('Lada.view.widgets.Mst', {
+                    name: name,
+                    fieldLabel: label,
+                    multiSelect: multi
+                });
+            }
+            else if (type == "listumw") {
                 console.log("Found listumw filter");
-                field = Ext.create('Lada.view.widgets.Uwb', { name: name, fieldLabel: label, multiSelect: multi });
-            } else if (type == "listdbasis") {
+                field = Ext.create('Lada.view.widgets.Uwb', {
+                    name: name,
+                    fieldLabel: label,
+                    multiSelect: multi
+                });
+            }
+            else if (type == "listdbasis") {
                 console.log("Found listdbasis filter");
-                field = Ext.create('Lada.view.widgets.Datenbasis', { name: name, fieldLabel: label, multiSelect: multi });
-            } else if (type == "listver") {
+                field = Ext.create('Lada.view.widgets.Datenbasis', {
+                    name: name,
+                    fieldLabel: label,
+                    multiSelect: multi
+                });
+            }
+            else if (type == "listver") {
                 console.log("Found listver filter");
-                field = Ext.create('Lada.view.widgets.Verwaltungseinheit', { name: name, fieldLabel: label, multiSelect: multi });
-            } else if (type == "listnetz") {
+                field = Ext.create('Lada.view.widgets.Verwaltungseinheit', {
+                    name: name,
+                    fieldLabel: label,
+                    multiSelect: multi
+                });
+            }
+            else if (type == "listnetz") {
                 console.log("Found listnetz filter");
-                field = Ext.create('Lada.view.widgets.Netzbetreiber', { name: name, fieldLabel: label, multiSelect: multi });
+                field = Ext.create('Lada.view.widgets.Netzbetreiber', {
+                    name: name,
+                    fieldLabel: label,
+                    multiSelect: multi
+                });
             }
             if (field) {
                 console.log("Pushing field to filters");
@@ -142,6 +185,7 @@
         }
         buttons.show();
     },
+
     /**
      * Function is called when the user clicks the search button. The function
      * will perform a search to the server on refreshes the result list.
@@ -154,7 +198,7 @@
         // Get search parameters:
         var searchParams = {};
         searchParams['qid'] = search.getValue();
-        for (var i = filters.items.length - 1; i >= 0; i--){
+        for (var i = filters.items.length - 1; i >= 0; i--) {
             var filter = filters.items.items[i];
             var value = filter.getValue();
             if (value instanceof Array) {
@@ -162,13 +206,13 @@
             }
             searchParams[filter.getName()] = value;
         }
-        console.log('Loading store with the following search params: ' + searchParams);
         result.getStore().load({
             params: searchParams
         });
         console.log('Store loaded');
         result.show();
     },
+
     reset: function(element, record, index) {
         var buttons = Ext.getCmp('SearchBtnPanel');
         var result = Ext.getCmp('result');
@@ -179,8 +223,11 @@
         //result.hide();
         //buttons.hide();
     },
+
     about: function(element, record, index) {
         var info = this.getInfoStore();
-        var view = Ext.widget('about', {info: info});
+        var view = Ext.widget('about', {
+            info: info
+        });
     }
 });
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/controller/Status.js
--- 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();
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/controller/Zusatzwerte.js
--- a/app/controller/Zusatzwerte.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/controller/Zusatzwerte.js	Fri Oct 31 23:23:32 2014 +0100
@@ -11,15 +11,18 @@
     views: [
         'zusatzwerte.Create'
     ],
+
     stores: [
         'Zusatzwerte',
         'StaProbenzusaetze',
         'StaMesseinheiten'
     ],
+
     init: function() {
         console.log('Initialising the Zusatzwerte controller');
-        this.callParent();
+        this.callParent(arguments);
     },
+
     addListeners: function() {
         this.control({
             'zusatzwertelist': {
@@ -44,24 +47,32 @@
             }
         });
     },
+
     saveItem: function(button) {
         console.log('Saving new Zusatzwert for Probe ' + button.probeId);
         var form = button.up('window').down('form');
         form.commit();
     },
+
     addItem: function(button) {
         console.log('Adding new Zusatzwert for Probe' + button.probeId);
         var zusatzwert = Ext.create('Lada.model.Zusatzwert');
         zusatzwert.set('probeId', button.probeId);
-        var view = Ext.widget('zusatzwertecreate', {model: zusatzwert});
+        var view = Ext.widget('zusatzwertecreate', {
+            model: zusatzwert
+        });
     },
+
     editItem: function(grid, record) {
         console.log('Editing Zusatzwert');
         record.getAuthInfo(this.initEditWindow)
         console.log("Loaded Zusatzwert with ID " + record.getId()); //outputs ID
     },
+
     initEditWindow: function(record, readonly, owner) {
-        var view = Ext.widget('zusatzwertecreate', {model: record});
+        var view = Ext.widget('zusatzwertecreate', {
+            model: record
+        });
         // Mark PZW Selection readonly.
         view.down('probenzusatzwert').disabled = true;
         var ignore = Array();
@@ -70,6 +81,7 @@
             form.setReadOnly(true, ignore);
         }
     },
+
     createSuccess: function(form, record, operation) {
         // Reload store
         var store = this.getZusatzwerteStore();
@@ -77,6 +89,7 @@
         var win = form.up('window');
         win.close();
     },
+
     editSuccess: function(form, record, operation) {
         // Reload store
         var store = this.getZusatzwerteStore();
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/lib/Helpers.js
--- a/app/lib/Helpers.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/lib/Helpers.js	Fri Oct 31 23:23:32 2014 +0100
@@ -15,7 +15,7 @@
         /**
          * Function to translate a timestamp into a date
          */
-        ts2date: function(v, record){
+        ts2date: function(v, record) {
             // Converts a timestamp into a date object.
             if (v === null || v === undefined) {
                 return v;
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/model/Base.js
--- a/app/model/Base.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/model/Base.js	Fri Oct 31 23:23:32 2014 +0100
@@ -11,7 +11,9 @@
  */
 Ext.define('Lada.model.Base', {
     extend: 'Ext.data.Model',
+
     requires: ['Lada.lib.Helpers'],
+
     /**
      * Helper function to make a AJAX request against the authinfo interface
      * of the server
@@ -30,7 +32,8 @@
                 cb(this, obj.readonly, obj.isOwner);
             },
             failure: function(response, opts) {
-                console.log('server-side failure with status code ' + response.status);
+                console.log('server-side failure with status code ' +
+                    response.status);
                 cb(this, true, false);
             }
         });
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/model/KommentarM.js
--- a/app/model/KommentarM.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/model/KommentarM.js	Fri Oct 31 23:23:32 2014 +0100
@@ -11,14 +11,24 @@
  */
 Ext.define('Lada.model.KommentarM', {
     extend: 'Lada.model.Base',
-    fields: [
-        {name: "id"},
-        {name: "messungsId"},
-        {name: "erzeuger"},
-        {name: "datum", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
-        {name: "text"}
-    ],
+
+    fields: [{
+        name: "id"
+    }, {
+        name: "messungsId"
+    }, {
+        name: "erzeuger"
+    }, {
+        name: "datum",
+        type: 'date',
+        convert: Lada.lib.Helpers.ts2date,
+        defaultValue: new Date()
+    }, {
+        name: "text"
+    }],
+
     idProperty: "id",
+
     proxy: {
         type: 'rest',
         url: 'server/rest/kommentar_m',
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/model/KommentarP.js
--- a/app/model/KommentarP.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/model/KommentarP.js	Fri Oct 31 23:23:32 2014 +0100
@@ -11,14 +11,24 @@
  */
 Ext.define('Lada.model.KommentarP', {
     extend: 'Lada.model.Base',
-    fields: [
-        {name: "id"},
-        {name: "probeId"},
-        {name: "erzeuger"},
-        {name: "datum", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
-        {name: "text"}
-    ],
+
+    fields: [{
+        name: "id"
+    }, {
+        name: "probeId"
+    }, {
+        name: "erzeuger"
+    }, {
+        name: "datum",
+        type: 'date',
+        convert: Lada.lib.Helpers.ts2date,
+        defaultValue: new Date()
+    }, {
+        name: "text"
+    }],
+
     idProperty: "id",
+
     proxy: {
         type: 'rest',
         appendId: true, //default
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/model/Messung.js
--- a/app/model/Messung.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/model/Messung.js	Fri Oct 31 23:23:32 2014 +0100
@@ -11,19 +11,36 @@
  */
 Ext.define('Lada.model.Messung', {
     extend: 'Lada.model.Base',
-    fields: [
-        {name: "id"},
-        {name: "messungsId"},
-        {name: "probeId"},
-        {name: "mmtId"},
-        {name: "nebenprobenNr"},
-        {name: "messdauer"},
-        {name: "messzeitpunkt", convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
-        {name: "fertig", type: "boolean"},
-        {name: "letzteAenderung", type:"date"},
-        {name: "geplant", type: "boolean"}
-    ],
+
+    fields: [{
+        name: "id"
+    }, {
+        name: "messungsId"
+    }, {
+        name: "probeId"
+    }, {
+        name: "mmtId"
+    }, {
+        name: "nebenprobenNr"
+    }, {
+        name: "messdauer"
+    }, {
+        name: "messzeitpunkt",
+        convert: Lada.lib.Helpers.ts2date,
+        defaultValue: new Date()
+    }, {
+        name: "fertig",
+        type: "boolean"
+    }, {
+        name: "letzteAenderung",
+        type:"date"
+    }, {
+        name: "geplant",
+        type: "boolean"
+    }],
+
     idProperty: "id",
+
     proxy: {
         type: 'rest',
         url: 'server/rest/messung',
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/model/Messwert.js
--- a/app/model/Messwert.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/model/Messwert.js	Fri Oct 31 23:23:32 2014 +0100
@@ -11,19 +11,36 @@
  */
 Ext.define('Lada.model.Messwert', {
     extend: 'Lada.model.Base',
-    fields: [
-        {name: "id"},
-        {name: "messungsId"},
-        {name: "messgroesseId"},
-        {name: "messwert", type:"float"},
-        {name: "messwertNwg"},
-        {name: "messfehler", type:"float"},
-        {name: "nwgZuMesswert", type:"float"},
-        {name: "mehId"},
-        {name: "grenzwertueberschreitung", type: "boolean"},
-        {name: "letzteAenderung", type:"date"}
-    ],
+
+    fields: [{
+        name: "id"
+    }, {
+        name: "messungsId"
+    }, {
+        name: "messgroesseId"
+    }, {
+        name: "messwert",
+        type:"float"
+    }, {
+        name: "messwertNwg"
+    }, {
+        name: "messfehler",
+        type:"float"
+    }, {
+        name: "nwgZuMesswert",
+        type:"float"
+    }, {
+        name: "mehId"
+    }, {
+        name: "grenzwertueberschreitung",
+        type: "boolean"
+    }, {
+        name: "letzteAenderung",
+        type:"date"
+    }],
+
     idProperty: "id",
+
     proxy: {
         type: 'rest',
         url: 'server/rest/messwert',
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/model/Ort.js
--- a/app/model/Ort.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/model/Ort.js	Fri Oct 31 23:23:32 2014 +0100
@@ -11,15 +11,28 @@
  */
 Ext.define('Lada.model.Ort', {
     extend: 'Lada.model.Base',
-    fields: [
-        {name: "id", type: 'int'},
-        {name: "ortId", type: 'int'},
-        {name: "probeId"},
-        {name: "ortsTyp"},
-        {name: "ortszusatztext"},
-        {name: "letzteAenderung", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()}
-    ],
+
+    fields: [{
+        name: "id",
+        type: 'int'
+    }, {
+        name: "ortId",
+        type: 'int'
+    }, {
+        name: "probeId"
+    }, {
+        name: "ortsTyp"
+    }, {
+        name: "ortszusatztext"
+    }, {
+        name: "letzteAenderung",
+        type: 'date',
+        convert: Lada.lib.Helpers.ts2date,
+        defaultValue: new Date()
+    }],
+
     idProperty: "id",
+
     proxy: {
         type: 'rest',
         url: 'server/rest/ort',
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/model/Probe.js
--- a/app/model/Probe.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/model/Probe.js	Fri Oct 31 23:23:32 2014 +0100
@@ -12,36 +12,76 @@
  **/
 Ext.define('Lada.model.Probe', {
     extend: 'Lada.model.Base',
-    fields: [
-        {name: "id"},
-        {name: "probeIdAlt"},
-        {name: "hauptprobenNr"},
-        {name: "test"},
-        {name: "netzbetreiberId"},
-        {name: "mstId"},
-        {name: "datenbasisId"},
-        {name: "baId"},
-        {name: "probenartId"},
-        {name: "mediaDesk"},
-        {name: "media"},
-        {name: "umwId"},
-        {name: "probeentnahmeBeginn", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
-        {name: "probeentnahmeEnde", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
-        {name: "mittelungsdauer"},
-        {name: "letzteAenderung", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
-        {name: "erzeugerId"},
-        {name: "probeNehmerId"},
-        {name: "mpKat"},
-        {name: "mplId"},
-        {name: "mprId"},
-        {name: "solldatumBeginn", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
-        {name: "solldatumEnde", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
 
+    fields: [{
+        name: "id"
+    }, {
+        name: "probeIdAlt"
+    }, {
+        name: "hauptprobenNr"
+    }, {
+        name: "test"
+    }, {
+        name: "netzbetreiberId"
+    }, {
+        name: "mstId"
+    }, {
+        name: "datenbasisId"
+    }, {
+        name: "baId"
+    }, {
+        name: "probenartId"
+    }, {
+        name: "mediaDesk"
+    }, {
+        name: "media"
+    }, {
+        name: "umwId"
+    }, {
+        name: "probeentnahmeBeginn",
+        type: 'date',
+        convert: Lada.lib.Helpers.ts2date,
+        defaultValue: new Date()
+    }, {
+        name: "probeentnahmeEnde",
+        type: 'date',
+        convert: Lada.lib.Helpers.ts2date,
+        defaultValue: new Date()
+    }, {
+        name: "mittelungsdauer"
+    }, {
+        name: "letzteAenderung",
+        type: 'date',
+        convert: Lada.lib.Helpers.ts2date,
+        defaultValue: new Date()
+    }, {
+        name: "erzeugerId"
+    }, {
+        name: "probeNehmerId"
+    }, {
+        name: "mpKat"
+    }, {
+        name: "mplId"
+    }, {
+        name: "mprId"
+    }, {
+        name: "solldatumBeginn",
+        type: 'date',
+        convert: Lada.lib.Helpers.ts2date,
+        defaultValue: new Date()
+    }, {
+        name: "solldatumEnde",
+        type: 'date',
+        convert: Lada.lib.Helpers.ts2date,
+        defaultValue: new Date()
+    }, {
         // Readonly-Flag (sent additionaly by the server, not part of the
         // model)
-        {name: "readonly"}
-    ],
+        name: "readonly"
+    }],
+
     idProperty: "id",
+
     proxy: {
         type: 'rest',
         appendId: true, //default
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/model/ProbeList.js
--- a/app/model/ProbeList.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/model/ProbeList.js	Fri Oct 31 23:23:32 2014 +0100
@@ -12,10 +12,13 @@
  * */
 Ext.define('Lada.model.ProbeList', {
     extend: 'Lada.model.Base',
-    fields: [
-        {name: "readonly"}
-    ],
+
+    fields: [{
+        name: "readonly"
+    }],
+
     idProperty: "id",
+
     proxy: {
         type: 'rest',
         url: 'server/rest/probe',
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/model/Probenzusatzwert.js
--- a/app/model/Probenzusatzwert.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/model/Probenzusatzwert.js	Fri Oct 31 23:23:32 2014 +0100
@@ -11,14 +11,21 @@
  */
 Ext.define('Lada.model.Probenzusatzwert', {
     extend: 'Lada.model.Base',
-    fields: [
-        {name: "id"},
-        {name: "mehId"},
-        {name: "beschreibung"},
-        {name: "zusatzwert"},
-        {name: "eudfKeyword"}
-    ],
+
+    fields: [{
+        name: "id"
+    }, {
+        name: "mehId"
+    }, {
+        name: "beschreibung"
+    }, {
+        name: "zusatzwert"
+    }, {
+        name: "eudfKeyword"
+    }],
+
     idProperty: "id",
+
     proxy: {
         type: 'rest',
         url: 'server/rest/sta_probenzusatz',
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/model/Query.js
--- a/app/model/Query.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/model/Query.js	Fri Oct 31 23:23:32 2014 +0100
@@ -11,14 +11,21 @@
  */
 Ext.define('Lada.model.Query', {
     extend: 'Lada.model.Base',
-    fields: [
-        {name: "id"},
-        {name: "name"},
-        {name: "description"},
-        {name: "sql"},
-        {name: "results"},
-        {name: "filters"}
-    ],
+
+    fields: [{
+        name: "id"
+    }, {
+        name: "name"
+    }, {
+        name: "description"
+    }, {
+        name: "sql"
+    }, {
+        name: "results"
+    }, {
+        name: "filters"
+    }],
+
     proxy: {
         type: 'rest',
         url: 'server/rest/query',
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/model/StaOrt.js
--- a/app/model/StaOrt.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/model/StaOrt.js	Fri Oct 31 23:23:32 2014 +0100
@@ -11,23 +11,44 @@
  */
 Ext.define('Lada.model.StaOrt', {
     extend: 'Lada.model.Base',
-    fields: [
-        {name: "id"},
-        {name: "bezeichnung"},
-        {name: "beschreibung"},
-        {name: "unscharf"},
-        {name: "nutsCode"},
-        {name: "koordXExtern"},
-        {name: "koordYExtern"},
-        {name: "hoeheLand"},
-        {name: "letzteAenderung", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()},
-        {name: "longitude", type: 'float'},
-        {name: "latitude", type: 'float'},
-        {name: "staatId"},
-        {name: "gemId"},
-        {name: "otyp"}
-    ],
+
+    fields: [{
+        name: "id"
+    }, {
+        name: "bezeichnung"
+    }, {
+        name: "beschreibung"
+    }, {
+        name: "unscharf"
+    }, {
+        name: "nutsCode"
+    }, {
+        name: "koordXExtern"
+    }, {
+        name: "koordYExtern"
+    }, {
+        name: "hoeheLand"
+    }, {
+        name: "letzteAenderung",
+        type: 'date',
+        convert: Lada.lib.Helpers.ts2date,
+        defaultValue: new Date()
+    }, {
+        name: "longitude",
+        type: 'float'
+    }, {
+        name: "latitude",
+        type: 'float'
+    }, {
+        name: "staatId"
+    }, {
+        name: "gemId"
+    }, {
+        name: "otyp"
+    }],
+
     idProperty: "id",
+
     proxy: {
         type: 'rest',
         url: 'server/rest/sta_ort',
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/model/StaStaat.js
--- a/app/model/StaStaat.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/model/StaStaat.js	Fri Oct 31 23:23:32 2014 +0100
@@ -11,13 +11,20 @@
  */
 Ext.define('Lada.model.StaStaat', {
     extend: 'Lada.model.Base',
-    fields: [
-        {name: "id", type: 'int'},
-        {name: "staat"},
-        {name: "staatIso"},
-        {name: "staatKurz"}
-    ],
+
+    fields: [{
+        name: "id",
+        type: 'int'
+    }, {
+        name: "staat"
+    }, {
+        name: "staatIso"
+    }, {
+        name: "staatKurz"
+    }],
+
     idProperty: "id",
+
     proxy: {
         type: 'rest',
         url: 'server/rest/sta_staat',
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/model/Zusatzwert.js
--- a/app/model/Zusatzwert.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/model/Zusatzwert.js	Fri Oct 31 23:23:32 2014 +0100
@@ -11,16 +11,31 @@
  */
 Ext.define('Lada.model.Zusatzwert', {
     extend: 'Lada.model.Base',
-    fields: [
-        {name: "id"},
-        {name: "probeId"},
-        {name: "pzsId"},
-        {name: "nwgZuMesswert", type: 'float'},
-        {name: "messwertPzs", type: 'float'},
-        {name: "messfehler", type: 'float'},
-        {name: "letzteAenderung", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()}
-    ],
+
+    fields: [{
+        name: "id"
+    }, {
+        name: "probeId"
+    }, {
+        name: "pzsId"
+    }, {
+        name: "nwgZuMesswert",
+        type: 'float'
+    }, {
+        name: "messwertPzs",
+        type: 'float'
+    }, {
+        name: "messfehler",
+        type: 'float'
+    }, {
+        name: "letzteAenderung",
+        type: 'date',
+        convert: Lada.lib.Helpers.ts2date,
+        defaultValue: new Date()
+    }],
+
     idProperty: "id",
+
     proxy: {
         type: 'rest',
         url: 'server/rest/zusatzwert',
@@ -35,6 +50,7 @@
             writeEverything : true
         }
     },
+
     getMesseinheit: function(pzsId) {
         var zstore = Ext.getStore('StaProbenzusaetze');
         var mstore = Ext.getStore('StaMesseinheiten');
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/store/Info.js
--- a/app/store/Info.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/store/Info.js	Fri Oct 31 23:23:32 2014 +0100
@@ -19,7 +19,13 @@
  */
 Ext.define('Lada.store.Info', {
     extend: 'Ext.data.Store',
-    fields: ['user', 'groups', 'version'],
+
+    fields: [
+        'user',
+        'groups',
+        'version'
+    ],
+
     proxy: {
          type: 'rest',
          url: 'server/rest/info',
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/store/Queries.js
--- a/app/store/Queries.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/store/Queries.js	Fri Oct 31 23:23:32 2014 +0100
@@ -11,6 +11,6 @@
  */
 Ext.define('Lada.store.Queries', {
     extend: 'Ext.data.Store',
-    autoLoad: true,
-    model: 'Lada.model.Query'
+    model: 'Lada.model.Query',
+    autoLoad: true
 });
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/store/StaVerwaltungseinheiten.js
--- a/app/store/StaVerwaltungseinheiten.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/store/StaVerwaltungseinheiten.js	Fri Oct 31 23:23:32 2014 +0100
@@ -11,7 +11,7 @@
  */
 Ext.define('Lada.store.StaVerwaltungseinheiten', {
     extend: 'Ext.data.Store',
-    fields: ['gemId', 'bezeichnung', 'longitude', 'latitude'],
+    model: 'Lada.model.StaVerwaltungseinheit',
     sorters: [{
         property: 'bezeichnung'
     }],
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/About.js
--- a/app/view/About.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/About.js	Fri Oct 31 23:23:32 2014 +0100
@@ -26,17 +26,16 @@
     initComponent: function() {
         var sver = "1.0";
         var cver = "1.0";
-        this.buttons = [
-            {
-                text: 'Abbrechen',
-                scope: this,
-                handler: this.close
-            }
+        this.buttons = [{
+            text: 'Abbrechen',
+            scope: this,
+            handler: this.close
+        }];
+        this.items = [{
+            html: "<h1>Lada</h1>Server version: " +
+                sver + "<br>Client version: " +cver }
         ];
-        this.items = [ 
-            { html: "<h1>Lada</h1>Server version: " + sver + "<br>Client version: " + cver }
-        ];
-        this.callParent();
+        this.callParent(arguments);
     }
 });
 
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/Viewport.js
--- a/app/view/Viewport.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/Viewport.js	Fri Oct 31 23:23:32 2014 +0100
@@ -92,7 +92,9 @@
             },
             callback: function() {
                 var model = store.data.items[0];
-                var win = Ext.create('Lada.view.messwerte.Create', {model: model});
+                var win = Ext.create('Lada.view.messwerte.Create', {
+                    model: model
+                });
             }
         });
     },
@@ -102,7 +104,9 @@
      */
     initOrt: function() {
         var ort = Ext.create('Lada.model.Ort');
-        var win = Ext.create('Lada.view.orte.Create', {model: ort});
+        var win = Ext.create('Lada.view.orte.Create', {
+            model: ort
+        });
     },
     /**
      * Function to initialize the edit window for a priticular ort directly
@@ -160,73 +164,76 @@
                 type: 'vbox',
                 align: 'stretch'
             },
-            dockedItems: [
-                {
-                    xtype: "toolbar",
-                    dock: "top",
-                    items: [{
-                        xtype: "splitbutton",
-                        text: "Info",
-                        menu: {
-                            items: [{
-                                id: 'AboutBtn',
-                                text: "About"
-                            }]
-                        }
-                    },
-                    "->",
-                    {xtype: 'box', autoEl: {tag: 'img', src:'gfx/user-identity.png'}},
-                    {xtype: "tbtext", id:"userinfo", text:""},
-                    {xtype: 'box', autoEl: {tag: 'img', src:'gfx/network-workgroup.png'}},
-                    {xtype: "tbtext", id:"groupinfo", text:""}
-                    ]
-                }
-            ],
-            items: [
+            dockedItems: [{
+                xtype: "toolbar",
+                dock: "top",
+                items: [{
+                    xtype: "splitbutton",
+                    text: "Info",
+                    menu: {
+                        items: [{
+                            id: 'AboutBtn',
+                            text: "About"
+                        }]
+                    }
+                }, "->", {
+                    xtype: 'box',
+                    autoEl: {
+                        tag: 'img',
+                        src:'gfx/user-identity.png'
+                    }
+                }, {
+                    xtype: "tbtext",
+                    id:"userinfo",
+                    text:""
+                }, {
+                    xtype: 'box',
+                    autoEl: {
+                        tag: 'img',
+                        src:'gfx/network-workgroup.png'
+                    }
+                }, {
+                    xtype: "tbtext",
+                    id:"groupinfo",
+                    text:""
+                }]
+            }],
+            items: [{
                 // Auswahl einer Abfrage.
-                {
-                    xtype: 'queryselector',
-                    id: 'queryselector',
-                    margin: '0 0 10 0'
-                },
-                // Variables settings for the current selected sql statement.
-                {
-                    xtype: 'fieldset',
-                    id: 'queryfilters',
-                    title: 'Variablenbelegung',
-                    hidden: true,
-                    items: []
-                },
-                // Buttons to trigger the search.
-                {
-                    id: 'SearchBtnPanel',
-                    xtype: 'panel',
-                    border: false,
-                    margin: '0 0 10 0',
-                    items: [
-                        {
-                            id: 'SearchBtn',
-                            text: 'Suchen',
-                            xtype: 'button',
-                            margin: '0 10 0 0'
-                        },
-                        {
-                            id: 'ResetBtn',
-                            text: 'Zurücksetzen',
-                            xtype: 'button'
-                        }
-                    ],
-                    hidden: false
-
-                },
-                // Resultlist for the query.
-                {
-                    id: 'result',
-                    flex: 1,
-                    xtype: 'probenlist',
-                    hidden: false
-                }
-            ]
+                xtype: 'queryselector',
+                id: 'queryselector',
+                margin: '0 0 10 0'
+            }, {
+            // Variables settings for the current selected sql statement.
+                xtype: 'fieldset',
+                id: 'queryfilters',
+                title: 'Variablenbelegung',
+                hidden: true,
+                items: []
+            }, {
+            // Buttons to trigger the search.
+                id: 'SearchBtnPanel',
+                xtype: 'panel',
+                border: false,
+                margin: '0 0 10 0',
+                items: [{
+                    id: 'SearchBtn',
+                    text: 'Suchen',
+                    xtype: 'button',
+                    margin: '0 10 0 0'
+                }, {
+                    id: 'ResetBtn',
+                    text: 'Zurücksetzen',
+                    xtype: 'button'
+                }],
+                hidden: false
+            }, {
+            // Resultlist for the query.
+                id: 'result',
+                flex: 1,
+                xtype: 'probenlist',
+                hidden: false
+            }]
         }];
     }
 });
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/kommentare/Create.js
--- a/app/view/kommentare/Create.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/kommentare/Create.js	Fri Oct 31 23:23:32 2014 +0100
@@ -12,6 +12,9 @@
 Ext.define('Lada.view.kommentare.Create', {
     extend: 'Ext.window.Window',
     alias: 'widget.kommentarecreate',
+    requires: [
+        'Lada.view.kommentare.CreateForm'
+    ],
 
     title: 'Maske für Kommentare',
     // Make size of the dialog dependend of the available space.
@@ -20,24 +23,19 @@
     autoScroll: true,
     modal: true,
 
-    requires: [
-        'Lada.view.kommentare.CreateForm'
-    ],
     initComponent: function() {
-        this.buttons = [
-            {
-                text: 'Speichern',
-                scope: form,
-                action: 'save'
-            },
-            {
-                text: 'Abbrechen',
-                scope: this,
-                handler: this.close
-            }
-        ];
-        var form = Ext.create('Lada.view.kommentare.CreateForm', this.initialConfig);
+        this.buttons = [{
+            text: 'Speichern',
+            scope: form,
+            action: 'save'
+        }, {
+            text: 'Abbrechen',
+            scope: this,
+            handler: this.close
+        }];
+        var form = Ext.create('Lada.view.kommentare.CreateForm',
+            this.initialConfig);
         this.items = [form];
-        this.callParent();
+        this.callParent(arguments);
     }
 });
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/kommentare/CreateForm.js
--- a/app/view/kommentare/CreateForm.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/kommentare/CreateForm.js	Fri Oct 31 23:23:32 2014 +0100
@@ -12,24 +12,21 @@
 Ext.define('Lada.view.kommentare.CreateForm', {
     extend: 'Lada.view.widgets.LadaForm',
     model: 'Lada.model.Kommentar',
+
     initComponent: function() {
-        this.items = [
-            {
-                xtype: 'mst',
-                name: 'erzeuger',
-                fieldLabel: 'Erzeuger'
-            },
-            {
-                xtype: 'datetime',
-                name: 'datum',
-                fieldLabel: 'Datum'
-            },
-            {
-                xtype: 'textareafield',
-                name: 'text',
-                fieldLabel: 'Text'
-            }
-        ];
-        this.callParent();
+        this.items = [{
+            xtype: 'mst',
+            name: 'erzeuger',
+            fieldLabel: 'Erzeuger'
+        }, {
+            xtype: 'datetime',
+            name: 'datum',
+            fieldLabel: 'Datum'
+        }, {
+            xtype: 'textareafield',
+            name: 'text',
+            fieldLabel: 'Text'
+        }];
+        this.callParent(arguments);
     }
 });
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/kommentare/List.js
--- a/app/view/kommentare/List.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/kommentare/List.js	Fri Oct 31 23:23:32 2014 +0100
@@ -12,6 +12,7 @@
 Ext.define('Lada.view.kommentare.List' ,{
     extend: 'Ext.grid.Panel',
     alias: 'widget.kommentarelist',
+
     store: 'KommentareP',
     viewConfig: {
         maxHeight: 350,
@@ -22,31 +23,33 @@
         deferEmptyText: false
     },
     probeId: null,
+
     initComponent: function() {
-        this.dockedItems = [
-            {
-                xtype: 'toolbar',
-                dock: 'top',
-                items: [
-                    {
-                        text: 'Hinzufügen',
-                        icon: 'gfx/list-add.png',
-                        action: 'add',
-                        probeId: this.probeId
-                    },
-                    {
-                        text: 'Löschen',
-                        icon: 'gfx/list-remove.png',
-                        action: 'delete'
-                    }
-                ]
-            }
-        ];
-        this.columns = [
-            {header: 'Erzeuger', dataIndex: 'erzeuger'},
-            {header: 'Datum', dataIndex: 'kdatum'},
-            {header: 'Text', dataIndex: 'ktext', flex: 1}
-        ];
+        this.dockedItems = [{
+            xtype: 'toolbar',
+            dock: 'top',
+            items: [{
+                text: 'Hinzufügen',
+                icon: 'gfx/list-add.png',
+                action: 'add',
+                probeId: this.probeId
+            }, {
+                text: 'Löschen',
+                icon: 'gfx/list-remove.png',
+                action: 'delete'
+            }]
+        }];
+        this.columns = [{
+            header: 'Erzeuger',
+            dataIndex: 'erzeuger'
+        }, {
+            header: 'Datum',
+            dataIndex: 'kdatum'
+        }, {
+            header: 'Text',
+            dataIndex: 'ktext',
+            flex: 1
+        }];
         this.callParent(arguments);
     }
 });
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/messungen/Create.js
--- a/app/view/messungen/Create.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/messungen/Create.js	Fri Oct 31 23:23:32 2014 +0100
@@ -12,32 +12,30 @@
 Ext.define('Lada.view.messungen.Create', {
     extend: 'Ext.window.Window',
     alias: 'widget.messungencreate',
+    requires: [
+        'Lada.view.messungen.CreateForm'
+    ],
 
     title: 'Maske für Messungen',
     autoShow: true,
     autoScroll: true,
     modal: true,
 
-    requires: [
-        'Lada.view.messungen.CreateForm'
-    ],
     initComponent: function() {
-        this.buttons = [
-            {
-                text: 'Speichern',
-                scope: form,
-                action: 'save'
-            },
-            {
-                text: 'Abbrechen',
-                scope: this,
-                handler: this.close
-            }
-        ];
+        this.buttons = [{
+            text: 'Speichern',
+            scope: form,
+            action: 'save'
+        }, {
+            text: 'Abbrechen',
+            scope: this,
+            handler: this.close
+        }];
         this.width = Ext.getBody().getViewSize().width - 30;
         this.height = Ext.getBody().getViewSize().height - 30;
-        var form = Ext.create('Lada.view.messungen.CreateForm', this.initialConfig);
+        var form = Ext.create('Lada.view.messungen.CreateForm',
+            this.initialConfig);
         this.items = [form];
-        this.callParent();
+        this.callParent(arguments);
     }
 });
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/messungen/CreateForm.js
--- a/app/view/messungen/CreateForm.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/messungen/CreateForm.js	Fri Oct 31 23:23:32 2014 +0100
@@ -11,47 +11,42 @@
  */
 Ext.define('Lada.view.messungen.CreateForm', {
     extend: 'Lada.view.widgets.LadaForm',
-    model: 'Lada.model.Messung',
     requires: [
         'Lada.view.widgets.Messmethode',
         'Lada.view.widgets.Testdatensatz'
     ],
+
+    model: 'Lada.model.Messung',
+
     initComponent: function() {
-        this.items = [
-            {
-                xtype: 'textfield',
-                name: 'nebenprobenNr',
-                maxLength: 10,
-                fieldLabel: 'NPR'
-            },
-            {
-                xtype: 'messmethode',
-                name: 'mmtId',
-                fieldLabel: 'MMT'
-            },
-            {
-                xtype: 'datetime',
-                name: 'messzeitpunkt',
-                fieldLabel: 'Messzeitpunkt'
-            },
-            {
-                xtype: 'numberfield',
-                allowDecimals: false,
-                minValue: 0,
-                name: 'messdauer',
-                fieldLabel: 'Messdauer'
-            },
-            {
-                xtype: 'testdatensatz',
-                name: 'fertig',
-                fieldLabel: 'Fertig'
-            },
-            {
-                xtype: 'testdatensatz',
-                name: 'geplant',
-                fieldLabel: 'Geplant'
-            }
-        ];
-        this.callParent();
+        this.items = [{
+            xtype: 'textfield',
+            name: 'nebenprobenNr',
+            maxLength: 10,
+            fieldLabel: 'NPR'
+        }, {
+            xtype: 'messmethode',
+            name: 'mmtId',
+            fieldLabel: 'MMT'
+        }, {
+            xtype: 'datetime',
+            name: 'messzeitpunkt',
+            fieldLabel: 'Messzeitpunkt'
+        }, {
+            xtype: 'numberfield',
+            allowDecimals: false,
+            minValue: 0,
+            name: 'messdauer',
+            fieldLabel: 'Messdauer'
+        }, {
+            xtype: 'testdatensatz',
+            name: 'fertig',
+            fieldLabel: 'Fertig'
+        }, {
+            xtype: 'testdatensatz',
+            name: 'geplant',
+            fieldLabel: 'Geplant'
+        }];
+        this.callParent(arguments);
     }
 });
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/messungen/Edit.js
--- a/app/view/messungen/Edit.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/messungen/Edit.js	Fri Oct 31 23:23:32 2014 +0100
@@ -12,31 +12,29 @@
 Ext.define('Lada.view.messungen.Edit', {
     extend: 'Ext.window.Window',
     alias: 'widget.messungenedit',
+    requires: [
+        'Lada.view.messungen.EditForm'
+    ],
 
     title: 'Maske für Messungen',
     autoShow: true,
     autoScroll: true,
     modal: true,
 
-    requires: [
-        'Lada.view.messungen.EditForm'
-    ],
     initComponent: function() {
-        this.buttons = [
-            {
-                text: 'Speichern',
-                scope: form,
-                action: 'save'
-            },
-            {
-                text: 'Abbrechen',
-                scope: this,
-                handler: this.close
-            }
-        ];
+        this.buttons = [{
+            text: 'Speichern',
+            scope: form,
+            action: 'save'
+        }, {
+            text: 'Abbrechen',
+            scope: this,
+            handler: this.close
+        }];
         this.width = Ext.getBody().getViewSize().width - 30;
         this.height = Ext.getBody().getViewSize().height - 30;
-        var form = Ext.create('Lada.view.messungen.EditForm', this.initialConfig);
+        var form = Ext.create('Lada.view.messungen.EditForm',
+            this.initialConfig);
         this.items = [form];
         this.callParent();
     }
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/messungen/EditForm.js
--- a/app/view/messungen/EditForm.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/messungen/EditForm.js	Fri Oct 31 23:23:32 2014 +0100
@@ -11,7 +11,7 @@
  */
 Ext.define('Lada.view.messungen.EditForm', {
     extend: 'Lada.view.widgets.LadaForm',
-    model: 'Lada.model.Messung',
+
     requires: [
         'Lada.view.widgets.Messmethode',
         'Lada.view.widgets.Testdatensatz',
@@ -19,87 +19,74 @@
         'Lada.view.status.List',
         'Lada.view.messwerte.List'
     ],
+
+    model: 'Lada.model.Messung',
+
     initComponent: function() {
-        this.items = [
-            {
-                xtype: 'textfield',
-                name: 'nebenprobenNr',
-                maxLength: 10,
-                fieldLabel: 'NPR'
-            },
-            {
-                xtype: 'messmethode',
-                name: 'mmtId',
-                fieldLabel: 'MMT'
-            },
-            {
-                xtype: 'datetime',
-                name: 'messzeitpunkt',
-                fieldLabel: 'Messzeitpunkt'
-            },
-            {
-                xtype: 'numberfield',
-                allowDecimals: false,
-                minValue: 0,
-                name: 'messdauer',
-                fieldLabel: 'Messdauer'
-            },
-            {
-                xtype: 'testdatensatz',
-                name: 'fertig',
-                fieldLabel: 'Fertig'
-            },
-            {
-                xtype: 'testdatensatz',
-                name: 'geplant',
-                fieldLabel: 'Geplant'
-            },
+        this.items = [{
+            xtype: 'textfield',
+            name: 'nebenprobenNr',
+            maxLength: 10,
+            fieldLabel: 'NPR'
+        }, {
+            xtype: 'messmethode',
+            name: 'mmtId',
+            fieldLabel: 'MMT'
+        }, {
+            xtype: 'datetime',
+            name: 'messzeitpunkt',
+            fieldLabel: 'Messzeitpunkt'
+        }, {
+            xtype: 'numberfield',
+            allowDecimals: false,
+            minValue: 0,
+            name: 'messdauer',
+            fieldLabel: 'Messdauer'
+        }, {
+            xtype: 'testdatensatz',
+            name: 'fertig',
+            fieldLabel: 'Fertig'
+        }, {
+            xtype: 'testdatensatz',
+            name: 'geplant',
+            fieldLabel: 'Geplant'
+        }, {
             // Messwerte
-            {
-                xtype: 'fieldset',
-                title: 'Messwerte',
-                collapsible: true,
-                collapsed: false,
-                padding: '10 10',
-                items: [
-                    {
-                        xtype: 'messwertelist',
-                        parentId: this.model.get('messungsId'),
-                        probeId: this.model.get('probeId')
-                    }
-                ]
-            },
+            xtype: 'fieldset',
+            title: 'Messwerte',
+            collapsible: true,
+            collapsed: false,
+            padding: '10 10',
+            items: [{
+                xtype: 'messwertelist',
+                parentId: this.model.get('messungsId'),
+                probeId: this.model.get('probeId')
+            }]
+        }, {
             // Status
-            {
-                xtype: 'fieldset',
-                title: 'Messungsstatus',
-                collapsible: true,
-                collapsed: false,
-                padding: '10 10',
-                items: [
-                    {
-                        xtype: 'statuslist',
-                        parentId: this.model.get('messungsId'),
-                        probeId: this.model.get('probeId')
-                    }
-                ]
-            },
+            xtype: 'fieldset',
+            title: 'Messungsstatus',
+            collapsible: true,
+            collapsed: false,
+            padding: '10 10',
+            items: [{
+                xtype: 'statuslist',
+                parentId: this.model.get('messungsId'),
+                probeId: this.model.get('probeId')
+            }]
+        }, {
             // Messungskommentare
-            {
-                xtype: 'fieldset',
-                title: 'Messungskommentare',
-                collapsible: true,
-                collapsed: false,
-                padding: '10 10',
-                items: [
-                    {
-                        xtype: 'mkommentarelist',
-                        parentId: this.model.get('messungsId'),
-                        probeId: this.model.get('probeId')
-                    }
-                ]
-            }
-        ];
-        this.callParent();
+            xtype: 'fieldset',
+            title: 'Messungskommentare',
+            collapsible: true,
+            collapsed: false,
+            padding: '10 10',
+            items: [{
+                xtype: 'mkommentarelist',
+                parentId: this.model.get('messungsId'),
+                probeId: this.model.get('probeId')
+            }]
+        }];
+        this.callParent(arguments);
     }
 });
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/messungen/List.js
--- a/app/view/messungen/List.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/messungen/List.js	Fri Oct 31 23:23:32 2014 +0100
@@ -12,6 +12,7 @@
 Ext.define('Lada.view.messungen.List' ,{
     extend: 'Ext.grid.Panel',
     alias: 'widget.messungenlist',
+
     store: 'Messungen',
     viewConfig: {
         maxHeight: 350,
@@ -21,91 +22,94 @@
         minHeight: 35,
         deferEmptyText: false
     },
+
     probeId: null,
+
     initComponent: function() {
-        this.dockedItems = [
-            {
-                xtype: 'toolbar',
-                dock: 'top',
-                items: [
-                    {
-                        text: 'Hinzufügen',
-                        icon: 'gfx/list-add.png',
-                        action: 'add',
-                        probeId: this.probeId
-                    },
-                    {
-                        text: 'Löschen',
-                        icon: 'gfx/list-remove.png',
-                        action: 'delete'
+        this.dockedItems = [{
+            xtype: 'toolbar',
+            dock: 'top',
+            items: [{
+                text: 'Hinzufügen',
+                icon: 'gfx/list-add.png',
+                action: 'add',
+                probeId: this.probeId
+            }, {
+                text: 'Löschen',
+                icon: 'gfx/list-remove.png',
+                action: 'delete'
+            }]
+        }];
+        this.columns = [{
+            header: 'Mess.ID',
+            dataIndex: "id",
+            width: 50
+        }, {
+            header: 'NPR-Nr.',
+            dataIndex: "nebenprobenNr",
+            width: 50
+        }, {
+            header: 'MMT',
+            dataIndex: "mmtId",
+            width: 50
+        }, {
+            header: 'Messzeit',
+            dataIndex: "messzeitpunkt"
+        }, {
+            header: 'Status',
+            dataIndex: 'id',
+            renderer: function(value) {
+                var sstore = Ext.getStore('Status');
+                sstore.load({
+                    params: {
+                        probeId: value.probeId,
+                        messungsId: value.id
                     }
-                ]
-            }
-        ];
-        this.columns = [
-            {header: 'Mess.ID', dataIndex: "id", width: 50},
-            {header: 'NPR-Nr.', dataIndex: "nebenprobenNr", width: 50},
-            {header: 'MMT', dataIndex: "mmtId", width: 50},
-            {header: 'Messzeit', dataIndex: "messzeitpunkt"},
-            {
-                header: 'Status',
-                dataIndex: 'id',
-                renderer: function(value) {
-                    var sstore = Ext.getStore('Status');
-                    sstore.load({
-                        params: {
-                            probeId: value.probeId,
-                            messungsId: value.id
-                        }
-                    });
-                    if (sstore.getTotalCount() === 0) {
-                        return "unbekannt";
-                    } else {
-                        return sstore.last().get('status');
-                    }
-                }
-            },
-            {
-                header: 'OK-Flag',
-                dataIndex: "fertig",
-                renderer: function(value) {
-                    if (value) {
-                        return "Ja";
-                    } else {
-                        return "Nein";
-                    }
-                }
-             },
-            {
-                header: 'Anzahl Nuklide',
-                dataIndex: 'id',
-                renderer: function(value) {
-                    var mstore = Ext.getStore('Messwerte');
-                    mstore.load({
-                        params: {
-                            probeId: value.probeId,
-                            messungsId: value.id
-                        }
-                    });
-                    return mstore.getTotalCount();
-                }
-            },
-            {
-                header: 'Anzahl Kommentare',
-                flex: 1,
-                dataIndex: 'id',
-                renderer: function(value) {
-                    var kstore = Ext.getStore('KommentareM');
-                    kstore.load({
-                        params: {
-                            probeId: value.probeId,
-                            messungsId: value.id
-                        }
-                    });
-                    return kstore.getTotalCount();
+                });
+                if (sstore.getTotalCount() === 0) {
+                    return "unbekannt";
+                } else {
+                    return sstore.last().get('status');
                 }
             }
-        ];
+        }, {
+            header: 'OK-Flag',
+            dataIndex: "fertig",
+            renderer: function(value) {
+                if (value) {
+                    return "Ja";
+                } else {
+                    return "Nein";
+                }
+            }
+         }, {
+            header: 'Anzahl Nuklide',
+            dataIndex: 'id',
+            renderer: function(value) {
+                var mstore = Ext.getStore('Messwerte');
+                mstore.load({
+                    params: {
+                        probeId: value.probeId,
+                        messungsId: value.id
+                    }
+                });
+                return mstore.getTotalCount();
+            }
+        }, {
+            header: 'Anzahl Kommentare',
+            flex: 1,
+            dataIndex: 'id',
+            renderer: function(value) {
+                var kstore = Ext.getStore('KommentareM');
+                kstore.load({
+                    params: {
+                        probeId: value.probeId,
+                        messungsId: value.id
+                    }
+                });
+                return kstore.getTotalCount();
+            }
+        }];
         this.callParent(arguments);
     }
 });
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/messwerte/Create.js
--- a/app/view/messwerte/Create.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/messwerte/Create.js	Fri Oct 31 23:23:32 2014 +0100
@@ -19,20 +19,18 @@
     modal: true,
 
     initComponent: function() {
-        this.buttons = [
-            {
-                text: 'Speichern',
-                scope: form,
-                action: 'save'
-            },
-            {
-                text: 'Abbrechen',
-                scope: this,
-                handler: this.close
-            }
-        ];
-        var form = Ext.create('Lada.view.messwerte.CreateForm', this.initialConfig);
+        this.buttons = [{
+            text: 'Speichern',
+            scope: form,
+            action: 'save'
+        }, {
+            text: 'Abbrechen',
+            scope: this,
+            handler: this.close
+        }];
+        var form = Ext.create('Lada.view.messwerte.CreateForm',
+            this.initialConfig);
         this.items = [form];
-        this.callParent();
+        this.callParent(arguments);
     }
 });
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/messwerte/CreateForm.js
--- a/app/view/messwerte/CreateForm.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/messwerte/CreateForm.js	Fri Oct 31 23:23:32 2014 +0100
@@ -11,45 +11,40 @@
  */
 Ext.define('Lada.view.messwerte.CreateForm', {
     extend: 'Lada.view.widgets.LadaForm',
-    model: 'Lada.model.Messwert',
     requires: [
         'Lada.view.widgets.Messgroesse',
         'Lada.view.widgets.Messeinheit',
         'Lada.view.widgets.Nwg'
     ],
+
+    model: 'Lada.model.Messwert',
+
     initComponent: function() {
-        this.items = [
-            {
-                xtype: 'numberfield',
-                name: 'messwert',
-                fieldLabel: 'Messwert'
-            },
-            {
-                xtype: 'nwg',
-                name: 'messwertNwg',
-                fieldLabel: 'Messwert zu NWG'
-            },
-            {
-                xtype: 'numberfield',
-                name: 'nwgZuMesswert',
-                fieldLabel: 'Nachweisgrenze'
-            },
-            {
-                xtype: 'numberfield',
-                name: 'messfehler',
-                fieldLabel: 'Messfehler'
-            },
-            {
-                xtype: 'messgroesse',
-                name: 'messgroesseId',
-                fieldLabel: 'Messgroesse'
-            },
-            {
-                xtype: 'messeinheit',
-                name: 'mehId',
-                fieldLabel: 'Messeinheit'
-            }
-        ];
-        this.callParent();
+        this.items = [{
+            xtype: 'numberfield',
+            name: 'messwert',
+            fieldLabel: 'Messwert'
+        }, {
+            xtype: 'nwg',
+            name: 'messwertNwg',
+            fieldLabel: 'Messwert zu NWG'
+        }, {
+            xtype: 'numberfield',
+            name: 'nwgZuMesswert',
+            fieldLabel: 'Nachweisgrenze'
+        }, {
+            xtype: 'numberfield',
+            name: 'messfehler',
+            fieldLabel: 'Messfehler'
+        }, {
+            xtype: 'messgroesse',
+            name: 'messgroesseId',
+            fieldLabel: 'Messgroesse'
+        }, {
+            xtype: 'messeinheit',
+            name: 'mehId',
+            fieldLabel: 'Messeinheit'
+        }];
+        this.callParent(arguments);
     }
 });
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/messwerte/List.js
--- a/app/view/messwerte/List.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/messwerte/List.js	Fri Oct 31 23:23:32 2014 +0100
@@ -13,6 +13,7 @@
     extend: 'Ext.grid.Panel',
     require: ['Lada.store.StaMesseinheit'],
     alias: 'widget.messwertelist',
+
     store: 'Messwerte',
     viewConfig: {
         maxHeight: 350,
@@ -22,73 +23,66 @@
         minHeight: 35,
         deferEmptyText: false
     },
+
     probeId: null,
     parentId: null,
+
     initComponent: function() {
-        this.dockedItems = [
-            {
-                xtype: 'toolbar',
-                dock: 'top',
-                items: [
-                    {
-                        text: 'Hinzufügen',
-                        icon: 'gfx/list-add.png',
-                        action: 'add',
-                        probeId: this.probeId,
-                        parentId: this.parentId
-                    },
-                    {
-                        text: 'Löschen',
-                        icon: 'gfx/list-remove.png',
-                        action: 'delete'
-                    }
-                ]
+        this.dockedItems = [{
+            xtype: 'toolbar',
+            dock: 'top',
+            items: [{
+                text: 'Hinzufügen',
+                icon: 'gfx/list-add.png',
+                action: 'add',
+                probeId: this.probeId,
+                parentId: this.parentId
+            }, {
+                text: 'Löschen',
+                icon: 'gfx/list-remove.png',
+                action: 'delete'
+            }]
+        }];
+        this.columns = [{
+            header: '<NWG',
+            dataIndex: 'messwertNwg'
+        }, {
+            header: 'Messwert',
+            dataIndex: 'messwert'
+        }, {
+            header: 'Messfehler',
+            dataIndex: 'messfehler'
+        }, {
+            header: 'Messgröße',
+            dataIndex: 'messgroesseId',
+            renderer: function(value) {
+                var store = Ext.getStore('StaMessgroessen');
+                return store.findRecord('id', value).get('messgroesse');
             }
-        ];
-        this.columns = [
-            {
-                header: '<NWG',
-                dataIndex: 'messwertNwg'
-            },
-            {
-                header: 'Messwert',
-                dataIndex: 'messwert'
-            },
-            {header: 'Messfehler', dataIndex: 'messfehler'},
-            {
-                header: 'Messgröße',
-                dataIndex: 'messgroesseId',
-                renderer: function(value) {
-                    var store = Ext.getStore('StaMessgroessen');
-                    return store.findRecord('id', value).get('messgroesse');
+        }, {
+            header: 'Messeinheit',
+            dataIndex: 'mehId',
+            renderer: function(value) {
+                console.log('einheit: ' + value);
+                var store = Ext.data.StoreManager.get('StaMesseinheiten');
+/*                    if (!store) {
+                    store = Ext.create('Lada.store.StaMesseinheiten');
                 }
-            },
-            {
-                header: 'Messeinheit',
-                dataIndex: 'mehId',
-                renderer: function(value) {
-                    console.log('einheit: ' + value);
-                    var store = Ext.data.StoreManager.get('StaMesseinheiten');
-/*                    if (!store) {
-                        store = Ext.create('Lada.store.StaMesseinheiten');
-                    }
 */                    console.log(store.getById(value));
-                    return store.findRecord('id', value).get('einheit');
-                }
-            },
-            {
-                header: 'Grenzwertüberschreitung',
-                dataIndex: 'grenzwertueberschreitung',
-                flex: 1,
-                renderer: function(value) {
-                    if (value === true) {
-                        return "Ja";
-                    } else {
-                        return "Nein";
-                    }
+                return store.findRecord('id', value).get('einheit');
+            }
+        }, {
+            header: 'Grenzwertüberschreitung',
+            dataIndex: 'grenzwertueberschreitung',
+            flex: 1,
+            renderer: function(value) {
+                if (value === true) {
+                    return "Ja";
+                } else {
+                    return "Nein";
                 }
             }
-        ];
+        }];
         this.callParent(arguments);
     }
 });
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/mkommentare/Create.js
--- a/app/view/mkommentare/Create.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/mkommentare/Create.js	Fri Oct 31 23:23:32 2014 +0100
@@ -24,19 +24,17 @@
         'Lada.view.mkommentare.CreateForm'
     ],
     initComponent: function() {
-        this.buttons = [
-            {
-                text: 'Speichern',
-                scope: form,
-                action: 'save'
-            },
-            {
-                text: 'Abbrechen',
-                scope: this,
-                handler: this.close
-            }
-        ];
-        var form = Ext.create('Lada.view.mkommentare.CreateForm', this.initialConfig);
+        this.buttons = [{
+            text: 'Speichern',
+            scope: form,
+            action: 'save'
+        }, {
+            text: 'Abbrechen',
+            scope: this,
+            handler: this.close
+        }];
+        var form = Ext.create('Lada.view.mkommentare.CreateForm',
+            this.initialConfig);
         this.items = [form];
         this.callParent();
     }
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/mkommentare/CreateForm.js
--- a/app/view/mkommentare/CreateForm.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/mkommentare/CreateForm.js	Fri Oct 31 23:23:32 2014 +0100
@@ -13,24 +13,20 @@
     extend: 'Lada.view.widgets.LadaForm',
     model: 'Lada.model.KommentarM',
     initComponent: function() {
-        this.items = [
-            {
-                xtype: 'mst',
-                name: 'erzeuger',
-                fieldLabel: 'Erzeuger'
-            },
-            {
-                xtype: 'datetime',
-                name: 'datum',
-                fieldLabel: 'Datum'
-            },
-            {
-                xtype: 'textareafield',
-                maxLength: 1024,
-                name: 'text',
-                fieldLabel: 'Text'
-            }
-        ];
-        this.callParent();
+        this.items = [{
+            xtype: 'mst',
+            name: 'erzeuger',
+            fieldLabel: 'Erzeuger'
+        }, {
+            xtype: 'datetime',
+            name: 'datum',
+            fieldLabel: 'Datum'
+        }, {
+            xtype: 'textareafield',
+            maxLength: 1024,
+            name: 'text',
+            fieldLabel: 'Text'
+        }];
+        this.callParent(arguments);
     }
 });
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/mkommentare/List.js
--- a/app/view/mkommentare/List.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/mkommentare/List.js	Fri Oct 31 23:23:32 2014 +0100
@@ -12,6 +12,7 @@
 Ext.define('Lada.view.mkommentare.List' ,{
     extend: 'Ext.grid.Panel',
     alias: 'widget.mkommentarelist',
+
     store: 'KommentareM',
     viewConfig: {
         maxHeight: 350,
@@ -21,34 +22,37 @@
         minHeight: 35,
         deferEmptyText: false
     },
+
     probeId: null,
     parentId: null,
+
     initComponent: function() {
-        this.dockedItems = [
-            {
-                xtype: 'toolbar',
-                dock: 'top',
-                items: [
-                    {
-                        text: 'Hinzufügen',
-                        icon: 'gfx/list-add.png',
-                        action: 'add',
-                        probeId: this.probeId,
-                        parentId: this.parentId
-                    },
-                    {
-                        text: 'Löschen',
-                        icon: 'gfx/list-remove.png',
-                        action: 'delete'
-                    }
-                ]
-            }
-        ];
-        this.columns = [
-            {header: 'Erzeuger', dataIndex: 'erzeuger'},
-            {header: 'Datum', dataIndex: 'datum'},
-            {header: 'Text', dataIndex: 'text', flex: 1}
-        ];
+        this.dockedItems = [{
+            xtype: 'toolbar',
+            dock: 'top',
+            items: [{
+                text: 'Hinzufügen',
+                icon: 'gfx/list-add.png',
+                action: 'add',
+                probeId: this.probeId,
+                parentId: this.parentId
+            }, {
+                text: 'Löschen',
+                icon: 'gfx/list-remove.png',
+                action: 'delete'
+            }]
+        }];
+        this.columns = [{
+            header: 'Erzeuger',
+            dataIndex: 'erzeuger'
+        }, {
+            header: 'Datum',
+            dataIndex: 'datum'
+        }, {
+            header: 'Text',
+            dataIndex: 'text',
+            flex: 1
+        }];
         this.callParent(arguments);
     }
 });
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/orte/Create.js
--- a/app/view/orte/Create.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/orte/Create.js	Fri Oct 31 23:23:32 2014 +0100
@@ -22,19 +22,17 @@
         'Lada.view.orte.CreateForm'
     ],
     initComponent: function() {
-        this.buttons = [
-            {
-                text: 'Speichern',
-                scope: form,
-                action: 'save'
-            },
-            {
-                text: 'Abbrechen',
-                scope: this,
-                handler: this.close
-            }
-        ];
-        var form = Ext.create('Lada.view.orte.CreateForm', this.initialConfig);
+        this.buttons = [{
+            text: 'Speichern',
+            scope: form,
+            action: 'save'
+        }, {
+            text: 'Abbrechen',
+            scope: this,
+            handler: this.close
+        }];
+        var form = Ext.create('Lada.view.orte.CreateForm',
+            this.initialConfig);
         this.items = [form];
         this.callParent();
     }
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/orte/CreateForm.js
--- a/app/view/orte/CreateForm.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/orte/CreateForm.js	Fri Oct 31 23:23:32 2014 +0100
@@ -20,112 +20,106 @@
     ],
     edit: false,
     initComponent: function() {
-        this.items = [
-            {
-                xtype: 'ortdetail',
-                name: 'ortId',
-                fieldLabel: 'Ort',
-                listeners: {
-                    scope: this,
-                    'change': function (field, newv, oldv, opts) {
-                        if (field.up('window')) {
-                            field.up('window').down('fieldset').show();
-                        }
-                        var orte = Ext.getStore('StaOrte');
-                        var ort = orte.getById(newv);
-                        var fields = ['beschreibung', 'bezeichnung', 'hoeheLand',
-                                      'latitude', 'longitude', 'staatId', 'gemId'];
+        this.items = [{
+            xtype: 'ortdetail',
+            name: 'ortId',
+            fieldLabel: 'Ort',
+            listeners: {
+                scope: this,
+                'change': function (field, newv, oldv, opts) {
+                    if (field.up('window')) {
+                        field.up('window').down('fieldset').show();
+                    }
+                    var orte = Ext.getStore('StaOrte');
+                    var ort = orte.getById(newv);
+                    var fields = [
+                        'beschreibung',
+                        'bezeichnung',
+                        'hoeheLand',
+                        'latitude',
+                        'longitude',
+                        'staatId',
+                        'gemId'
+                    ];
 
-                        // Load currently "selected" verwaltungseinheit.  This
-                        // is needed as without having this record the field
-                        // would only display the raw value (id) of the
-                        // verwaltungseinheit.
-                        var verw = Ext.getStore('StaVerwaltungseinheiten');
-                        if (ort) {
-                            verw.load({
-                                id: ort.get('gemId')
-                            });
-                        }
+                    // Load currently "selected" verwaltungseinheit.  This
+                    // is needed as without having this record the field
+                    // would only display the raw value (id) of the
+                    // verwaltungseinheit.
+                    var verw = Ext.getStore('StaVerwaltungseinheiten');
+                    if (ort) {
+                        verw.load({
+                            id: ort.get('gemId')
+                        });
+                    }
 
-                        var form = this.getForm();
-                        if ( ort != undefined ) {
-                            for (var i = fields.length - 1; i >= 0; i--){
-                                ffield = form.findField("ort_"+fields[i]);
-                                ffield.setValue(ort.get(fields[i]));
-                            }
+                    var form = this.getForm();
+                    if ( ort != undefined ) {
+                        for (var i = fields.length - 1; i >= 0; i--){
+                            ffield = form.findField("ort_"+fields[i]);
+                            ffield.setValue(ort.get(fields[i]));
                         }
                     }
                 }
+            }
+        }, {
+            xtype: 'textfield',
+            name: 'ortsTyp',
+            maxLength: 1,
+            fieldLabel: 'Typ'
+        }, {
+            xtype: 'textareafield',
+            name: 'ortszusatztext',
+            maxLength: 100,
+            fieldLabel: 'Ortszusatz'
+        }, {
+            xtype: 'button',
+            name: 'newort',
+            text: 'Neuen Ort Anlegen',
+            hidden: this.edit,
+            action: 'newort'
+        }, {
+            xtype: 'fieldset',
+            title: 'Ortsangaben',
+            hidden: !this.edit,
+            defaults: {
+                    labelWidth: 150
             },
-            {
+            items: [{
                 xtype: 'textfield',
-                name: 'ortsTyp',
-                maxLength: 1,
-                fieldLabel: 'Typ'
-            },
-            {
-                xtype: 'textareafield',
-                name: 'ortszusatztext',
                 maxLength: 100,
-                fieldLabel: 'Ortszusatz'
-            },
-            {
-                xtype: 'button',
-                name: 'newort',
-                text: 'Neuen Ort Anlegen',
-                hidden: this.edit,
-                action: 'newort'
-            },
-            {
-                xtype: 'fieldset',
-                title: 'Ortsangaben',
-                hidden: !this.edit,
-                defaults: {
-                        labelWidth: 150
-                },
-                items: [
-                    {
-                        xtype: 'textfield',
-                        maxLength: 100,
-                        name: 'ort_beschreibung',
-                        fieldLabel: 'Beschreibung'
-                    },
-                    {
-                        xtype: 'textfield',
-                        maxLength: 10,
-                        name: 'ort_bezeichnung',
-                        fieldLabel: 'Bezeichnung'
-                    },
-                    {
-                        xtype: 'staat',
-                        name: 'ort_staatId',
-                        fieldLabel: 'Staat'
-                    },
-                    {
-                        xtype: 'verwaltungseinheiten',
-                        name: 'ort_gemId',
-                        fieldLabel: 'Gemeinde'
-                    },
-                    {
-                        xtype: 'numberfield',
-                        name: 'ort_latitude',
-                        fieldLabel: 'Lat'
-                    },
-                    {
-                        xtype: 'numberfield',
-                        name: 'ort_longitude',
-                        fieldLabel: 'Lon'
-                    },
-                    {
-                        xtype: 'numberfield',
-                        name: 'ort_hoeheLand',
-                        fieldLabel: 'Höhe'
-                    }
-                ]
-            }
-        ];
-        this.callParent();
+                name: 'ort_beschreibung',
+                fieldLabel: 'Beschreibung'
+            }, {
+                xtype: 'textfield',
+                maxLength: 10,
+                name: 'ort_bezeichnung',
+                fieldLabel: 'Bezeichnung'
+            }, {
+                xtype: 'staat',
+                name: 'ort_staatId',
+                fieldLabel: 'Staat'
+            }, {
+                xtype: 'verwaltungseinheiten',
+                name: 'ort_gemId',
+                fieldLabel: 'Gemeinde'
+            }, {
+                xtype: 'numberfield',
+                name: 'ort_latitude',
+                fieldLabel: 'Lat'
+            }, {
+                xtype: 'numberfield',
+                name: 'ort_longitude',
+                fieldLabel: 'Lon'
+            }, {
+                xtype: 'numberfield',
+                name: 'ort_hoeheLand',
+                fieldLabel: 'Höhe'
+            }]
+        }];
+        this.callParent(arguments);
     },
+
     updateOrtInfo: function(field, oldv, newv, opts) {
         console.log(field, oldv, newv, opts);
     }
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/orte/CreateOrt.js
--- a/app/view/orte/CreateOrt.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/orte/CreateOrt.js	Fri Oct 31 23:23:32 2014 +0100
@@ -27,13 +27,11 @@
                 maxLength: 100,
                 name: 'ort_beschreibung',
                 fieldLabel: 'Beschreibung'
-            },
-            {
+            }, {
                 xtype: 'staat',
                 name: 'ort_staatId',
                 fieldLabel: 'Staat'
-            },
-            {
+            }, {
                 xtype: 'verwaltungseinheiten',
                 name: 'ort_gemId',
                 fieldLabel: 'Gemeinde',
@@ -50,18 +48,15 @@
                         }
                     }
                 }
-            },
-            {
+            }, {
                 xtype: 'numberfield',
                 name: 'ort_latitude',
                 fieldLabel: 'Lat'
-            },
-            {
+            }, {
                 xtype: 'numberfield',
                 name: 'ort_longitude',
                 fieldLabel: 'Lon'
-            },
-            {
+            }, {
                 xtype: 'numberfield',
                 name: 'ort_hoeheLand',
                 fieldLabel: 'Höhe'
@@ -69,18 +64,15 @@
         });
 
         me.items = [form];
-        this.buttons = [
-            {
-                text: 'Speichern',
-                scope: form,
-                action: 'save'
-            },
-            {
-                text: 'Abbrechen',
-                scope: this,
-                handler: this.close
-            }
-        ];
+        this.buttons = [{
+            text: 'Speichern',
+            scope: form,
+            action: 'save'
+        }, {
+            text: 'Abbrechen',
+            scope: this,
+            handler: this.close
+        }];
         this.callParent(arguments);
     }
 });
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/orte/List.js
--- a/app/view/orte/List.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/orte/List.js	Fri Oct 31 23:23:32 2014 +0100
@@ -12,6 +12,7 @@
 Ext.define('Lada.view.orte.List' ,{
     extend: 'Ext.grid.Panel',
     alias: 'widget.ortelist',
+
     store: 'Orte',
     viewConfig: {
         maxHeight: 350,
@@ -21,85 +22,72 @@
         minHeight: 35,
         deferEmptyText: false
     },
+
     probeId: null,
+
     initComponent: function() {
         this.store = Ext.data.StoreManager.get('Orte');
         if (!this.store) {
             this.store = Ext.create('Lada.store.Orte');
         }
-        this.dockedItems = [
-            {
-                xtype: 'toolbar',
-                dock: 'top',
-                items: [
-                    {
-                        text: 'Hinzufügen',
-                        icon: 'gfx/list-add.png',
-                        action: 'add',
-                        probeId: this.probeId
-                    },
-                    {
-                        text: 'Löschen',
-                        icon: 'gfx/list-remove.png',
-                        action: 'delete'
-                    }
-                ]
+        this.dockedItems = [{
+            xtype: 'toolbar',
+            dock: 'top',
+            items: [{
+                text: 'Hinzufügen',
+                icon: 'gfx/list-add.png',
+                action: 'add',
+                probeId: this.probeId
+            }, {
+                text: 'Löschen',
+                icon: 'gfx/list-remove.png',
+                action: 'delete'
+            }]
+        }];
+        this.columns = [{
+            header: 'Typ',
+            dataIndex: 'ortsTyp'
+        }, {
+            header: 'Staat',
+            dataIndex: 'ortId',
+            renderer: function(value) {
+                var store = Ext.getStore('StaOrte');
+                var staaten = Ext.getStore('StaStaaten');
+                console.log('staatenstore: ' + staaten);
+                console.log('the staat: ' + store.getById(value).get("staatId"));
+                var record = staaten.getById(store.getById(value).get('staatId'));
+                return record.get('staatIso');
             }
-        ];
-        this.columns = [
-            {
-                header: 'Typ',
-                dataIndex: 'ortsTyp'
-            },
-            {
-                header: 'Staat',
-                dataIndex: 'ortId',
-                renderer: function(value) {
-                    var store = Ext.getStore('StaOrte');
-                    var staaten = Ext.getStore('StaStaaten');
-                    console.log('staatenstore: ' + staaten);
-                    console.log('the staat: ' + store.getById(value).get("staatId"));
-                    var record = staaten.getById(store.getById(value).get('staatId'));
-                    return record.get('staatIso');
-                }
-
-            },
-            {
-                header: 'Gemeineschlüssel',
-                dataIndex: 'ortId',
-                renderer: function(value) {
-                    var store = Ext.getStore('StaOrte');
-                    console.log('value ' + value);
-                    var record = store.getById(value);
-                    return record.get('gemId');
-                }
-
-            },
-            {
-                header: 'Gemeindename',
-                dataIndex: 'ortId',
-                flex: 1,
-                renderer: function(value) {
-                    var store = Ext.getStore('StaOrte');
-                    var gemeinden = Ext.getStore('StaVerwaltungseinheiten');
-                    var record = store.getById(value);
-                    var gemid = record.get('gemId');
-                    var record2 = gemeinden.getById(gemid);
-                    return record2.get('bezeichnung');
-                }
-
-            },
-            {
-                header: 'Messpunkt',
-                dataIndex: 'ortId',
-                renderer: function(value) {
-                    var store = Ext.getStore('StaOrte');
-                    var record = store.getById(value);
-                    return record.get('bezeichnung');
-                }
-
+        }, {
+            header: 'Gemeineschlüssel',
+            dataIndex: 'ortId',
+            renderer: function(value) {
+                var store = Ext.getStore('StaOrte');
+                console.log('value ' + value);
+                var record = store.getById(value);
+                return record.get('gemId');
             }
-        ];
+        }, {
+            header: 'Gemeindename',
+            dataIndex: 'ortId',
+            flex: 1,
+            renderer: function(value) {
+                var store = Ext.getStore('StaOrte');
+                var gemeinden = Ext.getStore('StaVerwaltungseinheiten');
+                var record = store.getById(value);
+                var gemid = record.get('gemId');
+                var record2 = gemeinden.getById(gemid);
+                return record2.get('bezeichnung');
+            }
+        }, {
+            header: 'Messpunkt',
+            dataIndex: 'ortId',
+            renderer: function(value) {
+                var store = Ext.getStore('StaOrte');
+                var record = store.getById(value);
+                return record.get('bezeichnung');
+            }
+        }];
         this.callParent(arguments);
     }
 });
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/proben/Create.js
--- a/app/view/proben/Create.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/proben/Create.js	Fri Oct 31 23:23:32 2014 +0100
@@ -20,17 +20,14 @@
     autoScroll: true,
     modal: true,
     initComponent: function() {
-        this.buttons = [
-            {
-                text: 'Speichern',
-                action: 'save'
-            },
-            {
-                text: 'Abbrechen',
-                scope: this,
-                handler: this.close
-            }
-        ];
+        this.buttons = [{
+            text: 'Speichern',
+            action: 'save'
+        }, {
+            text: 'Abbrechen',
+            scope: this,
+            handler: this.close
+        }];
         this.width = Ext.getBody().getViewSize().width - 30;
         this.height = Ext.getBody().getViewSize().height - 30;
         var form = Ext.create('Lada.view.proben.CreateForm');
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/proben/CreateForm.js
--- a/app/view/proben/CreateForm.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/proben/CreateForm.js	Fri Oct 31 23:23:32 2014 +0100
@@ -21,141 +21,117 @@
     ],
     model: 'Lada.model.Probe',
     initComponent: function() {
-       this.items = [
-            {
+       this.items = [{
+            xtype: 'fieldset',
+            title: 'Probenangaben',
+            defaults: {
+                    labelWidth: 150
+            },
+            items: [{
+                xtype: 'mst',
+                name: 'mstId',
+                fieldLabel: 'Messstelle',
+                allowBlank: false
+            }, {
+                xtype: 'textfield',
+                name: 'hauptprobenNr',
+                maxLength: 20,
+                fieldLabel: 'Hauptprobennr.'
+            }, {
                 xtype: 'fieldset',
-                title: 'Probenangaben',
-                defaults: {
-                        labelWidth: 150
-                },
-                items: [
-                    {
-                        xtype: 'mst',
-                        name: 'mstId',
-                        fieldLabel: 'Messstelle',
-                        allowBlank: false
-                    },
-                    {
-                        xtype: 'textfield',
-                        name: 'hauptprobenNr',
-                        maxLength: 20,
-                        fieldLabel: 'Hauptprobennr.'
-                    },
-                    {
-                        xtype: 'fieldset',
-                        title: 'Erweiterte Probenangaben',
-                        collapsible: true,
-                        collapsed: false,
-                        items: [
-                            {
-                                xtype: 'datenbasis',
-                                id: 'datenbasis',
-                                editable: false,
-                                name: 'datenbasisId',
-                                fieldLabel: 'Datenbasis'
-                            },
-                            {
-                                xtype: 'betriebsart',
-                                name: 'baId',
-                                fieldLabel: 'Betriebsart'
-                            },
-                            {
-                                xtype: 'testdatensatz',
-                                name: 'test',
-                                fieldLabel: 'Testdatensatz',
-                                allowBlank: false
-                            },
-                            {
-                                xtype: 'probenart',
-                                id: 'probenart',
-                                editable: false,
-                                name: 'probenartId',
-                                fieldLabel: 'Probenart',
-                                allowBlank: false
-                            },
-                            {
-                                xtype: 'numberfield',
-                                allowDecimals: false,
-                                name: 'probeNehmerId',
-                                fieldLabel: 'Probennehmer'
-                            },
-                            {
-                                xtype: 'netzbetreiber',
-                                name: 'netzbetreiberId',
-                                fieldLabel: 'Netzbetreiber',
-                                editable: false,
-                                allowBlank: false
-                            }
-                        ]
-                    }
-                ]
+                title: 'Erweiterte Probenangaben',
+                collapsible: true,
+                collapsed: false,
+                items: [{
+                    xtype: 'datenbasis',
+                    id: 'datenbasis',
+                    editable: false,
+                    name: 'datenbasisId',
+                    fieldLabel: 'Datenbasis'
+                }, {
+                    xtype: 'betriebsart',
+                    name: 'baId',
+                    fieldLabel: 'Betriebsart'
+                }, {
+                    xtype: 'testdatensatz',
+                    name: 'test',
+                    fieldLabel: 'Testdatensatz',
+                    allowBlank: false
+                }, {
+                    xtype: 'probenart',
+                    id: 'probenart',
+                    editable: false,
+                    name: 'probenartId',
+                    fieldLabel: 'Probenart',
+                    allowBlank: false
+                }, {
+                    xtype: 'numberfield',
+                    allowDecimals: false,
+                    name: 'probeNehmerId',
+                    fieldLabel: 'Probennehmer'
+                }, {
+                    xtype: 'netzbetreiber',
+                    name: 'netzbetreiberId',
+                    fieldLabel: 'Netzbetreiber',
+                    editable: false,
+                    allowBlank: false
+                }]
+            }]
+        }, {
+            // Medium
+            xtype: 'fieldset',
+            title: 'Medium',
+            defaults: {
+                    labelWidth: 150
             },
-            // Medium
-            {
+            items: [{
+                xtype: 'uwb',
+                name: 'umwId',
+                fieldLabel: 'Umweltbereich',
+                allowBlank: false
+            }, {
+                xtype: 'textfield',
+                maxLength: 100,
+                name: 'media',
+                fieldLabel: 'Medienbezeichnung'
+            }, {
+                xtype: 'textfield',
+                maxLength: 100,
+                name: 'mediaDesk',
+                fieldLabel: 'Deskriptoren'
+            }, {
                 xtype: 'fieldset',
-                title: 'Medium',
-                defaults: {
-                        labelWidth: 150
-                },
-                items: [
-                        {
-                            xtype: 'uwb',
-                            name: 'umwId',
-                            fieldLabel: 'Umweltbereich',
-                            allowBlank: false
-                        },
-                        {
-                            xtype: 'textfield',
-                            maxLength: 100,
-                            name: 'media',
-                            fieldLabel: 'Medienbezeichnung'
-                        },
-                        {
-                            xtype: 'textfield',
-                            maxLength: 100,
-                            name: 'mediaDesk',
-                            fieldLabel: 'Deskriptoren'
-                        },
-                        {
-                            xtype: 'fieldset',
-                            title: 'Details Deskriptoren',
-                            collapsible: true,
-                            collapsed: true,
-                            defaultType: 'textfield',
-                            items: this.buildDescriptors()
-                        }
-                ]
+                title: 'Details Deskriptoren',
+                collapsible: true,
+                collapsed: true,
+                defaultType: 'textfield',
+                items: this.buildDescriptors()
+            }]
+        }, {
+            // Zeit
+            xtype: 'fieldset',
+            title: 'Zeit',
+            defaultType: 'datetime',
+            defaults: {
+                    labelWidth: 150
             },
-            // Zeit
-            {
-                xtype: 'fieldset',
-                title: 'Zeit',
-                defaultType: 'datetime',
-                defaults: {
-                        labelWidth: 150
-                },
-                items: [
-                    {
-                        fieldLabel: 'Probennahme Beginn',
-                        name: 'probeentnahmeBeginn'
-                    },
-                    {
-                        fieldLabel: 'Probennahme Ende',
-                        name: 'probeentnahmeEnde'
-                    },
-                    {
-                        fieldLabel: 'Sollzeit Von',
-                        name: 'solldatumBeginn'
-                    },
-                    {
-                        fieldLabel: 'Sollzeit Bis',
-                        name: 'solldatumEnde'
-                    }
-                ]
-            }
-        ];
-        this.callParent();
+            items: [{
+                fieldLabel: 'Probennahme Beginn',
+                name: 'probeentnahmeBeginn'
+            }, {
+                fieldLabel: 'Probennahme Ende',
+                name: 'probeentnahmeEnde'
+            }, {
+                fieldLabel: 'Sollzeit Von',
+                name: 'solldatumBeginn'
+            }, {
+                fieldLabel: 'Sollzeit Bis',
+                name: 'solldatumEnde'
+            }]
+        }];
+        this.callParent(arguments);
     },
+
     buildDescriptors: function() {
         var fields = new Array();
         for ($i=0; $i<12; $i++) {
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/proben/Edit.js
--- a/app/view/proben/Edit.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/proben/Edit.js	Fri Oct 31 23:23:32 2014 +0100
@@ -23,23 +23,21 @@
 
     initComponent: function() {
         console.log('open edit...');
-        this.buttons = [
-            {
-                text: 'Speichern',
-                action: 'save'
-            },
-            {
-                text: 'Abbrechen',
-                scope: this,
-                handler: this.close
-            }
-        ];
+        this.buttons = [{
+            text: 'Speichern',
+            action: 'save'
+        }, {
+            text: 'Abbrechen',
+            scope: this,
+            handler: this.close
+        }];
         this.width = Ext.getBody().getViewSize().width - 30;
         this.height = Ext.getBody().getViewSize().height - 30;
         // InitialConfig is the config object passed to the constructor on
         // creation of this window. We need to pass it throuh to the form as
         // we need the "modelId" param to load the correct item.
-        var form = Ext.create('Lada.view.proben.EditForm', this.initialConfig);
+        var form = Ext.create('Lada.view.proben.EditForm',
+            this.initialConfig);
         this.items = [form];
         this.callParent();
     }
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/proben/EditForm.js
--- a/app/view/proben/EditForm.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/proben/EditForm.js	Fri Oct 31 23:23:32 2014 +0100
@@ -27,198 +27,161 @@
     alias: 'widget.probeneditform',
 
     initComponent: function() {
-       this.items = [
-            {
+       this.items = [{
+            xtype: 'fieldset',
+            title: 'Probenangaben',
+            defaults: {
+                    labelWidth: 150
+            },
+            items: [{
+                xtype: 'mst',
+                name: 'mstId',
+                fieldLabel: 'Messstelle',
+                allowBlank: false
+            }, {
+                xtype: 'textfield',
+                name: 'hauptprobenNr',
+                maxLength: 20,
+                fieldLabel: 'Hauptprobennr.'
+            }, {
                 xtype: 'fieldset',
-                title: 'Probenangaben',
-                defaults: {
-                        labelWidth: 150
-                },
-                items: [
-                    {
-                        xtype: 'mst',
-                        name: 'mstId',
-                        fieldLabel: 'Messstelle',
-                        allowBlank: false
-                    },
-                    {
-                        xtype: 'textfield',
-                        name: 'hauptprobenNr',
-                        maxLength: 20,
-                        fieldLabel: 'Hauptprobennr.'
-                    },
-                    {
-                        xtype: 'fieldset',
-                        title: 'Erweiterte Probenangaben',
-                        collapsible: true,
-                        collapsed: true,
-                        items: [
-                            {
-                                xtype: 'datenbasis',
-                                id: 'datenbasis',
-                                editable: false,
-                                name: 'datenbasisId',
-                                fieldLabel: 'Datenbasis'
-                            },
-                            {
-                                xtype: 'betriebsart',
-                                name: 'baId',
-                                fieldLabel: 'Betriebsart'
-                            },
-                            {
-                                xtype: 'testdatensatz',
-                                name: 'test',
-                                fieldLabel: 'Testdatensatz',
-                                allowBlank: false
-                            },
-                            {
-                                xtype: 'probenart',
-                                id: 'probenart',
-                                editable: false,
-                                name: 'probenartId',
-                                fieldLabel: 'Probenart',
-                                allowBlank: false
-                            },
-                            {
-                                xtype: 'numberfield',
-                                allowDecimals: false,
-                                name: 'probeNehmerId',
-                                fieldLabel: 'Probennehmer'
-                            },
-                            {
-                                xtype: 'netzbetreiber',
-                                name: 'netzbetreiberId',
-                                editable: false,
-                                fieldLabel: 'Netzbetreiber',
-                                allowBlank: false
-                            },
-                            {
-                                xtype: 'textfield',
-                                name: 'x11',
-                                fieldLabel: 'Datensatzerzeuger'
-                            }
-                        ]
-                    }
-                ]
-            },
-            // Medium
-            {
-                xtype: 'fieldset',
-                title: 'Medium',
-                defaults: {
-                        labelWidth: 150
-                },
-                items: [
-                        {
-                            xtype: 'uwb',
-                            name: 'umwId',
-                            fieldLabel: 'Umweltbereich',
-                            allowBlank: false
-                        },
-                        {
-                            xtype: 'textfield',
-                            maxLength: 100,
-                            name: 'media',
-                            fieldLabel: 'Medienbezeichnung'
-                        },
-                        {
-                            xtype: 'textfield',
-                            maxLength: 100,
-                            name: 'mediaDesk',
-                            fieldLabel: 'Deskriptoren'
-                        },
-                        {
-                            xtype: 'fieldset',
-                            title: 'Details Deskriptoren',
-                            collapsible: true,
-                            collapsed: true,
-                            defaultType: 'textfield',
-                            items: this.buildDescriptors()
-                        }
-                ]
-            },
-            // Zeit
-            {
-                xtype: 'fieldset',
-                title: 'Zeit',
-                defaultType: 'datetime',
-                defaults: {
-                        labelWidth: 150
-                },
-                items: [
-                    {
-                        fieldLabel: 'Probennahme Beginn',
-                        name: 'probeentnahmeBeginn'
-                    },
-                    {
-                        fieldLabel: 'Probennahme Ende',
-                        name: 'probeentnahmeEnde'
-                    },
-                    {
-                        fieldLabel: 'Sollzeit Von',
-                        name: 'solldatumBeginn'
-                    },
-                    {
-                        fieldLabel: 'Sollzeit Bis',
-                        name: 'solldatumEnde'
-                    }
-                ]
-            },
-            // Ortsangaben
-            {
-                xtype: 'fieldset',
-                title: 'Ortsangaben',
-                padding: '10 10',
-                items: [
-                    {
-                        xtype: 'ortelist',
-                        probeId: this.modelId
-                    }
-                ]
-            },
-            // Probenzusatzwerte
-            {
-                xtype: 'fieldset',
-                title: 'Probenzusatzwerte',
+                title: 'Erweiterte Probenangaben',
                 collapsible: true,
                 collapsed: true,
-                padding: '10 10',
-                items: [
-                    {
-                        xtype: 'zusatzwertelist',
-                        probeId: this.modelId
-                    }
-                ]
+                items: [{
+                    xtype: 'datenbasis',
+                    id: 'datenbasis',
+                    editable: false,
+                    name: 'datenbasisId',
+                    fieldLabel: 'Datenbasis'
+                }, {
+                    xtype: 'betriebsart',
+                    name: 'baId',
+                    fieldLabel: 'Betriebsart'
+                }, {
+                    xtype: 'testdatensatz',
+                    name: 'test',
+                    fieldLabel: 'Testdatensatz',
+                    allowBlank: false
+                }, {
+                    xtype: 'probenart',
+                    id: 'probenart',
+                    editable: false,
+                    name: 'probenartId',
+                    fieldLabel: 'Probenart',
+                    allowBlank: false
+                }, {
+                    xtype: 'numberfield',
+                    allowDecimals: false,
+                    name: 'probeNehmerId',
+                    fieldLabel: 'Probennehmer'
+                }, {
+                    xtype: 'netzbetreiber',
+                    name: 'netzbetreiberId',
+                    editable: false,
+                    fieldLabel: 'Netzbetreiber',
+                    allowBlank: false
+                }, {
+                    xtype: 'textfield',
+                    name: 'x11',
+                    fieldLabel: 'Datensatzerzeuger'
+                }]
+            }]
+        }, {
+            // Medium
+            xtype: 'fieldset',
+            title: 'Medium',
+            defaults: {
+                    labelWidth: 150
             },
-            // Probenkommentar
-            {
+            items: [{
+                xtype: 'uwb',
+                name: 'umwId',
+                fieldLabel: 'Umweltbereich',
+                allowBlank: false
+            }, {
+                xtype: 'textfield',
+                maxLength: 100,
+                name: 'media',
+                fieldLabel: 'Medienbezeichnung'
+            }, {
+                xtype: 'textfield',
+                maxLength: 100,
+                name: 'mediaDesk',
+                fieldLabel: 'Deskriptoren'
+            }, {
                 xtype: 'fieldset',
-                title: 'Probenkommentare',
+                title: 'Details Deskriptoren',
                 collapsible: true,
                 collapsed: true,
-                padding: '10 10',
-                items: [
-                    {
-                        xtype: 'kommentarelist',
-                        probeId: this.modelId
-                    }
-                ]
+                defaultType: 'textfield',
+                items: this.buildDescriptors()
+            }]
+        }, {
+            // Zeit
+            xtype: 'fieldset',
+            title: 'Zeit',
+            defaultType: 'datetime',
+            defaults: {
+                    labelWidth: 150
             },
+            items: [{
+                fieldLabel: 'Probennahme Beginn',
+                name: 'probeentnahmeBeginn'
+            }, {
+                fieldLabel: 'Probennahme Ende',
+                name: 'probeentnahmeEnde'
+            }, {
+                fieldLabel: 'Sollzeit Von',
+                name: 'solldatumBeginn'
+            }, {
+                fieldLabel: 'Sollzeit Bis',
+                name: 'solldatumEnde'
+            }]
+        }, {
+            // Ortsangaben
+            xtype: 'fieldset',
+            title: 'Ortsangaben',
+            padding: '10 10',
+            items: [{
+                xtype: 'ortelist',
+                probeId: this.modelId
+            }]
+        }, {
+            // Probenzusatzwerte
+            xtype: 'fieldset',
+            title: 'Probenzusatzwerte',
+            collapsible: true,
+            collapsed: true,
+            padding: '10 10',
+            items: [{
+                xtype: 'zusatzwertelist',
+                probeId: this.modelId
+            }]
+        }, {
+            // Probenkommentar
+            xtype: 'fieldset',
+            title: 'Probenkommentare',
+            collapsible: true,
+            collapsed: true,
+            padding: '10 10',
+            items: [{
+                xtype: 'kommentarelist',
+                probeId: this.modelId
+            }]
+        }, {
             // Messungsangaben
-            {
-                xtype: 'fieldset',
-                title: 'Messungsangaben',
-                padding: '10 10',
-                items: [
-                    {
-                        xtype: 'messungenlist',
-                        probeId: this.modelId
-                    }
-                ]
-            }
-        ];
-        this.callParent();
+            xtype: 'fieldset',
+            title: 'Messungsangaben',
+            padding: '10 10',
+            items: [{
+                    xtype: 'messungenlist',
+                    probeId: this.modelId
+            }]
+        }];
+        this.callParent(arguments);
     },
+
     buildDescriptors: function() {
         var fields = new Array();
         for ($i=0; $i<12; $i++) {
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/proben/Import.js
--- a/app/view/proben/Import.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/proben/Import.js	Fri Oct 31 23:23:32 2014 +0100
@@ -18,19 +18,16 @@
     autoScroll: true,
     modal: true,
     initComponent: function() {
-        this.buttons = [
-            {
-                text: 'Speichern',
-                action: 'save'
-            },
-            {
-                text: 'Abbrechen',
-                scope: this,
-                handler: this.close
-            }
-        ];
+        this.buttons = [{
+            text: 'Speichern',
+            action: 'save'
+        }, {
+            text: 'Abbrechen',
+            scope: this,
+            handler: this.close
+        }];
         var form = Ext.create('Lada.view.proben.ImportForm');
         this.items = [form];
-        this.callParent();
+        this.callParent(arguments);
     }
 });
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/proben/ImportForm.js
--- a/app/view/proben/ImportForm.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/proben/ImportForm.js	Fri Oct 31 23:23:32 2014 +0100
@@ -12,12 +12,10 @@
 Ext.define('Lada.view.proben.ImportForm', {
     extend: 'Ext.form.Panel',
     initComponent: function() {
-       this.items = [
-            {
-                xtype: 'fileuploadfield',
-                title: 'Importdate'
-            }
-        ];
-        this.callParent();
+       this.items = [{
+            xtype: 'fileuploadfield',
+            title: 'Importdate'
+        }];
+        this.callParent(arguments);
     }
 });
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/proben/List.js
--- a/app/view/proben/List.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/proben/List.js	Fri Oct 31 23:23:32 2014 +0100
@@ -12,39 +12,36 @@
 Ext.define('Lada.view.proben.List' ,{
     extend: 'Ext.grid.Panel',
     alias: 'widget.probenlist',
+
     store: 'ProbenList',
     multiSelect: true,
     viewConfig: {
         emptyText: 'Keine Proben gefunden.',
         deferEmptyText: false
     },
+
     initComponent: function() {
-        this.dockedItems = [
-            {
-                xtype: 'toolbar',
-                dock: 'top',
-                items: [
-                    {
-                        text: 'Hinzufügen',
-                        icon: 'gfx/list-add.png',
-                        action: 'add'
-                    },
-                    {
-                        text: 'Import',
-                        icon: 'gfx/svn-commit.png',
-                        action: 'import'
-                    },
-                    {
-                        text: 'Export',
-                        icon: 'gfx/svn-update.png',
-                        action: 'export'
-                    }
-                ]
-            }
-        ];
+        this.dockedItems = [{
+            xtype: 'toolbar',
+            dock: 'top',
+            items: [{
+                text: 'Hinzufügen',
+                icon: 'gfx/list-add.png',
+                action: 'add'
+            }, {
+                text: 'Import',
+                icon: 'gfx/svn-commit.png',
+                action: 'import'
+            }, {
+                text: 'Export',
+                icon: 'gfx/svn-update.png',
+                action: 'export'
+            }]
+        }];
         this.columns = [];
         this.callParent(arguments);
     },
+
     /**
      * Setup columns of the Grid dynamically based on a list of given cols.
      * The function is called from the {@link Lada.controller.Sql#selectSql
@@ -55,11 +52,18 @@
         var rcols = [];
         var mfields = [];
 
-        rcols.push({header: 'RW', dataIndex: 'readonly', width: 30, renderer: render_readonly});
+        rcols.push({
+            header: 'RW',
+            dataIndex: 'readonly',
+            width: 30,
+            renderer: render_readonly
+        });
         mfields.push(new Ext.data.Field({name: 'readonly'}));
         for (var i = cols.length - 1; i >= 0; i--){
             rcols.push(cols[i]);
-            mfields.push(new Ext.data.Field({name: cols[i].dataIndex}));
+            mfields.push(new Ext.data.Field({
+                name: cols[i].dataIndex
+            }));
         }
         this.store.model.setFields(mfields);
         this.reconfigure(this.store, rcols);
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/search/List.js
--- a/app/view/search/List.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/search/List.js	Fri Oct 31 23:23:32 2014 +0100
@@ -16,37 +16,31 @@
     require: ['Ext.layout.container.Column'],
     initComponent: function() {
         this.layout = 'column',
-        this.items = [
-            {
-                id: 'search',
-                xtype: 'combobox',
-                editable: false,
-                store: 'Queries',
-                displayField:'name',
-                valueField:'id',
-                emptyText:'Wählen Sie eine Abfrage'
-            },
-            {
-                xtype: 'panel',
-                maxWidth: '500',
-                border: false,
-                margin: '0 10',
-                items: [
-                    {
-                        id: 'sqldesc',
-                        xtype: 'displayfield',
-                        fieldLabel: 'Beschreibung',
-                        value: '-/-'
-                    },
-                    {
-                        id: 'sqlquery',
-                        xtype: 'displayfield',
-                        fieldLabel: 'Abfrage',
-                        value: '-/-'
-                    }
-                ]
-            }
-        ];
+        this.items = [{
+            id: 'search',
+            xtype: 'combobox',
+            editable: false,
+            store: 'Queries',
+            displayField:'name',
+            valueField:'id',
+            emptyText:'Wählen Sie eine Abfrage'
+        }, {
+            xtype: 'panel',
+            maxWidth: '500',
+            border: false,
+            margin: '0 10',
+            items: [{
+                id: 'sqldesc',
+                xtype: 'displayfield',
+                fieldLabel: 'Beschreibung',
+                value: '-/-'
+            }, {
+                id: 'sqlquery',
+                xtype: 'displayfield',
+                fieldLabel: 'Abfrage',
+                value: '-/-'
+            }]
+        }];
         this.callParent(arguments);
     }
 });
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/status/Create.js
--- a/app/view/status/Create.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/status/Create.js	Fri Oct 31 23:23:32 2014 +0100
@@ -19,20 +19,18 @@
     modal: true,
 
     initComponent: function() {
-        this.buttons = [
-            {
-                text: 'Speichern',
-                scope: form,
-                action: 'save'
-            },
-            {
-                text: 'Abbrechen',
-                scope: this,
-                handler: this.close
-            }
-        ];
-        var form = Ext.create('Lada.view.status.CreateForm', this.initialConfig);
+        this.buttons = [{
+            text: 'Speichern',
+            scope: form,
+            action: 'save'
+        }, {
+            text: 'Abbrechen',
+            scope: this,
+            handler: this.close
+        }];
+        var form = Ext.create('Lada.view.status.CreateForm',
+            this.initialConfig);
         this.items = [form];
-        this.callParent();
+        this.callParent(arguments);
     }
 });
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/status/CreateForm.js
--- a/app/view/status/CreateForm.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/status/CreateForm.js	Fri Oct 31 23:23:32 2014 +0100
@@ -15,31 +15,28 @@
         'Lada.view.widgets.Mst',
         'Lada.view.widgets.Statuswert'
     ],
+
     model: 'Lada.model.Status',
+
     initComponent: function() {
-        this.items = [
-            {
-                xtype: 'mst',
-                label: 'Erzeuger',
-                name: 'erzeuger'
-            },
-            {
-                xtype: 'statuswert',
-                label: 'Status',
-                name: 'status'
-            },
-            {
-                xtype: 'datetime',
-                label: 'Datum',
-                name: 'datum'
-            },
-            {
-                xtype: 'textarea',
-                label: 'Kommentar',
-                name: 'kommentar'
-            }
-        ];
-        this.callParent();
+        this.items = [{
+            xtype: 'mst',
+            label: 'Erzeuger',
+            name: 'erzeuger'
+        }, {
+            xtype: 'statuswert',
+            label: 'Status',
+            name: 'status'
+        }, {
+            xtype: 'datetime',
+            label: 'Datum',
+            name: 'datum'
+        }, {
+            xtype: 'textarea',
+            label: 'Kommentar',
+            name: 'kommentar'
+        }];
+        this.callParent(arguments);
     }
 });
 
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/status/List.js
--- a/app/view/status/List.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/status/List.js	Fri Oct 31 23:23:32 2014 +0100
@@ -12,6 +12,7 @@
 Ext.define('Lada.view.status.List' ,{
     extend: 'Ext.grid.Panel',
     alias: 'widget.statuslist',
+
     store: 'Status',
     viewConfig: {
         maxHeight: 350,
@@ -21,35 +22,40 @@
         minHeight: 35,
         deferEmptyText: false
     },
+
     parentId: null,
     probeId: null,
+
     initComponent: function() {
-        this.dockedItems = [
-            {
-                xtype: 'toolbar',
-                dock: 'top',
-                items: [
-                    {
-                        text: 'Hinzufügen',
-                        icon: 'gfx/list-add.png',
-                        action: 'add',
-                        probeId: this.probeId,
-                        parentId: this.parentId
-                    },
-                    {
-                        text: 'Löschen',
-                        icon: 'gfx/list-remove.png',
-                        action: 'delete'
-                    }
-                ]
-            }
-        ];
-        this.columns = [
-            {header: 'Erzeuger', dataIndex: 'erzeuger'},
-            {header: 'Status', dataIndex: 'status'},
-            {header: 'Datum', dataIndex: 'datum'},
-            {header: 'Text', dataIndex: 'kommentar', flex: 1}
-        ];
+        this.dockedItems = [{
+            xtype: 'toolbar',
+            dock: 'top',
+            items: [{
+                text: 'Hinzufügen',
+                icon: 'gfx/list-add.png',
+                action: 'add',
+                probeId: this.probeId,
+                parentId: this.parentId
+            }, {
+                text: 'Löschen',
+                icon: 'gfx/list-remove.png',
+                action: 'delete'
+            }]
+        }];
+        this.columns = [{
+            header: 'Erzeuger',
+            dataIndex: 'erzeuger'
+        }, {
+            header: 'Status',
+            dataIndex: 'status'
+        }, {
+            header: 'Datum',
+            dataIndex: 'datum'
+        }, {
+            header: 'Text',
+            dataIndex: 'kommentar',
+            flex: 1
+        }];
         this.callParent(arguments);
     }
 });
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/widgets/LadaForm.js
--- a/app/view/widgets/LadaForm.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/widgets/LadaForm.js	Fri Oct 31 23:23:32 2014 +0100
@@ -51,35 +51,35 @@
     readonly: false,
 
     initComponent: function() {
-
-        this.callParent();
+        this.callParent(arguments);
 
         this.getForm().trackResetOnLoad = true; //Workaround
 
         if (Ext.isString(this.model)) {
-
             //Load a model to be updated
             if (this.modelId) {
-
                 Ext.ClassManager.get(this.model).load(this.modelId, {
                     failure: this.onModelLoadFailure,
                     success: this.onModelLoadSuccess,
                     scope: this
                 });
-
             //Load an empty record to be inserted
-            } else {
+            }
+            else {
                 this.bindModel(Ext.create(this.model, {}));
             }
-
-        } else {
+        }
+        else {
 
             //Bind the provided model to be updated
             this.bindModel(this.model);
 
         }
-
-        this.addEvents('loadsuccess', 'loadfailure', 'savesuccess', 'savefailure');
+        this.addEvents(
+            'loadsuccess',
+            'loadfailure',
+            'savesuccess',
+            'savefailure');
     },
 
     bindModel: function(model) {
@@ -114,7 +114,8 @@
                     if (this.success) {
                         console.log('Save was successfull');
                         this.fireEvent('savesuccess', this, this.model, response);
-                    } else {
+                    }
+                    else {
                         console.log('Save was not successfull');
                         this.form.markInvalid(this.errors);
                         this.fireEvent('savefailure', this, this.model, response);
@@ -158,7 +159,7 @@
             this.getForm().getFields().each (function (field) {
                 // Check if the field name is in the list of fields to ignore
                 var ignore = false;
-                for (var i = ignoreFields.length - 1; i >= 0; i--){
+                for (var i = ignoreFields.length - 1; i >= 0; i--) {
                     console.log(ignoreFields[i] + "===" + field.getName());
                     if (ignoreFields[i] === field.getName(true)) {
                         ignore = true;
@@ -171,7 +172,7 @@
             });
             /* Iterate over all toolbars of lists and hide them */
             var childs = this.query('toolbar');
-            for (var i = childs.length - 1; i >= 0; i--){
+            for (var i = childs.length - 1; i >= 0; i--) {
                 childs[i].setVisible(false);
             }
             /*
@@ -181,7 +182,7 @@
             if (ignoreFields.length == 0) {
                 var win = this.up('window');
                 var buttons = win.query('.button');
-                for (var j = buttons.length - 1; j >= 0; j--){
+                for (var j = buttons.length - 1; j >= 0; j--) {
                     if (buttons[j].text === 'Speichern') {
                         buttons[j].setVisible(false);
                     };
@@ -189,6 +190,7 @@
             }
         }
     },
+
     parseResponse: function(response) {
         var json = Ext.decode(response.responseText);
         if (json) {
@@ -201,10 +203,12 @@
                 !Ext.Object.isEmpty(this.errors)) {
                 this.createMessages();
             }
-        } else {
+        }
+        else {
             this.setReadOnly(this.model.get('readonly'));
         }
     },
+
     createMessages: function() {
         var messages = Ext.create('Ext.form.Panel', {
             bodyPadding: '5 5 5 5'
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/widgets/Messeinheit.js
--- a/app/view/widgets/Messeinheit.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/widgets/Messeinheit.js	Fri Oct 31 23:23:32 2014 +0100
@@ -23,6 +23,7 @@
     triggerAction : 'all',
     typeAhead: false,
     minChars: 0,
+
     initComponent: function() {
         this.store = Ext.data.StoreManager.get('StaMesseinheiten');
         if (!this.store) {
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/widgets/Messmethode.js
--- a/app/view/widgets/Messmethode.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/widgets/Messmethode.js	Fri Oct 31 23:23:32 2014 +0100
@@ -24,6 +24,7 @@
     typeAhead: false,
     minChars: 0,
     tpl: '<tpl for="."><div class="x-combo-list-item x-boundlist-item" >{id} - {messmethode}</div></tpl>',
+
     initComponent: function() {
         this.store = Ext.data.StoreManager.get('StaMessmethoden');
         if (!this.store) {
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/widgets/Mst.js
--- a/app/view/widgets/Mst.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/widgets/Mst.js	Fri Oct 31 23:23:32 2014 +0100
@@ -24,6 +24,7 @@
     triggerAction : 'all',
     typeAhead: false,
     minChars: 0,
+
     initComponent: function() {
         this.store = Ext.data.StoreManager.get('StaMessstellen');
         if (!this.store) {
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/widgets/Netzbetreiber.js
--- a/app/view/widgets/Netzbetreiber.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/widgets/Netzbetreiber.js	Fri Oct 31 23:23:32 2014 +0100
@@ -23,6 +23,7 @@
     triggerAction : 'all',
     typeAhead: false,
     minChars: 0,
+
     initComponent: function() {
         this.store = Ext.data.StoreManager.get('StaNetzbetreiber');
         if (!this.store) {
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/widgets/Nwg.js
--- a/app/view/widgets/Nwg.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/widgets/Nwg.js	Fri Oct 31 23:23:32 2014 +0100
@@ -18,14 +18,15 @@
  * Combobox for Nachweisgrenze.
  */
 Ext.define('Lada.view.widgets.Nwg' ,{
-        extend: 'Ext.form.ComboBox',
-        editable: false,
-        alias: 'widget.nwg',
-        store: nwgStore,
-        queryMode: 'local',
-        displayField:'nwg',
-        valueField: 'nwgId',
-        emptyText:'Messwert kleiner als Nachweisgrenze?',
+    extend: 'Ext.form.ComboBox',
+    editable: false,
+    alias: 'widget.nwg',
+    store: nwgStore,
+    queryMode: 'local',
+    displayField:'nwg',
+    valueField: 'nwgId',
+    emptyText:'Messwert kleiner als Nachweisgrenze?',
+
     initComponent: function() {
         this.callParent(arguments);
     }
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/widgets/Ortdetail.js
--- a/app/view/widgets/Ortdetail.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/widgets/Ortdetail.js	Fri Oct 31 23:23:32 2014 +0100
@@ -23,6 +23,7 @@
     triggerAction : 'all',
     typeAhead: false,
     minChars: 0,
+
     initComponent: function() {
         this.store = Ext.data.StoreManager.get('StaOrte');
         if (!this.store) {
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/widgets/Probenart.js
--- a/app/view/widgets/Probenart.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/widgets/Probenart.js	Fri Oct 31 23:23:32 2014 +0100
@@ -23,6 +23,7 @@
     triggerAction : 'all',
     typeAhead: false,
     minChars: 0,
+
     initComponent: function() {
         this.store = Ext.data.StoreManager.get('StaProbenarten');
         if (!this.store) {
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/widgets/Probenzusatzwert.js
--- a/app/view/widgets/Probenzusatzwert.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/widgets/Probenzusatzwert.js	Fri Oct 31 23:23:32 2014 +0100
@@ -23,6 +23,7 @@
     triggerAction : 'all',
     typeAhead: false,
     minChars: 0,
+
     initComponent: function() {
         this.store = Ext.data.StoreManager.get('StaProbenzusaetze');
         if (!this.store) {
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/widgets/Staat.js
--- a/app/view/widgets/Staat.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/widgets/Staat.js	Fri Oct 31 23:23:32 2014 +0100
@@ -23,6 +23,7 @@
     triggerAction : 'all',
     typeAhead: false,
     minChars: 0,
+
     initComponent: function() {
         this.store = Ext.data.StoreManager.get('StaStaaten');
         if (!this.store) {
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/widgets/Statuswert.js
--- a/app/view/widgets/Statuswert.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/widgets/Statuswert.js	Fri Oct 31 23:23:32 2014 +0100
@@ -20,19 +20,20 @@
  * Combobox for Statuswert
  */
 Ext.define('Lada.view.widgets.Statuswert' ,{
-        extend: 'Ext.form.ComboBox',
-        alias: 'widget.statuswert',
-        store: statuswerteStore,
-        displayField:'status',
-        valueField: 'id',
-        typeAhead: false,
-        emptyText:'Wählen Sie eine Status',
-        // Enable filtering of comboboxes
-        autoSelect: false,
-        queryMode: 'local',
-        triggerAction : 'all',
-        typeAhead: false,
-        minChars: 0,
+    extend: 'Ext.form.ComboBox',
+    alias: 'widget.statuswert',
+    store: statuswerteStore,
+    displayField:'status',
+    valueField: 'id',
+    typeAhead: false,
+    emptyText:'Wählen Sie eine Status',
+    // Enable filtering of comboboxes
+    autoSelect: false,
+    queryMode: 'local',
+    triggerAction : 'all',
+    typeAhead: false,
+    minChars: 0,
+
     initComponent: function() {
         this.callParent(arguments);
     }
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/widgets/Testdatensatz.js
--- a/app/view/widgets/Testdatensatz.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/widgets/Testdatensatz.js	Fri Oct 31 23:23:32 2014 +0100
@@ -19,14 +19,15 @@
  * This widget is also used a generic "Ja/Nein" combobox.
  */
 Ext.define('Lada.view.widgets.Testdatensatz' ,{
-        extend: 'Ext.form.ComboBox',
-        editable: false,
-        alias: 'widget.testdatensatz',
-        store: testdatensatzStore,
-        queryMode: 'local',
-        displayField:'testdatensatz',
-        valueField: 'testdatensatzId',
-        emptyText:'Testdatensatz?',
+    extend: 'Ext.form.ComboBox',
+    editable: false,
+    alias: 'widget.testdatensatz',
+    store: testdatensatzStore,
+    queryMode: 'local',
+    displayField:'testdatensatz',
+    valueField: 'testdatensatzId',
+    emptyText:'Testdatensatz?',
+
     initComponent: function() {
         this.callParent(arguments);
     }
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/widgets/Uwb.js
--- a/app/view/widgets/Uwb.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/widgets/Uwb.js	Fri Oct 31 23:23:32 2014 +0100
@@ -37,6 +37,7 @@
     //        combo.value = record.id;
     //    }
     //},
+
     initComponent: function() {
         this.store = Ext.data.StoreManager.get('StaUmwelt');
         if (!this.store) {
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/zusatzwerte/Create.js
--- a/app/view/zusatzwerte/Create.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/zusatzwerte/Create.js	Fri Oct 31 23:23:32 2014 +0100
@@ -19,19 +19,17 @@
     modal: true,
 
     initComponent: function() {
-        this.buttons = [
-            {
-                text: 'Speichern',
-                scope: form,
-                action: 'save'
-            },
-            {
-                text: 'Abbrechen',
-                scope: this,
-                handler: this.close
-            }
-        ];
-        var form = Ext.create('Lada.view.zusatzwerte.CreateForm', this.initialConfig);
+        this.buttons = [{
+            text: 'Speichern',
+            scope: form,
+            action: 'save'
+        }, {
+            text: 'Abbrechen',
+            scope: this,
+            handler: this.close
+        }];
+        var form = Ext.create('Lada.view.zusatzwerte.CreateForm',
+            this.initialConfig);
         this.items = [form];
         this.callParent();
     }
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/zusatzwerte/CreateForm.js
--- a/app/view/zusatzwerte/CreateForm.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/zusatzwerte/CreateForm.js	Fri Oct 31 23:23:32 2014 +0100
@@ -15,53 +15,47 @@
         'Lada.view.widgets.Probenzusatzwert',
         'Ext.layout.container.Column'
     ],
+
     model: 'Lada.model.Zusatzwert',
+
     initComponent: function() {
-        this.items = [
-            {
-                xtype: 'probenzusatzwert',
-                name: 'pzsId',
-                fieldLabel: 'PZW-Größe',
-                listeners: {
-                    scope: this,
-                    'change': function (field, newv, oldv, opts) {
-                        console.log(field, oldv, newv, opts);
-                        var ffield = this.getForm().findField("messeinheit");
-                        pzsId = newv;
-                        if (pzsId == undefined) {
-                            pzsId = oldv;
-                        }
-                        ffield.setValue(this.model.getMesseinheit(pzsId));
+        this.items = [{
+            xtype: 'probenzusatzwert',
+            name: 'pzsId',
+            fieldLabel: 'PZW-Größe',
+            listeners: {
+                scope: this,
+                'change': function (field, newv, oldv, opts) {
+                    console.log(field, oldv, newv, opts);
+                    var ffield = this.getForm().findField("messeinheit");
+                    pzsId = newv;
+                    if (pzsId == undefined) {
+                        pzsId = oldv;
                     }
+                    ffield.setValue(this.model.getMesseinheit(pzsId));
                 }
-            },
-            {
-                layout: "column",
-                border: 0,
-                items: [
-                    {
-                        xtype: 'numberfield',
-                        name: 'messwertPzs',
-                        fieldLabel: 'Messwert'
-                    },
-                    {
-                        xtype: 'displayfield',
-                        name: 'messeinheit'
-                    }
-                ]
-            },
-            {
+            }
+        }, {
+            layout: "column",
+            border: 0,
+            items: [{
                 xtype: 'numberfield',
-                name: 'messfehler',
-                fieldLabel: 'rel. Unsich.[%]'
-            },
-            {
-                xtype: 'numberfield',
-                name: 'nwgZuMesswert',
-                fieldLabel: 'Nachweisgrenze'
-            }
-        ];
-        this.callParent();
+                name: 'messwertPzs',
+                fieldLabel: 'Messwert'
+            }, {
+                xtype: 'displayfield',
+                name: 'messeinheit'
+            }]
+        }, {
+            xtype: 'numberfield',
+            name: 'messfehler',
+            fieldLabel: 'rel. Unsich.[%]'
+        }, {
+            xtype: 'numberfield',
+            name: 'nwgZuMesswert',
+            fieldLabel: 'Nachweisgrenze'
+        }];
+        this.callParent(arguments);
     }
 });
 
diff -r 446e99cfd425 -r 850ccfe5f3c4 app/view/zusatzwerte/List.js
--- a/app/view/zusatzwerte/List.js	Fri Oct 31 21:28:31 2014 +0100
+++ b/app/view/zusatzwerte/List.js	Fri Oct 31 23:23:32 2014 +0100
@@ -12,6 +12,7 @@
 Ext.define('Lada.view.zusatzwerte.List' ,{
     extend: 'Ext.grid.Panel',
     alias: 'widget.zusatzwertelist',
+
     store: 'Zusatzwerte',
     viewConfig: {
         maxHeight: 350,
@@ -21,71 +22,65 @@
         minHeight: 35,
         deferEmptyText: false
     },
+
     probeId: null,
+
     initComponent: function() {
-        this.dockedItems = [
-            {
-                xtype: 'toolbar',
-                dock: 'top',
-                items: [
-                    {
-                        text: 'Hinzufügen',
-                        icon: 'gfx/list-add.png',
-                        action: 'add',
-                        probeId: this.probeId
-                    },
-                    {
-                        text: 'Löschen',
-                        icon: 'gfx/list-remove.png',
-                        action: 'delete'
-                    }
-                ]
-            }
-        ];
-        this.columns = [
-            {
-                header: 'PZW-ID',
-                dataIndex: 'id'
+        this.dockedItems = [{
+            xtype: 'toolbar',
+            dock: 'top',
+            items: [{
+                text: 'Hinzufügen',
+                icon: 'gfx/list-add.png',
+                action: 'add',
+                probeId: this.probeId
+            }, {
+                text: 'Löschen',
+                icon: 'gfx/list-remove.png',
+                action: 'delete'
+            }]
+        }];
+        this.columns = [{
+            header: 'PZW-ID',
+            dataIndex: 'id'
+        }, {
+            header: 'PZW-Größe',
+            dataIndex: 'pzsId',
+            renderer: function(value) {
+                var store = Ext.getStore('StaProbenzusaetze');
+                var record = store.getById(value);
+                return record.get('beschreibung');
             },
-            {
-                header: 'PZW-Größe',
-                dataIndex: 'pzsId',
-                renderer: function(value) {
-                    var store = Ext.getStore('StaProbenzusaetze');
-                    var record = store.getById(value);
-                    return record.get('beschreibung');
-                },
-                flex: 1
-            },
-            {
-                header: 'Messwert',
-                dataIndex: 'id',
-                renderer: function(value) {
-                    var store = Ext.getStore('Zusatzwerte');
-                    var record = store.getById(value);
-                    var messwert = record.get('messwertPzs');
-                    var nwg = record.get('nwgZuMesswert');
-                    if (messwert < nwg ) {
-                        return "<"+messwert;
-                    } else {
-                        return messwert;
-                    }
-                }
-            },
-            {header: 'rel. Unsich.[%]', dataIndex: 'messfehler'},
-            {
-                header: 'Maßeinheit',
-                dataIndex: 'pzsId',
-                renderer: function(value) {
-                    var zstore = Ext.getStore('StaProbenzusaetze');
-                    var mstore = Ext.getStore('StaMesseinheiten');
-                    console.log('store: ' + mstore);
-                    var mehId = zstore.getById(value).get('mehId');
-                    var record = mstore.findRecord('id', mehId);
-                    return record.get('einheit');
+            flex: 1
+        }, {
+            header: 'Messwert',
+            dataIndex: 'id',
+            renderer: function(value) {
+                var store = Ext.getStore('Zusatzwerte');
+                var record = store.getById(value);
+                var messwert = record.get('messwertPzs');
+                var nwg = record.get('nwgZuMesswert');
+                if (messwert < nwg ) {
+                    return "<"+messwert;
+                } else {
+                    return messwert;
                 }
             }
-        ];
+        }, {
+            header: 'rel. Unsich.[%]',
+            dataIndex: 'messfehler'
+        }, {
+            header: 'Maßeinheit',
+            dataIndex: 'pzsId',
+            renderer: function(value) {
+                var zstore = Ext.getStore('StaProbenzusaetze');
+                var mstore = Ext.getStore('StaMesseinheiten');
+                console.log('store: ' + mstore);
+                var mehId = zstore.getById(value).get('mehId');
+                var record = mstore.findRecord('id', mehId);
+                return record.get('einheit');
+            }
+        }];
         this.callParent(arguments);
     }
 });


More information about the Lada-commits mailing list