diff app/controller/OrtGrid.js @ 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 d47ee7439f44
children fa52f383daf8
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