Author: michiel
Date: 2010-03-16 19:46:45 +0100 (Tue, 16 Mar 2010)
New Revision: 41444

Modified:
   
mmbase/trunk/applications/searchrelate/src/main/webapp/mmbase/searchrelate/List.js.jsp
Log:
something not quite right with lists in lists

Modified: 
mmbase/trunk/applications/searchrelate/src/main/webapp/mmbase/searchrelate/List.js.jsp
===================================================================
--- 
mmbase/trunk/applications/searchrelate/src/main/webapp/mmbase/searchrelate/List.js.jsp
      2010-03-16 18:46:16 UTC (rev 41443)
+++ 
mmbase/trunk/applications/searchrelate/src/main/webapp/mmbase/searchrelate/List.js.jsp
      2010-03-16 18:46:45 UTC (rev 41444)
@@ -464,7 +464,6 @@
  */
 List.prototype.addItem = function(res, cleanOnFocus) {
     var list = this;
-    //console.log(res.responseText);
     var r = $(res.responseText);
     // This seems nicer, but it would give problems if the content types don't 
match
     // And anyway, it of course never works in IE.
@@ -473,10 +472,10 @@
     var ol = list.find(null, "ol");
     if (this.addposition == 'top') {
         ol.prepend(r);
-        r = ol.find("li:first")[0];
+        r = ol.find(">li:first")[0];
     } else {
         ol.append(r);
-        r = ol.find("li:last")[0];
+        r = ol.find(">li:last")[0];
     }
     if (cleanOnFocus == null || cleanOnFocus) {
         // remove default value on focus
@@ -502,7 +501,8 @@
         });
 
     // Arrange sub-lists in this new item.
-    $(r).find("div.list").each(function() {
+    $(r).find("div.list").each(
+        function() {
             var div = this;
             if (div.list == null) {
                 div.list = new List(div);

_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to