[Lada-commits] [PATCH 5 of 5] Reload grids on messung or ort changed/added

Wald Commits scm-commit at wald.intevation.org
Tue Mar 17 16:05:44 CET 2015


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1426604793 -3600
# Node ID 71e8b84d78298e3bd1c347eaed4ffefb600414f6
# Parent  477379250512581ae1fe9e5ffd02d98f0840429b
Reload grids on messung or ort changed/added.

diff -r 477379250512 -r 71e8b84d7829 app/controller/form/Messung.js
--- a/app/controller/form/Messung.js	Tue Mar 17 16:05:52 2015 +0100
+++ b/app/controller/form/Messung.js	Tue Mar 17 16:06:33 2015 +0100
@@ -39,6 +39,7 @@
                     formPanel.clearMessages();
                     formPanel.setRecord(record);
                     formPanel.setMessages(json.errors, json.warnings);
+                    formPanel.up('window').grid.store.reload();
                     if (response.action === 'create' && json.success) {
                         button.up('window').close();
                         var win = Ext.create('Lada.view.window.MessungEdit', {
diff -r 477379250512 -r 71e8b84d7829 app/controller/form/Ort.js
--- a/app/controller/form/Ort.js	Tue Mar 17 16:05:52 2015 +0100
+++ b/app/controller/form/Ort.js	Tue Mar 17 16:06:33 2015 +0100
@@ -42,6 +42,7 @@
                     formPanel.clearMessages();
                     formPanel.setRecord(record);
                     formPanel.setMessages(json.errors, json.warnings);
+                    formPanel.up('window').grid.store.reload();
                 }
             },
             failure: function(record, response) {
diff -r 477379250512 -r 71e8b84d7829 app/controller/grid/Messung.js
--- a/app/controller/grid/Messung.js	Tue Mar 17 16:05:52 2015 +0100
+++ b/app/controller/grid/Messung.js	Tue Mar 17 16:06:33 2015 +0100
@@ -32,7 +32,8 @@
 
     editItem: function(grid, record) {
         var win = Ext.create('Lada.view.window.MessungEdit', {
-            record: record
+            record: record,
+            grid: grid
         });
         win.show();
         win.initData();
@@ -41,7 +42,8 @@
     add: function(button) {
         var probe = button.up('window').record;
         var win = Ext.create('Lada.view.window.MessungCreate', {
-            record: probe
+            record: probe,
+            grid: button.up('messunggrid')
         });
         win.show();
         win.initData();
diff -r 477379250512 -r 71e8b84d7829 app/controller/grid/Ort.js
--- a/app/controller/grid/Ort.js	Tue Mar 17 16:05:52 2015 +0100
+++ b/app/controller/grid/Ort.js	Tue Mar 17 16:06:33 2015 +0100
@@ -10,7 +10,8 @@
     extend: 'Ext.app.Controller',
 
     requires: [
-        'Lada.view.window.OrtEdit'
+        'Lada.view.window.OrtEdit',
+        'Lada.view.window.OrtCreate'
     ],
 
     init: function() {
@@ -29,7 +30,8 @@
 
     open: function(grid, record) {
         var win = Ext.create('Lada.view.window.OrtEdit', {
-            record: record
+            record: record,
+            grid: grid
         });
         win.show();
         win.initData();
diff -r 477379250512 -r 71e8b84d7829 app/view/window/MessungCreate.js
--- a/app/view/window/MessungCreate.js	Tue Mar 17 16:05:52 2015 +0100
+++ b/app/view/window/MessungCreate.js	Tue Mar 17 16:06:33 2015 +0100
@@ -24,6 +24,7 @@
     layout: 'fit',
 
     record: null,
+    grid: null,
 
     initComponent: function() {
         this.title = 'Messung';
diff -r 477379250512 -r 71e8b84d7829 app/view/window/MessungEdit.js
--- a/app/view/window/MessungEdit.js	Tue Mar 17 16:05:52 2015 +0100
+++ b/app/view/window/MessungEdit.js	Tue Mar 17 16:06:33 2015 +0100
@@ -27,6 +27,7 @@
     layout: 'fit',
 
     record: null,
+    grid: null,
 
     initComponent: function() {
         if (this.record === null) {
diff -r 477379250512 -r 71e8b84d7829 app/view/window/OrtEdit.js
--- a/app/view/window/OrtEdit.js	Tue Mar 17 16:05:52 2015 +0100
+++ b/app/view/window/OrtEdit.js	Tue Mar 17 16:06:33 2015 +0100
@@ -25,6 +25,7 @@
     layout: 'border',
 
     record: null,
+    grid: null,
 
     initComponent: function() {
         if (this.record === null) {


More information about the Lada-commits mailing list