web/data/cubicweb.js
changeset 9914 30b56a56c1f4
parent 9784 790956c311ef
child 9990 c84ad981fc4a
--- a/web/data/cubicweb.js	Tue Jul 22 17:45:38 2014 +0200
+++ b/web/data/cubicweb.js	Wed Jul 23 12:07:50 2014 +0200
@@ -390,14 +390,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 ************************************************************/