changeset 974:ea477f62a667

Refresh a Probe and its Messungengrid when the status of a messung was changed
author Dustin Demuth <dustin@intevation.de>
date Mon, 30 Nov 2015 14:52:59 +0100
parents 989736bf4ffb
children fb99332bb48e abc2e9fe5069 c4c95d340ebe
files app/controller/grid/Status.js
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;

http://lada.wald.intevation.org