Author: pyaschenko
Date: 2008-03-06 08:20:44 -0500 (Thu, 06 Mar 2008)
New Revision: 6594
Modified:
trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
Log:
RF-2007
Modified:
trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
===================================================================
---
trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2008-03-06
13:13:40 UTC (rev 6593)
+++
trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2008-03-06
13:20:44 UTC (rev 6594)
@@ -2,6 +2,27 @@
window.Richfaces = {};
}
+Richfaces.ToolTip = {};
+
+Richfaces.ToolTip.cumulativeOffset = function(element)
+{
+ var valueT = 0, valueL = 0;
+ do {
+ if (window.opera && Richfaces.getComputedStyle(element, 'position')
== 'fixed')
+ {
+ valueT += Richfaces.getComputedStyleSize(element,"top");
+ valueL += Richfaces.getComputedStyleSize(element,"left");
+ }
+ else
+ {
+ valueT += element.offsetTop || 0;
+ valueL += element.offsetLeft || 0;
+ }
+ element = element.offsetParent;
+ } while (element);
+ return Element._returnOffset(valueL, valueT);
+};
+
ToolTip = Class.create();
ToolTip.prototype = {
@@ -432,8 +453,8 @@
this.toolTip.style.top = "0px";
this.toolTip.style.left = "0px";
- var offsets = Position.cumulativeOffset(this.toolTip);
-
+ var offsets = Richfaces.ToolTip.cumulativeOffset(this.toolTip);
+
this.toolTip.style.visibility = _visibility;
this.toolTip.style.display = _display;
@@ -459,13 +480,13 @@
coords.x += this.scrollDelta[0];
coords.y += this.scrollDelta[1];
}
+
Element.setStyle(this.toolTip, {"left": coords.x + "px",
"top": coords.y + "px"});
if(this.iframe)
{
this.iframe.style.top = (coords.y - this.toolTipBorderHeight) + 'px';
this.iframe.style.left = (coords.x - this.toolTipBorderWidth) + 'px';
}
-
this.eventCopy = A4J.AJAX.CloneObject(e, false);
},
Show replies by date