web/data/cubicweb.js
changeset 9784 790956c311ef
parent 9661 c170ec8a4525
child 9821 2077c8da1893
child 9914 30b56a56c1f4
--- a/web/data/cubicweb.js	Wed May 28 17:57:40 2014 +0200
+++ b/web/data/cubicweb.js	Fri Mar 07 14:03:44 2014 +0100
@@ -100,7 +100,8 @@
             return $node.text();
         }
         return cw.evalJSON(sortvalue);
-    }
+    },
+
 });
 
 
@@ -387,8 +388,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 ************************************************************/