Mercurial > lada > lada-client
diff 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 |
line wrap: on
line diff
--- a/app/controller/Messungen.js Wed Jul 03 16:13:36 2013 +0200 +++ b/app/controller/Messungen.js Wed Jul 03 16:34:32 2013 +0200 @@ -1,5 +1,8 @@ Ext.define('Lada.controller.Messungen', { extend: 'Ext.app.Controller', + views: [ + 'messungen.Create' + ], stores: [ 'Messungen', 'Messwerte', @@ -31,8 +34,10 @@ }); }, addZusatzwert: function(button) { - console.log('Adding new Zusatzwert'); - var view = Ext.widget('messungencreate'); + console.log('Adding new Messung for Probe ' + button.probeId); + var messung = Ext.create('Lada.model.Messung'); + messung.set('probeId', button.probeId); + var view = Ext.widget('messungencreate', {model: messung}); }, editZusatzwert: function(grid, record) { console.log('Editing Zusatzwert');