fix #471746 stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Thu, 01 Oct 2009 16:06:29 +0200
branchstable
changeset 3544 188d86631c45
parent 3543 ed152fe5aa8b
child 3545 242b07b6d820
child 3546 f0aecddf367e
fix #471746
web/data/cubicweb.edition.js
--- 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();
     }
 }