You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by bu...@apache.org on 2005/06/05 17:19:07 UTC
DO NOT REPLY [Bug 35227] -
[Patch] sitetree js fails for some older browsers
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35227>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=35227
------- Additional Comments From gregor@apache.org 2005-06-05 17:19 -------
Index: src/webapp/lenya/resources/javascript/navtree.js
===================================================================
--- src/webapp/lenya/resources/javascript/navtree.js (revision 170253)
+++ src/webapp/lenya/resources/javascript/navtree.js (working copy)
@@ -58,7 +58,7 @@
var items=[];
var item;
for (var i = 0; i < children.length; i++) {
- if (children[i].tagName == "nav:site") {
+ if (getTagName(children[i]) == "nav:site") {
item = this.addLoadedSite(children[i]);
items.push(item);
item.addNodesRec(children[i]);
@@ -352,7 +352,7 @@
var children = root.childNodes;
var items=[];
for (var i = 0; i < children.length; i++) {
- if (children[i].tagName == "nav:node") {
+ if (getTagName(children[i]) == "nav:node") {
items.push(this.addLoadedNode(children[i]));
}
}
@@ -368,7 +368,7 @@
var nodes = [];
var item;
for (var i = 0; i < children.length; i++) {
- if (children[i].tagName == "nav:node") {
+ if (getTagName(children[i]) == "nav:node") {
this.reopen = true; // this causes the parent to unfold
item = this.addLoadedNode(children[i]);
items.push(item);
@@ -428,7 +428,7 @@
// lenya generates the xml and is responsible to insert the label
// of the correct language
for (var i = 0; i < l; i++) {
- if (cs[i].tagName=='nav:label') {
+ if (getTagName(cs[i]) =='nav:label') {
return cs[i].firstChild.nodeValue;
}
}
@@ -454,7 +454,7 @@
{
var children = node.childNodes;
for (var i = 0; i < children.length; i++) {
- if (children[i].tagName=='nav:label' &&
children[i].getAttribute('xml:lang')==CHOSEN_LANGUAGE) {
+ if (getTagName(children[i]) =='nav:label' &&
children[i].getAttribute('xml:lang')==CHOSEN_LANGUAGE) {
return true;
}
}
@@ -482,3 +482,15 @@
xmlhttp = new XMLHttpRequest();
}
}
+
+//workaround for http://issues.apache.org/bugzilla/show_bug.cgi?id=35227
+function getTagName(element)
+{
+ var tagName = element.tagName;
+ var prefix = element.prefix;
+
+ if(tagName.indexOf(prefix + ':') == -1) {
+ tagName = prefix + ':' + tagName;
+ }
+ return tagName;
+}
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org