diff app/controller/form/Probe.js @ 639:fdaabab6f4cc

Open Probe-/Messung-Edit window automatically if a new item was saved successfully.
author Raimund Renkert <raimund.renkert@intevation.de>
date Tue, 17 Mar 2015 14:44:52 +0100
parents e0b966b32163
children a24db43b13b5
line wrap: on
line diff
--- a/app/controller/form/Probe.js	Tue Mar 17 14:33:13 2015 +0100
+++ b/app/controller/form/Probe.js	Tue Mar 17 14:44:52 2015 +0100
@@ -39,6 +39,14 @@
                     formPanel.clearMessages();
                     formPanel.setRecord(record);
                     formPanel.setMessages(json.errors, json.warnings);
+                    if (response.action === 'create' && json.success) {
+                        button.up('window').close();
+                        var win = Ext.create('Lada.view.window.ProbeEdit', {
+                            record: record
+                        });
+                        win.show();
+                        win.initData();
+                    }
                 }
             },
             failure: function(record, response) {

http://lada.wald.intevation.org