Mercurial > lada > lada-client
changeset 405:85238577adc9
Show warnings when saving a new Probe.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Thu, 12 Sep 2013 12:31:27 +0200 |
parents | 9caedffa5c7b |
children | de73dc41f1d3 |
files | app/controller/Proben.js |
diffstat | 1 files changed, 19 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/app/controller/Proben.js Wed Sep 11 11:16:13 2013 +0200 +++ b/app/controller/Proben.js Thu Sep 12 12:31:27 2013 +0200 @@ -213,6 +213,25 @@ // Close Createdialog var win = form.up('window'); win.close(); + var resp = Ext.decode(response.responseText); + var warn = Array(); + var err = Array(); + if (resp.warnings) { + warn.push("<strong>Warnungen:</strong><br>"); + for (var key in resp.warnings) { + warn.push(key + ": "); + warn.push(Lada.getApplication().bundle.getMsg(resp.warnings[key]) + "<br>"); + } + } + if (resp.errors) { + err.push("<strong>Fehler:</strong><br>"); + for (var key in resp.errors) { + err.push(key + ": "); + err.push(Lada.getApplication().bundle.getMsg(resp.warnings[key]) + "<br>"); + } + } + var msg = warn.join("") + err.join(""); + Ext.MessageBox.alert("Ergebnis", msg); // Reload store var store = this.getProbenStore(); store.reload({