[dev] onmouseover cursor for tree.js
Matt
matt at kynx.org
Mon Mar 8 02:46:21 PST 2004
Hi there,
Trivial fix for /horde/templates/javascript/tree.js. It changes cursor
to a pointer onmouseover if the node has an onclick event attached.
Tested on IE6 and Moz 1.6.
Regards,
Matt
-------------- next part --------------
--- tree.js.orig 2004-01-05 14:16:18.000000000 +0000
+++ tree.js 2004-03-08 10:21:28.000000000 +0000
@@ -166,13 +166,19 @@
{
var label = this.nodes[nodeId]['label'];
var onClick = '';
+ var onMouseOver = '';
+ var onMouseOut = '';
if (this.nodes[nodeId]['onclick']) {
onClick = ' onclick="' + this.nodes[nodeId]['onclick'] + '"';
+ if (document.body.style) {
+ onMouseOver = ' onmouseover="this.style.cursor=\'pointer\'"';
+ onMouseOut = ' onmouseout="this.style.cursor=\'default\'"';
+ }
}
if (this.nodes[nodeId]['url']) {
label = '<a href="' + this.nodes[nodeId]['url'] + '">' + label + '</a>';
}
- return '<span' + onClick + '>' + label + '</span></td>';
+ return '<span' + onClick + onMouseOver + onMouseOut + '>' + label + '</span></td>';
}
this._setNodeToggle = function(nodeId)
More information about the dev
mailing list