[Lada-commits] [PATCH 2 of 3] Fixed delete call

Wald Commits scm-commit at wald.intevation.org
Mon Jul 15 17:23:04 CEST 2013


# HG changeset patch
# User Torsten Irländer <torsten.irlaender at intevation.de>
# Date 1373901031 -7200
# Node ID 1b5a0cb4fa6caa00062ce0e99b8032858e339f2e
# Parent  4db982514a5fdc6937840d080502ec153b0a5caf
Fixed delete call

diff -r 4db982514a5f -r 1b5a0cb4fa6c app/controller/Messungen.js
--- a/app/controller/Messungen.js	Mon Jul 15 16:30:52 2013 +0200
+++ b/app/controller/Messungen.js	Mon Jul 15 17:10:31 2013 +0200
@@ -82,11 +82,17 @@
         Ext.MessageBox.confirm('Löschen', 'Sind Sie sicher?', function(btn){
             if(btn === 'yes'){
                 var store = grid.getStore();
-                store.remove(selection);
-                store.sync();
-                console.log('Deleting Kommentar');
+                var deleteUrl = selection.getProxy().url + selection.getEidi();
+                Ext.Ajax.request({
+                    url: deleteUrl,
+                    method: 'DELETE',
+                    success: function(response, opts) {
+                        store.reload();
+                    }
+                });
+                console.log('Deleting Messung');
             } else {
-                console.log('Cancel Deleting Kommentar');
+                console.log('Cancel Deleting Messung');
             }
         });
     },


More information about the Lada-commits mailing list