Author: nbelaevski
Date: 2007-03-16 16:41:55 -0400 (Fri, 16 Mar 2007)
New Revision: 91
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:
IFrame blocking SELECTs now is created dynamically only if needed - providing fix for
http://jira.jboss.com/jira/browse/RF-13
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-16
20:10:14 UTC (rev 90)
+++
trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-03-16
20:41:55 UTC (rev 91)
@@ -105,13 +105,10 @@
this.div = $(id + "Div");
this.cursorDiv = $(id + "CursorDiv");
- this.iframe = $(id + "IFrame");
this.cdiv = $(id + "CDiv");
this.context = new ModalPanel.Context(this);
- this.iframe.onload = this.initIframe.bind(this.iframe);
-
this.borders = new Array();
if (this.options.resizeable) {
@@ -148,8 +145,6 @@
this.cursorDiv.style.width = "1px";
this.cursorDiv.style.height = "1px";
-
- //this.iframe.style.position = "absolute";
this.cdiv.style.position = "absolute";
this.cdiv.mpUseExpr = true;
@@ -259,6 +254,19 @@
this.floatedToBody = true;
}
+ if (ModalPanel.disableSelects && !this.iframe) {
+ new Insertion.Top(this.cdiv,
+ "<iframe src=\"javascript:''\" frameborder=\"0\"
scrolling=\"no\" id=\"" + this.markerId.id + "IFrame\""
+
+ "style=\"position: absolute; width: 100%; height: 100%; background-color:
white; overflow-y: hidden; z-index: 1;\">" +
+ "</iframe>");
+
+ this.iframe = $(this.markerId.id + "IFrame");
+
+ //alert("IFrame:" + this.iframe + "created!");
+
+ this.iframe.onload = this.initIframe.bind(this.iframe);
+ }
+
var options = {};
if (!this.cdiv.mpSet) {
@@ -351,9 +359,6 @@
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\"";
- //this.iframe.style.setExpression("left", leftExpr);
- //this.iframe.style.setExpression("top", topExpr);
-
this.cdiv.style.setExpression("left", leftExpr);
this.cdiv.style.setExpression("top", topExpr);
@@ -412,9 +417,6 @@
this.cursorDiv.style.removeExpression("left");
this.cursorDiv.style.removeExpression("top");
- //this.iframe.style.removeExpression("left");
- //this.iframe.style.removeExpression("top");
-
this.cdiv.style.removeExpression("left");
this.cdiv.style.removeExpression("top");
}
@@ -460,7 +462,6 @@
newPos += diff.deltaX;
this.cdiv.mpLeft = newPos;
- //this.iframe.mpLeft = newPos;
} else {
newPos = Richfaces.getComputedStyleSize(this.cdiv, "left");
newPos += diff.deltaX;
@@ -501,7 +502,6 @@
newPos += diff.deltaY;
this.cdiv.mpTop = newPos;
- //this.iframe.mpTop = newPos;
} else {
newPos = Richfaces.getComputedStyleSize(this.cdiv, "top");
newPos += diff.deltaY;
@@ -510,7 +510,6 @@
}
Element.setStyle(this.cdiv, cssHash);
- //Element.setStyle(this.iframe, cssHash);
var w = this.cdiv.offsetWidth;
var h = this.cdiv.offsetHeight;
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-16
20:10:14 UTC (rev 90)
+++
trunk/richfaces/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2007-03-16
20:41:55 UTC (rev 91)
@@ -43,10 +43,6 @@
<div id="#{clientId}CDiv" class="dr-mpnl-panel rich-mpnl_panel"
style="z-index: 2;">
- <iframe frameborder="0" scrolling="no"
id="#{clientId}IFrame"
- style="position: absolute; width: 100%; height: 100%; background-color: white;
overflow-y: hidden; z-index: 1;">
- </iframe>
-
<jsp:scriptlet>
<![CDATA[
if (component.isResizeable()) {