changeset 179:f1f0351b6e2f

Show List of Messungskommentare
author Torsten Irländer <torsten.irlaender@intevation.de>
date Thu, 04 Jul 2013 12:21:25 +0200
parents c53f3110852e
children 133df8f75a12
files app/model/MKommentar.js app/view/messungen/Create.js app/view/messungen/CreateForm.js
diffstat 3 files changed, 21 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/app/model/MKommentar.js	Thu Jul 04 11:24:02 2013 +0200
+++ b/app/model/MKommentar.js	Thu Jul 04 12:21:25 2013 +0200
@@ -1,14 +1,14 @@
 Ext.define('Lada.model.MKommentar', {
     extend: 'Ext.data.Model',
     fields: [
-        {name: "kId"},
+        {name: "id"},
         {name: "messungsId"},
         {name: "probeId"},
         {name: "erzeuger"},
         {name: "kdatum", type: 'date', convert: ts2date, defaultValue: new Date()},
         {name: "ktext"}
     ],
-    idProperty: "kId",
+    idProperty: "id",
     proxy: {
         type: 'rest',
         appendId: true, //default
@@ -19,7 +19,7 @@
         }
     },
     getEidi: function() {
-        var kid =  this.get('kId');
+        var kid =  this.get('id.kid');
         var messId = this.get('messungsId');
         var probeId = this.get('probeId');
         return "/" + kid + "/" + messId + "/" + probeId;
--- a/app/view/messungen/Create.js	Thu Jul 04 11:24:02 2013 +0200
+++ b/app/view/messungen/Create.js	Thu Jul 04 12:21:25 2013 +0200
@@ -3,6 +3,8 @@
     alias: 'widget.messungencreate',
 
     title: 'Maske für Messungen',
+    width: Ext.getBody().getViewSize().width - 30,
+    height: Ext.getBody().getViewSize().height - 30,
     autoShow: true,
     autoScroll: true,
     modal: true,
--- a/app/view/messungen/CreateForm.js	Thu Jul 04 11:24:02 2013 +0200
+++ b/app/view/messungen/CreateForm.js	Thu Jul 04 12:21:25 2013 +0200
@@ -2,7 +2,8 @@
     extend: 'Lada.view.widgets.LadaForm',
     model: 'Lada.model.Messung',
     requires: [
-        'Lada.view.widgets.Messmethode'
+        'Lada.view.widgets.Messmethode',
+        'Lada.view.mkommentare.List'
     ],
     initComponent: function() {
         this.items = [
@@ -35,6 +36,20 @@
                 xtype: 'textfield',
                 name: 'geplant',
                 fieldLabel: 'Geplant'
+            },
+            // Messungskommentare
+            {
+                xtype: 'fieldset',
+                title: 'Messungskommentare',
+                collapsible: true,
+                collapsed: false,
+                padding: '10 10',
+                items: [
+                    {
+                        xtype: 'mkommentarelist',
+                        parentId: this.modelId
+                    }
+                ]
             }
         ];
         this.callParent();

http://lada.wald.intevation.org