Mercurial > lada > lada-client
changeset 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 | f7d40f8a6902 |
children | 9e2e09e819fd |
files | app/controller/Proben.js |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/app/controller/Proben.js Fri May 31 17:28:33 2013 +0200 +++ b/app/controller/Proben.js Fri May 31 17:34:34 2013 +0200 @@ -26,6 +26,10 @@ // Map Doubleclick on rows of the probenlist. itemdblclick: this.editProbe }, + 'probenlist toolbar button[action=add]': { + // Map Doubleclick on rows of the probenlist. + click: this.addProbe + }, 'probenedit button[action=save]': { click: this.updateProbe } @@ -34,6 +38,14 @@ onPanelRendered: function() { console.log('The panel was rendered'); }, + addProbe: function(button) { + console.log('Adding new Probe'); + var view = Ext.widget('probenedit'); + var form = view.down('form'); + // Create a new Kommentar + var record = Ext.create('Lada.model.Probe'); + form.loadRecord(record); + }, editProbe: function(grid, record) { console.log('Double click on ' + record.get('probeId')); // Create new window to edit the seletced record.