comparison app/controller/Messungen.js @ 172:cfa0cc437781

Implemented opening a new Messungen form when clicking and the "Add Button" on the Messungen listing.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Wed, 03 Jul 2013 16:34:32 +0200
parents 79a9c1a83305
children 062aa9001eb6
comparison
equal deleted inserted replaced
171:c5422819d7b9 172:cfa0cc437781
1 Ext.define('Lada.controller.Messungen', { 1 Ext.define('Lada.controller.Messungen', {
2 extend: 'Ext.app.Controller', 2 extend: 'Ext.app.Controller',
3 views: [
4 'messungen.Create'
5 ],
3 stores: [ 6 stores: [
4 'Messungen', 7 'Messungen',
5 'Messwerte', 8 'Messwerte',
6 'MKommentare', 9 'MKommentare',
7 'Status' 10 'Status'
29 savefailure: this.editFailure 32 savefailure: this.editFailure
30 } 33 }
31 }); 34 });
32 }, 35 },
33 addZusatzwert: function(button) { 36 addZusatzwert: function(button) {
34 console.log('Adding new Zusatzwert'); 37 console.log('Adding new Messung for Probe ' + button.probeId);
35 var view = Ext.widget('messungencreate'); 38 var messung = Ext.create('Lada.model.Messung');
39 messung.set('probeId', button.probeId);
40 var view = Ext.widget('messungencreate', {model: messung});
36 }, 41 },
37 editZusatzwert: function(grid, record) { 42 editZusatzwert: function(grid, record) {
38 console.log('Editing Zusatzwert'); 43 console.log('Editing Zusatzwert');
39 var view = Ext.widget('messungencreate', {model: record}); 44 var view = Ext.widget('messungencreate', {model: record});
40 console.log("Loaded Zusatzwert with ID " + record.getId()); //outputs ID 45 console.log("Loaded Zusatzwert with ID " + record.getId()); //outputs ID

http://lada.wald.intevation.org