[Lada-commits] [PATCH 07 of 13] Added custom renderer for "Anzahl Kommentare" column count the number of

Wald Commits scm-commit at wald.intevation.org
Wed Jul 3 16:09:23 CEST 2013


# HG changeset patch
# User Torsten Irländer <torsten.irlaender at intevation.de>
# Date 1372853031 -7200
# Node ID 767300b2c70f35d16ed180d855632c70c52c7f31
# Parent  15318541e568807aafa672036e248dcf4a36595d
Added custom renderer for "Anzahl Kommentare" column count the number of
comments for this messung.

diff -r 15318541e568 -r 767300b2c70f app/view/messungen/List.js
--- a/app/view/messungen/List.js	Wed Jul 03 14:03:00 2013 +0200
+++ b/app/view/messungen/List.js	Wed Jul 03 14:03:51 2013 +0200
@@ -33,11 +33,30 @@
             {header: 'Mess.ID', dataIndex: "messungsId", width: 50},
             {header: 'NPR-Nr.', dataIndex: "nebenprobenNr", width: 50},
             {header: 'MMT', dataIndex: "mmtId", width: 50},
-            {header: 'Messzeit', dataIndex: "messdauer"}, 
+            {header: 'Messzeit', dataIndex: "messdauer"},
             {header: 'Status'},
             {header: 'OK-Flag', dataIndex: "fertig"},
-            {header: 'Anzahl Nuklide'},
-            {header: 'Anzahl Kommentare', flex: 1} 
+            {
+                header: 'Anzahl Nuklide',
+                dataIndex: 'messungsId',
+                renderer: function(value) {
+                }
+            },
+            {
+                header: 'Anzahl Kommentare',
+                flex: 1,
+                dataIndex: 'id',
+                renderer: function(value) {
+                    var kstore = Ext.getStore('MKommentare');
+                    kstore.load({
+                        params: {
+                            probeId: value.probeId,
+                            messungsId: value.messungsId
+                        }
+                    });
+                    return kstore.getTotalCount();
+                }
+            }
         ];
         this.callParent(arguments);
     }


More information about the Lada-commits mailing list