You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ri...@apache.org on 2005/10/05 21:49:07 UTC
svn commit: r295094 -
/beehive/trunk/netui/src/javascript/tagshtml/netui-tree.js
Author: rich
Date: Wed Oct 5 12:49:01 2005
New Revision: 295094
URL: http://svn.apache.org/viewcvs?rev=295094&view=rev
Log:
This is a contribution from Carlin Rogers to address Fix for http://issues.apache.org/jira/browse/BEEHIVE-255 : Need to verify the support for JavaScript in Opera
tests: bvt in netui (WinXP)
BB: same (linux)
Modified:
beehive/trunk/netui/src/javascript/tagshtml/netui-tree.js
Modified: beehive/trunk/netui/src/javascript/tagshtml/netui-tree.js
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/javascript/tagshtml/netui-tree.js?rev=295094&r1=295093&r2=295094&view=diff
==============================================================================
--- beehive/trunk/netui/src/javascript/tagshtml/netui-tree.js (original)
+++ beehive/trunk/netui/src/javascript/tagshtml/netui-tree.js Wed Oct 5 12:49:01 2005
@@ -66,7 +66,7 @@
if (attr == "collapse") {
NetUICollapseTreeNode(document.links[i],false);
}
- document.links[i].removeAttribute("netui:treeAnchorInit");
+ netUIRemoveAttribute(document.links[i],"netui","treeAnchorInit");
}
}
}
@@ -657,6 +657,19 @@
attr = null;
}
return attr;
+}
+
+// use when an attribute was found by netUIGetAttribute()
+function netUIRemoveAttribute(node,namespace,attribute)
+{
+ var nsAttr = namespace + ":" + attribute;
+ var attr = node.getAttribute(nsAttr);
+ if (attr == null || attr == "") {
+ attr = node.removeAttribute(attribute);
+ }
+ else {
+ attr = node.removeAttribute(nsAttr);
+ }
}
// Utility function to report an error