Mercurial > lada > lada-client
comparison app/controller/Zusatzwerte.js @ 132:04439f3feba3
Use getEidi on url generation for delete requests.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Tue, 25 Jun 2013 17:30:58 +0200 |
parents | 33aed7dde69f |
children | a7eea094d3d6 |
comparison
equal
deleted
inserted
replaced
131:968806c1a3cb | 132:04439f3feba3 |
---|---|
61 var grid = button.up('grid'); | 61 var grid = button.up('grid'); |
62 var selection = grid.getView().getSelectionModel().getSelection()[0]; | 62 var selection = grid.getView().getSelectionModel().getSelection()[0]; |
63 Ext.MessageBox.confirm('Löschen', 'Sind Sie sicher?', function(btn){ | 63 Ext.MessageBox.confirm('Löschen', 'Sind Sie sicher?', function(btn){ |
64 if(btn === 'yes'){ | 64 if(btn === 'yes'){ |
65 var store = grid.getStore(); | 65 var store = grid.getStore(); |
66 var sprobenZusatz = selection.get('sprobenZusatz'); | 66 var deleteUrl = selection.getProxy().url + selection.getEidi(); |
67 var pzsId = sprobenZusatz.pzsId; | |
68 var probeId = selection.get('probeId'); | |
69 var deleteUrl = selection.getProxy().url + "/" + pzsId + "/" + probeId; | |
70 Ext.Ajax.request({ | 67 Ext.Ajax.request({ |
71 url: deleteUrl, | 68 url: deleteUrl, |
72 method: 'DELETE', | 69 method: 'DELETE', |
73 success: function(response, opts) { | 70 success: function(response, opts) { |
74 store.reload(); | 71 store.reload(); |