comparison app/view/messungen/List.js @ 490:446e99cfd425

Updated views and controllers using the new model and stores.
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 31 Oct 2014 21:28:31 +0100
parents debfcc7713e3
children 850ccfe5f3c4
comparison
equal deleted inserted replaced
489:6056a7fd9aa2 490:446e99cfd425
41 } 41 }
42 ] 42 ]
43 } 43 }
44 ]; 44 ];
45 this.columns = [ 45 this.columns = [
46 {header: 'Mess.ID', dataIndex: "messungsId", width: 50}, 46 {header: 'Mess.ID', dataIndex: "id", width: 50},
47 {header: 'NPR-Nr.', dataIndex: "nebenprobenNr", width: 50}, 47 {header: 'NPR-Nr.', dataIndex: "nebenprobenNr", width: 50},
48 {header: 'MMT', dataIndex: "mmtId", width: 50}, 48 {header: 'MMT', dataIndex: "mmtId", width: 50},
49 {header: 'Messzeit', dataIndex: "messzeitpunkt"}, 49 {header: 'Messzeit', dataIndex: "messzeitpunkt"},
50 { 50 {
51 header: 'Status', 51 header: 'Status',
53 renderer: function(value) { 53 renderer: function(value) {
54 var sstore = Ext.getStore('Status'); 54 var sstore = Ext.getStore('Status');
55 sstore.load({ 55 sstore.load({
56 params: { 56 params: {
57 probeId: value.probeId, 57 probeId: value.probeId,
58 messungsId: value.messungsId 58 messungsId: value.id
59 } 59 }
60 }); 60 });
61 if (sstore.getTotalCount() === 0) { 61 if (sstore.getTotalCount() === 0) {
62 return "unbekannt"; 62 return "unbekannt";
63 } else { 63 } else {
82 renderer: function(value) { 82 renderer: function(value) {
83 var mstore = Ext.getStore('Messwerte'); 83 var mstore = Ext.getStore('Messwerte');
84 mstore.load({ 84 mstore.load({
85 params: { 85 params: {
86 probeId: value.probeId, 86 probeId: value.probeId,
87 messungsId: value.messungsId 87 messungsId: value.id
88 } 88 }
89 }); 89 });
90 return mstore.getTotalCount(); 90 return mstore.getTotalCount();
91 } 91 }
92 }, 92 },
93 { 93 {
94 header: 'Anzahl Kommentare', 94 header: 'Anzahl Kommentare',
95 flex: 1, 95 flex: 1,
96 dataIndex: 'id', 96 dataIndex: 'id',
97 renderer: function(value) { 97 renderer: function(value) {
98 var kstore = Ext.getStore('MKommentare'); 98 var kstore = Ext.getStore('KommentareM');
99 kstore.load({ 99 kstore.load({
100 params: { 100 params: {
101 probeId: value.probeId, 101 probeId: value.probeId,
102 messungsId: value.messungsId 102 messungsId: value.id
103 } 103 }
104 }); 104 });
105 return kstore.getTotalCount(); 105 return kstore.getTotalCount();
106 } 106 }
107 } 107 }

http://lada.wald.intevation.org