[forms] we need a wrapping list to avoid bug caused by flatening done by $.map. Closes #1164908
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 08 Jul 2010 12:43:39 +0200
changeset 5935 348cf2a14cc1
parent 5934 6ccaaf04cfbc
child 5936 98ac4000e820
[forms] we need a wrapping list to avoid bug caused by flatening done by $.map. Closes #1164908
web/data/cubicweb.edition.js
--- a/web/data/cubicweb.edition.js	Thu Jul 08 10:04:30 2010 +0200
+++ b/web/data/cubicweb.edition.js	Thu Jul 08 12:43:39 2010 +0200
@@ -272,7 +272,7 @@
 
 function selectForAssociation(tripletIdsString, originalEid) {
     var tripletlist = $.map(tripletIdsString.split('-'),
-			    function(x) { return x.split(':');});
+			    function(x) { return [x.split(':');}]);
     var d = loadRemote('json', ajaxFuncArgs('add_pending_inserts', null, tripletlist));
     d.addCallback(function() {
         var args = {