Update of /var/cvs/applications/searchrelate/templates
In directory james.mmbase.org:/tmp/cvs-serv2211

Modified Files:
        List.js.jsp 
Log Message:
fix for jquery 1.3.2 did not quite work yet in IE


See also: http://cvs.mmbase.org/viewcvs/applications/searchrelate/templates


Index: List.js.jsp
===================================================================
RCS file: /var/cvs/applications/searchrelate/templates/List.js.jsp,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -b -r1.38 -r1.39
--- List.js.jsp 9 Apr 2009 10:04:58 -0000       1.38
+++ List.js.jsp 9 Apr 2009 15:59:00 -0000       1.39
@@ -17,7 +17,7 @@
  * -  mmsrCreated
  *
  * @author Michiel Meeuwissen
- * @version $Id: List.js.jsp,v 1.38 2009/04/09 10:04:58 michiel Exp $
+ * @version $Id: List.js.jsp,v 1.39 2009/04/09 15:59:00 michiel Exp $
  */
 
 
@@ -100,12 +100,31 @@
         });
     this.setTabIndices();
     $(this.div).trigger("mmsrRelatedNodesReady", [self]);
+
+    this.logEnabled = false;
 }
 
 List.prototype.leftPage = false;
 
 
+List.prototype.log = function(msg) {
+    if (this.logEnabled) {
+        var errorTextArea = document.getElementById("logarea");
+        if (errorTextArea) {
+            errorTextArea.value = "LOG: " + msg + "\n" + errorTextArea.value;
+        } else {
+            // firebug console
+               if (typeof(console) != "undefined") {
+                       console.log(msg);
+               }
+        }
+    }
+};
+
+
 List.prototype.find = function(clazz, elname, parent) {
+
+    this.log("---------Finding " + clazz + " " + elname + " in " + parent);
     var result = [];
     var self = this;
     if (elname != null) elname = elname.toUpperCase();
@@ -115,11 +134,7 @@
     var t = parent.firstChild;
     while (t != null) {
         var cn = t.nodeName.toUpperCase();
-        if (cn == "#COMMENT") {
-            t = t.nextSibling;
-            continue;
-        }
-        if (cn == '#TEXT' || (cn == 'DIV' && $(t).hasClass("list"))) {
+        if (cn == '#TEXT' || cn == '#COMMENT' || (cn == 'DIV' && 
$(t).hasClass("list"))) {
             var c = t.nextSibling;
             while (c == null) {
                 t = t.parentNode;
@@ -129,6 +144,7 @@
             t = c;
 
         } else {
+            this.log(" - " + cn + " " + elname + " in " + $(t).hasClass(clazz) 
+ " " + t.href);
             if ( (clazz == null || $(t).hasClass(clazz)) &&
                  (elname == null || cn == elname)) {
                 result[result.length] = t;
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to