Mercurial > lada > lada-client
comparison app/view/messungen/List.js @ 164:767300b2c70f
Added custom renderer for "Anzahl Kommentare" column count the number of
comments for this messung.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Wed, 03 Jul 2013 14:03:51 +0200 |
parents | 3552b0ee4526 |
children | 202d89d8dd16 |
comparison
equal
deleted
inserted
replaced
163:15318541e568 | 164:767300b2c70f |
---|---|
31 ]; | 31 ]; |
32 this.columns = [ | 32 this.columns = [ |
33 {header: 'Mess.ID', dataIndex: "messungsId", width: 50}, | 33 {header: 'Mess.ID', dataIndex: "messungsId", width: 50}, |
34 {header: 'NPR-Nr.', dataIndex: "nebenprobenNr", width: 50}, | 34 {header: 'NPR-Nr.', dataIndex: "nebenprobenNr", width: 50}, |
35 {header: 'MMT', dataIndex: "mmtId", width: 50}, | 35 {header: 'MMT', dataIndex: "mmtId", width: 50}, |
36 {header: 'Messzeit', dataIndex: "messdauer"}, | 36 {header: 'Messzeit', dataIndex: "messdauer"}, |
37 {header: 'Status'}, | 37 {header: 'Status'}, |
38 {header: 'OK-Flag', dataIndex: "fertig"}, | 38 {header: 'OK-Flag', dataIndex: "fertig"}, |
39 {header: 'Anzahl Nuklide'}, | 39 { |
40 {header: 'Anzahl Kommentare', flex: 1} | 40 header: 'Anzahl Nuklide', |
41 dataIndex: 'messungsId', | |
42 renderer: function(value) { | |
43 } | |
44 }, | |
45 { | |
46 header: 'Anzahl Kommentare', | |
47 flex: 1, | |
48 dataIndex: 'id', | |
49 renderer: function(value) { | |
50 var kstore = Ext.getStore('MKommentare'); | |
51 kstore.load({ | |
52 params: { | |
53 probeId: value.probeId, | |
54 messungsId: value.messungsId | |
55 } | |
56 }); | |
57 return kstore.getTotalCount(); | |
58 } | |
59 } | |
41 ]; | 60 ]; |
42 this.callParent(arguments); | 61 this.callParent(arguments); |
43 } | 62 } |
44 }); | 63 }); |
45 | 64 |