[Lada-commits] [PATCH 2 of 4] Open probe create window on button click

Wald Commits scm-commit at wald.intevation.org
Mon Mar 16 12:11:16 CET 2015


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1426504203 -3600
# Node ID e0b966b321637f492be1e3d5092d6ec1d7ad24db
# Parent  7a7a16b0a54828069b1520fbbefc592de485e39d
Open probe create window on button click.

diff -r 7a7a16b0a548 -r e0b966b32163 app/controller/FilterResult.js
--- a/app/controller/FilterResult.js	Mon Mar 16 12:09:17 2015 +0100
+++ b/app/controller/FilterResult.js	Mon Mar 16 12:10:03 2015 +0100
@@ -42,6 +42,9 @@
     },
 
     addItem: function(button) {
+        var win = Ext.create('Lada.view.window.ProbeCreate');
+        win.show();
+        win.initData();
 
     },
 
diff -r 7a7a16b0a548 -r e0b966b32163 app/controller/form/Probe.js
--- a/app/controller/form/Probe.js	Mon Mar 16 12:09:17 2015 +0100
+++ b/app/controller/form/Probe.js	Mon Mar 16 12:10:03 2015 +0100
@@ -32,9 +32,7 @@
         formPanel.getForm().getRecord().save({
             success: function(record, response) {
                 var json = Ext.decode(response.response.responseText);
-                if (response.action !== 'create' &&
-                    json &&
-                    json.success) {
+                if (json) {
                     button.setDisabled(true);
                     button.up('toolbar').down('button[action=discard]')
                         .setDisabled(true);


More information about the Lada-commits mailing list