web/data/cubicweb.js
changeset 9990 c84ad981fc4a
parent 9821 2077c8da1893
parent 9914 30b56a56c1f4
child 10407 18d1ef2d2a3e
--- a/web/data/cubicweb.js	Tue Sep 23 17:34:36 2014 +0200
+++ b/web/data/cubicweb.js	Thu Sep 25 15:49:13 2014 +0200
@@ -339,14 +339,14 @@
 		    );
     },
 
-    callAddOrDeleteThenReload: function (add_or_delete, rtype, subjeid, objeid) {
-        var d = asyncRemoteExec(add_or_delete, rtype, subjeid, objeid);
-        d.addCallback(function() {
+    callAjaxFuncThenReload: function callAjaxFuncThenReload (/*...*/) {
+        var d = asyncRemoteExec.apply(null, arguments);
+        d.addCallback(function(msg) {
             window.location.reload();
+            if (msg)
+                updateMessage(msg);
         });
     }
-
-
 });
 
 /** DOM factories ************************************************************/