web/data/cubicweb.js
changeset 9821 2077c8da1893
parent 9815 12e6d911027a
parent 9784 790956c311ef
child 9990 c84ad981fc4a
--- a/web/data/cubicweb.js	Fri May 23 18:35:13 2014 +0200
+++ b/web/data/cubicweb.js	Fri Jun 27 11:48:26 2014 +0200
@@ -100,7 +100,8 @@
             return $node.text();
         }
         return cw.evalJSON(sortvalue);
-    }
+    },
+
 });
 
 
@@ -336,8 +337,16 @@
 		    $.map(cw.utils.sliceList(arguments, 1), JSON.stringify).join(',')
 		    + ')'
 		    );
+    },
+
+    callAddOrDeleteThenReload: function (add_or_delete, rtype, subjeid, objeid) {
+        var d = asyncRemoteExec(add_or_delete, rtype, subjeid, objeid);
+        d.addCallback(function() {
+            window.location.reload();
+        });
     }
 
+
 });
 
 /** DOM factories ************************************************************/