web/data/cubicweb.edition.js
branchstable
changeset 3544 188d86631c45
parent 3343 383b42263bb1
child 3545 242b07b6d820
--- a/web/data/cubicweb.edition.js	Thu Oct 01 14:50:10 2009 +0200
+++ b/web/data/cubicweb.edition.js	Thu Oct 01 16:06:29 2009 +0200
@@ -285,7 +285,8 @@
  * @param eid : the inlined entity eid
  */
 function removeInlinedEntity(peid, rtype, eid) {
-    var nodeid = ['rel', peid, rtype, eid].join('-');
+    // XXX work around the eid_param thing (eid + ':' + eid) for #471746
+    var nodeid = ['rel', peid, rtype, eid + ':' + eid].join('-');
     var node = jqNode(nodeid);
     if (node && node.length) {
 	node.remove();
@@ -297,15 +298,16 @@
 }
 
 function restoreInlinedEntity(peid, rtype, eid) {
-    var nodeid = ['rel', peid, rtype, eid].join('-');
-    var divid = ['div', peid, rtype, eid].join('-');
-    var noticeid = ['notice', peid, rtype, eid].join('-');
+    // XXX work around the eid_param thing (eid + ':' + eid) for #471746
+    var nodeid = ['rel', peid, rtype, eid + ':' + eid].join('-');
     var node = jqNode(nodeid);
     if (!(node && node.length)) {
 	node = INPUT({type: 'hidden', id: nodeid,
 		      name: rtype+':'+peid, value: eid});
 	jqNode(['fs', peid, rtype, eid].join('-')).append(node);
+        var divid = ['div', peid, rtype, eid].join('-');
 	jqNode(divid).fadeTo('fast', 1);
+        var noticeid = ['notice', peid, rtype, eid].join('-');
 	jqNode(noticeid).hide();
     }
 }