comparison app/controller/Proben.js @ 64:a4a24e737deb

Added listener to open a new window to enter data fpr the new probe.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Fri, 31 May 2013 17:34:34 +0200
parents 3c7bfff8bd64
children 9e2e09e819fd
comparison
equal deleted inserted replaced
63:f7d40f8a6902 64:a4a24e737deb
24 // Map the "render" event to the given function. 24 // Map the "render" event to the given function.
25 render: this.onPanelRendered, 25 render: this.onPanelRendered,
26 // Map Doubleclick on rows of the probenlist. 26 // Map Doubleclick on rows of the probenlist.
27 itemdblclick: this.editProbe 27 itemdblclick: this.editProbe
28 }, 28 },
29 'probenlist toolbar button[action=add]': {
30 // Map Doubleclick on rows of the probenlist.
31 click: this.addProbe
32 },
29 'probenedit button[action=save]': { 33 'probenedit button[action=save]': {
30 click: this.updateProbe 34 click: this.updateProbe
31 } 35 }
32 }); 36 });
33 }, 37 },
34 onPanelRendered: function() { 38 onPanelRendered: function() {
35 console.log('The panel was rendered'); 39 console.log('The panel was rendered');
40 },
41 addProbe: function(button) {
42 console.log('Adding new Probe');
43 var view = Ext.widget('probenedit');
44 var form = view.down('form');
45 // Create a new Kommentar
46 var record = Ext.create('Lada.model.Probe');
47 form.loadRecord(record);
36 }, 48 },
37 editProbe: function(grid, record) { 49 editProbe: function(grid, record) {
38 console.log('Double click on ' + record.get('probeId')); 50 console.log('Double click on ' + record.get('probeId'));
39 // Create new window to edit the seletced record. 51 // Create new window to edit the seletced record.
40 var view = Ext.widget('probenedit'); 52 var view = Ext.widget('probenedit');

http://lada.wald.intevation.org