merge stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 02 Oct 2009 08:57:55 +0200
branchstable
changeset 3549 63718638352e
parent 3548 4cf5a360952e (current diff)
parent 3545 242b07b6d820 (diff)
child 3550 f9bdcfeb12ee
merge
--- a/web/data/cubicweb.edition.js	Fri Oct 02 08:57:25 2009 +0200
+++ b/web/data/cubicweb.edition.js	Fri Oct 02 08:57:55 2009 +0200
@@ -288,8 +288,9 @@
     // 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();
+    if (! node.attr('cubicweb:type')) {
+        node.attr('cubicweb:type', node.val());
+        node.val('');
 	var divid = ['div', peid, rtype, eid].join('-');
 	jqNode(divid).fadeTo('fast', 0.5);
 	var noticeid = ['notice', peid, rtype, eid].join('-');
@@ -301,9 +302,9 @@
     // 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});
+    if (node.attr('cubicweb:type')) {
+        node.val(node.attr('cubicweb:type'));
+        node.attr('cubicweb:type', '');
 	jqNode(['fs', peid, rtype, eid].join('-')).append(node);
         var divid = ['div', peid, rtype, eid].join('-');
 	jqNode(divid).fadeTo('fast', 1);