Mercurial > lada > lada-client
diff app/controller/Messungen.js @ 194:5d72d74a2daf
Added function to save a Messung.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Mon, 08 Jul 2013 14:26:05 +0200 |
parents | 93de61af9b9e |
children | 01021f00ce6a |
line wrap: on
line diff
--- a/app/controller/Messungen.js Mon Jul 08 14:25:45 2013 +0200 +++ b/app/controller/Messungen.js Mon Jul 08 14:26:05 2013 +0200 @@ -37,18 +37,23 @@ } }); }, - addZusatzwert: function(button) { + saveMessung: function(button) { + console.log('Saving new Messung for Probe ' + button.probeId); + var form = button.up('window').down('form'); + form.commit(); + }, + addMessung: function(button) { 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'); + editMessung: function(grid, record) { + console.log('Editing Messung'); var view = Ext.widget('messungencreate', {model: record}); - console.log("Loaded Zusatzwert with ID " + record.getId()); //outputs ID + console.log("Loaded Messung with ID " + record.getId()); //outputs ID }, - deleteZusatzwert: function(button) { + deleteMessung: function(button) { // Get selected item in grid var grid = button.up('grid'); var selection = grid.getView().getSelectionModel().getSelection()[0];