[Lada-commits] [PATCH] Refresh a Probe and its Messungengrid when the status of a messung was changed

Wald Commits scm-commit at wald.intevation.org
Mon Nov 30 14:53:21 CET 2015


# HG changeset patch
# User Dustin Demuth <dustin at intevation.de>
# Date 1448891579 -3600
# Node ID ea477f62a667a5919ea1f391b5262d9b123b9d41
# Parent  989736bf4ffbb8762b9f995e2a556a96a36fba24
Refresh a Probe and its Messungengrid when the status of a messung was changed

diff -r 989736bf4ffb -r ea477f62a667 app/controller/grid/Status.js
--- a/app/controller/grid/Status.js	Thu Nov 19 14:30:08 2015 +0100
+++ b/app/controller/grid/Status.js	Mon Nov 30 14:52:59 2015 +0100
@@ -33,6 +33,7 @@
      * This function is called when the grids roweditor saves
      * the record.
      * On success it refreshes the windows which contains the grid
+     *   it also tries to refresh the ProbeWindow and the messunggrid
      * On failure it displays a message
      */
      gridSave: function(editor, context) {
@@ -40,7 +41,14 @@
         context.record.save({
             success: function() {
                 context.grid.initData();
-                context.grid.up('window').initData();
+                var win = context.grid.up('window');
+                win.initData();
+                try {
+                    win.parentWindow.initData();
+                    win.parentWindow.down('messunggrid').store.reload();
+                }
+                catch(e) {
+                }
             },
             failure: function(request, response) {
                 var json = response.request.scope.reader.jsonData;


More information about the Lada-commits mailing list