Author: nbelaevski
Date: 2007-03-20 16:53:01 -0400 (Tue, 20 Mar 2007)
New Revision: 105
Modified:
trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
trunk/richfaces/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
Log:
ContainerDiv positioning changed to "absolute" to ignore text-alignment style
settings. Calculations updated.
Modified:
trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
===================================================================
---
trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-03-20
20:29:11 UTC (rev 104)
+++
trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-03-20
20:53:01 UTC (rev 105)
@@ -342,19 +342,16 @@
if (this.div.style.position == "absolute")
{
- //IE workaround implemented here - sometimes IE uses client (0,0) as left top corner
of window, sometimes (2,2)
- //this behaviour differs between 6-th and 7-th version in the same mode, so we add
extra pixels to width & height
- //and then move DIV to left and top to prevent scroll bars as DIV is larger than
client area
- var we = "getSizeElement().clientWidth + /**/ getSizeElement().clientLeft +
/**/\"px\"";
- var he = "getSizeElement().clientHeight + /**/ getSizeElement().clientTop +
/**/\"px\"";
+ var we = "getSizeElement().clientWidth + \"px\"";
+ var he = "getSizeElement().clientHeight + \"px\"";
this.div.style.setExpression("width", we);
this.div.style.setExpression("height", he);
this.cursorDiv.style.setExpression("width", we);
this.cursorDiv.style.setExpression("height", he);
- var le = "-Position.cumulativeOffset(this.parentNode)[0] +
getSizeElement().scrollLeft /* + getSizeElement().clientLeft -
getSizeElement().clientLeft*/ + \"px\"";
- var te = "-Position.cumulativeOffset(this.parentNode)[1] +
getSizeElement().scrollTop /* + getSizeElement().clientTop - getSizeElement().clientTop*/
+ \"px\"";
+ var le = "-Position.cumulativeOffset(this.parentNode)[0] +
getSizeElement().scrollLeft + \"px\"";
+ var te = "-Position.cumulativeOffset(this.parentNode)[1] +
getSizeElement().scrollTop + \"px\"";
this.div.style.setExpression("left", le);
this.div.style.setExpression("top", te);
@@ -363,8 +360,8 @@
this.cursorDiv.style.setExpression("top", te);
- var leftExpr = "(this.mpLeft || 0) +
-Position.cumulativeOffset(this.parentNode)[0] + getSizeElement().scrollLeft +
getSizeElement().clientLeft + \"px\"";
- var topExpr = "(this.mpTop || 0) + -Position.cumulativeOffset(this.parentNode)[1]
+ getSizeElement().scrollTop + getSizeElement().clientTop + \"px\"";
+ var leftExpr = "(this.mpLeft || 0) +
-Position.cumulativeOffset(this.parentNode)[0] + getSizeElement().scrollLeft +
\"px\"";
+ var topExpr = "(this.mpTop || 0) + -Position.cumulativeOffset(this.parentNode)[1]
+ getSizeElement().scrollTop + \"px\"";
this.cdiv.style.setExpression("left", leftExpr);
this.cdiv.style.setExpression("top", topExpr);
Modified:
trunk/richfaces/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
===================================================================
---
trunk/richfaces/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2007-03-20
20:29:11 UTC (rev 104)
+++
trunk/richfaces/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2007-03-20
20:53:01 UTC (rev 105)
@@ -32,7 +32,7 @@
<f:call name="checkOptions" />
<div id="#{clientId}Container"
- style="position: relative; display: none; z-index: #{component.zindex};"
+ style="position: absolute; display: none; z-index: #{component.zindex};"
class="rich-modalpanel"
x:passThruWithExclusions="id,style,class"