Mercurial > lada > lada-client
comparison app/controller/Proben.js @ 122:a7bfaeb1655d
Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Fri, 21 Jun 2013 16:56:17 +0200 |
parents | c05fda928b82 |
children | e80a9114524c |
comparison
equal
deleted
inserted
replaced
121:c05fda928b82 | 122:a7bfaeb1655d |
---|---|
3 views: [ | 3 views: [ |
4 'proben.Edit', | 4 'proben.Edit', |
5 'proben.Create' | 5 'proben.Create' |
6 ], | 6 ], |
7 stores: [ | 7 stores: [ |
8 'Proben' | 8 'Proben', |
9 'Zusatzwerte' | |
9 // 'Orte', | 10 // 'Orte', |
10 // 'Messungen', | 11 // 'Messungen', |
11 // 'Zusatzwerte', | |
12 // 'Messeinheit', | 12 // 'Messeinheit', |
13 // 'Probenzusatzwert' | 13 // 'Probenzusatzwert' |
14 ], | 14 ], |
15 init: function() { | 15 init: function() { |
16 console.log('Initialising the Proben controller'); | 16 console.log('Initialising the Proben controller'); |
39 }, | 39 }, |
40 editProbe: function(grid, record) { | 40 editProbe: function(grid, record) { |
41 console.log('Editing Probe'); | 41 console.log('Editing Probe'); |
42 var id = record.get('probeId'); | 42 var id = record.get('probeId'); |
43 var view = Ext.widget('probenedit', {modelId: id}); | 43 var view = Ext.widget('probenedit', {modelId: id}); |
44 | |
45 // Load Zusatzwerte | |
46 var zstore = this.getZusatzwerteStore(); | |
47 zstore.load({ | |
48 params: { | |
49 probe: id | |
50 } | |
51 }); | |
44 console.log("Loaded Probe with ID " + record.getId()); //outputs ID | 52 console.log("Loaded Probe with ID " + record.getId()); //outputs ID |
45 }, | 53 }, |
46 createSuccess: function(form, record, operation) { | 54 createSuccess: function(form, record, operation) { |
47 // Reload store | 55 // Reload store |
48 var store = this.getProbenStore(); | 56 var store = this.getProbenStore(); |