Mercurial > lada > lada-client
diff app/view/window/DeleteProbe.js @ 861:99c5dd8e9b0f
merged heads
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Fri, 10 Jul 2015 18:18:53 +0200 |
parents | 2c686025934a |
children | def27cdd0dfa |
line wrap: on
line diff
--- a/app/view/window/DeleteProbe.js Fri Jul 10 18:18:00 2015 +0200 +++ b/app/view/window/DeleteProbe.js Fri Jul 10 18:18:53 2015 +0200 @@ -55,12 +55,22 @@ }, success: function(response) { var json = Ext.JSON.decode(response.responseText); - Ext.Msg.show({ - title: i18n.getMsg('success'), - autoScroll: true, - msg: me.evalResponse(json), - buttons: Ext.Msg.OK, - }); + if (json.success && json.message === '200') { + Ext.Msg.show({ + title: i18n.getMsg('success'), + autoScroll: true, + msg: 'Probe gelöscht!', + buttons: Ext.Msg.OK + }); + } + else { + Ext.Msg.show({ + title: 'Fehler!', + msg: 'Ein Fehler ist aufgetreten, ist die Probe nicht leer?', + buttons: Ext.Msg.OK + }); + } + me.close(); }, failure: function(response) { var json = null;