[Lada-commits] [PATCH 3 of 7] Update probe window and ort grid only on save success

Wald Commits scm-commit at wald.intevation.org
Fri Mar 6 17:05:15 CET 2015


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1425657768 -3600
# Node ID d5ad2f43658abd3e46602f4b3148d6b858196d95
# Parent  7f8e64c5bd2e845c61ac7505e90984ef0607d47c
Update probe window and ort grid only on save success.

diff -r 7f8e64c5bd2e -r d5ad2f43658a app/controller/OrtGrid.js
--- 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() {


More information about the Lada-commits mailing list