comparison app/controller/Messungen.js @ 224:5e056c5edf9a

Fixed loading stores when editing Messung.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Tue, 16 Jul 2013 13:56:38 +0200
parents 1b5a0cb4fa6c
children 80df1451b4a9
comparison
equal deleted inserted replaced
223:53e50427888b 224:5e056c5edf9a
48 messung.set('probeId', button.probeId); 48 messung.set('probeId', button.probeId);
49 var view = Ext.widget('messungencreate', {model: messung}); 49 var view = Ext.widget('messungencreate', {model: messung});
50 }, 50 },
51 editMessung: function(grid, record) { 51 editMessung: function(grid, record) {
52 console.log('Editing Messung'); 52 console.log('Editing Messung');
53 var view = Ext.widget('messungencreate', {model: record});
54 console.log("Loaded Messung with ID " + record.getId()); //outputs ID
55
56 var kstore = this.getMKommentareStore(); 53 var kstore = this.getMKommentareStore();
57 kstore.load({ 54 kstore.load({
58 params: { 55 params: {
59 probeId: probeId, 56 probeId: record.get('probeId'),
60 messungsId: record.get('messungsId') 57 messungsId: record.get('messungsId')
61 } 58 }
62 }); 59 });
63 var sstore = this.getStatusStore(); 60 var sstore = this.getStatusStore();
64 sstore.load({ 61 sstore.load({
65 params: { 62 params: {
66 probeId: probeId, 63 probeId: record.get('probeId'),
67 messungsId: record.get('messungsId') 64 messungsId: record.get('messungsId')
68 } 65 }
69 }); 66 });
70 var mstore = this.getMessungwerteStore(); 67 var mstore = this.getMesswerteStore();
71 mstore.load({ 68 mstore.load({
72 params: { 69 params: {
73 probeId: probeId, 70 probeId: record.get('probeId'),
74 messungsId: record.get('messungsId') 71 messungsId: record.get('messungsId')
75 } 72 }
76 }); 73 });
74 var view = Ext.widget('messungencreate', {model: record});
75 console.log("Loaded Messung with ID " + record.getId()); //outputs ID
77 }, 76 },
78 deleteMessung: function(button) { 77 deleteMessung: function(button) {
79 // Get selected item in grid 78 // Get selected item in grid
80 var grid = button.up('grid'); 79 var grid = button.up('grid');
81 var selection = grid.getView().getSelectionModel().getSelection()[0]; 80 var selection = grid.getView().getSelectionModel().getSelection()[0];

http://lada.wald.intevation.org