[Lada-commits] [PATCH 2 of 2] Show message on probe delete success/error
Wald Commits
scm-commit at wald.intevation.org
Fri Jul 10 18:04:41 CEST 2015
# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1436544260 -7200
# Node ID 2c686025934aa1acb00e78ce49485b9d6267913b
# Parent 01cddda65fead633af6d2b2605c9f40d7175a34b
Show message on probe delete success/error.
diff -r 01cddda65fea -r 2c686025934a app/view/window/DeleteProbe.js
--- 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;
More information about the Lada-commits
mailing list