[js] get rid of `partial` function (closes #1972794) stable
authorKatia Saurfelt <katia.saurfelt@logilab.fr>
Thu, 29 Mar 2012 14:24:49 +0200
branchstable
changeset 8335 eef305ace54c
parent 8334 20e38436395f
child 8336 7ccd4367ee1c
[js] get rid of `partial` function (closes #1972794)
web/data/cubicweb.edition.js
--- a/web/data/cubicweb.edition.js	Wed Mar 21 15:23:47 2012 +0100
+++ b/web/data/cubicweb.edition.js	Thu Mar 29 14:24:49 2012 +0200
@@ -435,11 +435,15 @@
         }
     }
     if (globalerrors.length) {
-        if (globalerrors.length == 1) {
-            var innernode = SPAN(null, globalerrors[0]);
-        } else {
-            var innernode = UL(null, $.map(globalerrors, partial(LI, null)));
-        }
+       if (globalerrors.length == 1) {
+           var innernode = SPAN(null, globalerrors[0]);
+       } else {
+           var linodes =[];
+           for(var i=0; i<globalerrors.length; i++){
+             linodes.push(LI(null, globalerrors[i]));
+           }
+           var innernode = UL(null, linodes);
+       }
         // insert DIV and innernode before the form
         var div = DIV({
             'class': "errorMessage",