Mercurial > lada > lada-client
comparison app/controller/form/Messung.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 | ee92e352be20 |
children | 71e8b84d7829 |
comparison
equal
deleted
inserted
replaced
638:d21048cbdbb3 | 639:fdaabab6f4cc |
---|---|
37 button.up('toolbar').down('button[action=discard]') | 37 button.up('toolbar').down('button[action=discard]') |
38 .setDisabled(true); | 38 .setDisabled(true); |
39 formPanel.clearMessages(); | 39 formPanel.clearMessages(); |
40 formPanel.setRecord(record); | 40 formPanel.setRecord(record); |
41 formPanel.setMessages(json.errors, json.warnings); | 41 formPanel.setMessages(json.errors, json.warnings); |
42 if (response.action === 'create' && json.success) { | |
43 button.up('window').close(); | |
44 var win = Ext.create('Lada.view.window.MessungEdit', { | |
45 record: record | |
46 }); | |
47 win.show(); | |
48 win.initData(); | |
49 } | |
42 } | 50 } |
43 }, | 51 }, |
44 failure: function(record, response) { | 52 failure: function(record, response) { |
45 button.setDisabled(true); | 53 button.setDisabled(true); |
46 button.up('toolbar').down('button[action=discard]') | 54 button.up('toolbar').down('button[action=discard]') |