You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2006/10/31 12:15:12 UTC
svn commit: r469445 - in /myfaces/tobago/trunk/theme:
scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/
scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/
stand...
Author: weber
Date: Tue Oct 31 03:15:03 2006
New Revision: 469445
URL: http://svn.apache.org/viewvc?view=rev&rev=469445
Log:
working on TOBAGO-167 (Enable rendering popups by ajax request)
Modified:
myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PopupRenderer.java
myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css
myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PopupRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PopupRenderer.java?view=diff&rev=469445&r1=469444&r2=469445
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PopupRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PopupRenderer.java Tue Oct 31 03:15:03 2006
@@ -98,14 +98,14 @@
if (ClientProperties.getInstance(facesContext).getUserAgent().isMsie()) {
writer.startElement(HtmlConstants.IFRAME, component);
writer.writeIdAttribute(clientId + SUBCOMPONENT_SEP + HtmlConstants.IFRAME);
- writer.writeClassAttribute("tobago-popup-iframe");
+ writer.writeClassAttribute("tobago-popup-iframe tobago-popup-none");
writer.writeAttribute(HtmlAttributes.STYLE, contentStyle.toString(), null);
writer.writeAttribute(HtmlAttributes.SRC, "javascript:false;", null);
writer.endElement(HtmlConstants.IFRAME);
}
writer.startElement(HtmlConstants.DIV, component);
writer.writeIdAttribute(contentDivId);
- writer.writeClassAttribute("tobago-popup-content");
+ writer.writeClassAttribute("tobago-popup-content tobago-popup-none");
writer.writeAttribute(HtmlAttributes.STYLE, contentStyle.toString(), null);
Modified: myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css?view=diff&rev=469445&r1=469444&r2=469445
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css Tue Oct 31 03:15:03 2006
@@ -493,6 +493,9 @@
-moz-background-inline-policy: initial;
}
+.tobago-popup-none {
+ display: none;
+}
/* selectOneRadio ---------------------------------------------------------- */
Modified: myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js?view=diff&rev=469445&r1=469444&r2=469445
==============================================================================
--- myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js (original)
+++ myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js Tue Oct 31 03:15:03 2006
@@ -690,8 +690,13 @@
div.style.left = l;
// alert("1 set left to " + l);
} else {
- l = this.getBrowserInnerWidth() - div.clientWidth
- - Tobago.Config.get("Popup", "borderWidth");
+ var popupWidth = div.style.width;
+ if (popupWidth) {
+ popupWidth = popupWidth.replace(/\D/g, "");
+ } else {
+ popupWidth = div.clientWidth - Tobago.Config.get("Popup", "borderWidth");
+ }
+ l = this.getBrowserInnerWidth() - popupWidth;
div.style.left = l/2;
// alert("2 set left to " + l/2);
}
@@ -701,8 +706,14 @@
div.style.top = t;
// alert("1 set top to " + t);
} else {
- t = this.getBrowserInnerHeight() - div.clientHeight
- - Tobago.Config.get("Popup", "borderWidth");
+ var popupHeight = div.style.height;
+ if (popupHeight) {
+ popupHeight = popupHeight.replace(/\D/g, "");
+ } else {
+ popupHeight = div.clientHeight - Tobago.Config.get("Popup", "borderWidth");
+ }
+
+ t = this.getBrowserInnerHeight() - popupHeight;
div.style.top = t/2;
// alert("2 set top to " + t/2);
}
@@ -712,6 +723,11 @@
if (iframe) {
iframe.style.left = div.style.left;
iframe.style.top = div.style.top;
+ }
+
+ Tobago.removeCssClass(div, "tobago-popup-none");
+ if (iframe) {
+ Tobago.removeCssClass(iframe, "tobago-popup-none");
}
// } else {