Mercurial > lada > lada-client
comparison app/controller/Proben.js @ 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 | 4fdc09ebf21d |
children | bd2b26c249e2 |
comparison
equal
deleted
inserted
replaced
404:9caedffa5c7b | 405:85238577adc9 |
---|---|
211 }, | 211 }, |
212 createSuccess: function(form, record, response) { | 212 createSuccess: function(form, record, response) { |
213 // Close Createdialog | 213 // Close Createdialog |
214 var win = form.up('window'); | 214 var win = form.up('window'); |
215 win.close(); | 215 win.close(); |
216 var resp = Ext.decode(response.responseText); | |
217 var warn = Array(); | |
218 var err = Array(); | |
219 if (resp.warnings) { | |
220 warn.push("<strong>Warnungen:</strong><br>"); | |
221 for (var key in resp.warnings) { | |
222 warn.push(key + ": "); | |
223 warn.push(Lada.getApplication().bundle.getMsg(resp.warnings[key]) + "<br>"); | |
224 } | |
225 } | |
226 if (resp.errors) { | |
227 err.push("<strong>Fehler:</strong><br>"); | |
228 for (var key in resp.errors) { | |
229 err.push(key + ": "); | |
230 err.push(Lada.getApplication().bundle.getMsg(resp.warnings[key]) + "<br>"); | |
231 } | |
232 } | |
233 var msg = warn.join("") + err.join(""); | |
234 Ext.MessageBox.alert("Ergebnis", msg); | |
216 // Reload store | 235 // Reload store |
217 var store = this.getProbenStore(); | 236 var store = this.getProbenStore(); |
218 store.reload({ | 237 store.reload({ |
219 scope: this, | 238 scope: this, |
220 callback: function(records, operation, success) { | 239 callback: function(records, operation, success) { |