[Lada-commits] [PATCH 05 of 13] Added function to save a Messung

Wald Commits scm-commit at wald.intevation.org
Mon Jul 8 16:17:43 CEST 2013


# HG changeset patch
# User Torsten Irländer <torsten.irlaender at intevation.de>
# Date 1373286365 -7200
# Node ID 5d72d74a2dafb96cc04abf85368bee0c0bb8d105
# Parent  93de61af9b9e2f69e29b1555d4eed928ae9e765a
Added function to save a Messung.

diff -r 93de61af9b9e -r 5d72d74a2daf app/controller/Messungen.js
--- 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];


More information about the Lada-commits mailing list