changeset 556:d5ad2f43658a

Update probe window and ort grid only on save success.
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 06 Mar 2015 17:02:48 +0100
parents 7f8e64c5bd2e
children 48ee1adee0a2
files app/controller/OrtGrid.js
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/app/controller/OrtGrid.js	Fri Mar 06 17:01:15 2015 +0100
+++ b/app/controller/OrtGrid.js	Fri Mar 06 17:02:48 2015 +0100
@@ -34,9 +34,15 @@
     },
 
     gridSave: function(editor, context) {
-        context.record.save();
-        context.grid.store.reload();
-        context.grid.up('window').initData();
+        context.record.save({
+            success: function() {
+                context.grid.store.reload();
+                context.grid.up('window').initData();
+            },
+            failure: function() {
+                // TODO
+            }
+        });
     },
 
     open: function() {

http://lada.wald.intevation.org