Author: sergeyhalipov
Date: 2007-03-13 14:35:27 -0400 (Tue, 13 Mar 2007)
New Revision: 57
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:
Fix wrong position of first appearing of modal panel in Opera.
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-13
18:22:23 UTC (rev 56)
+++
trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-03-13
18:35:27 UTC (rev 57)
@@ -227,7 +227,11 @@
_left = parseInt(options.left, 10);
} else {
var cw = getSizeElement().clientWidth;
- _left = (cw - Richfaces.getComputedStyleSize(this.cdiv, "width")) / 2;
+ if (RichFaces.navigatorType() == "OPERA")
+ _left = (cw - this.cdiv.style.width.replace("px", "")) / 2;
+ else
+ _left = (cw - Richfaces.getComputedStyleSize(this.cdiv, "width")) / 2;
+
}
this.setLeft(_left);
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-13
18:22:23 UTC (rev 56)
+++
trunk/richfaces/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2007-03-13
18:35:27 UTC (rev 57)
@@ -19,7 +19,8 @@
new org.ajax4jsf.framework.resource.PrototypeScript(),
/org/richfaces/renderkit/html/scripts/utils.js,
/org/richfaces/renderkit/html/scripts/modalPanel.js,
- /org/richfaces/renderkit/html/scripts/modalPanelBorders.js
+ /org/richfaces/renderkit/html/scripts/modalPanelBorders.js,
+ /org/richfaces/renderkit/html/scripts/browser_info.js
</h:scripts>
<f:clientid var="clientId"/>