Mercurial > lada > lada-client
changeset 858:2c686025934a
Show message on probe delete success/error.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 10 Jul 2015 18:04:20 +0200 |
parents | 01cddda65fea |
children | 6249b731d438 |
files | app/view/window/DeleteProbe.js |
diffstat | 1 files changed, 16 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/app/view/window/DeleteProbe.js Fri Jul 10 18:03:52 2015 +0200 +++ b/app/view/window/DeleteProbe.js Fri Jul 10 18:04:20 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;