You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2008/08/06 14:47:25 UTC

svn commit: r683251 - /myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PopupRenderer.java

Author: bommel
Date: Wed Aug  6 05:47:24 2008
New Revision: 683251

URL: http://svn.apache.org/viewvc?rev=683251&view=rev
Log:
(TOBAGO-692) Support for modal css style in PopupRenderer

Modified:
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PopupRenderer.java

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?rev=683251&r1=683250&r2=683251&view=diff
==============================================================================
--- 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 Wed Aug  6 05:47:24 2008
@@ -37,6 +37,7 @@
 import org.apache.myfaces.tobago.renderkit.util.RenderUtil;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
+import org.apache.myfaces.tobago.renderkit.html.StyleClasses;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtil;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 import org.apache.myfaces.tobago.TobagoConstants;
@@ -141,7 +142,13 @@
     }
     writer.startElement(HtmlConstants.DIV, component);
     writer.writeIdAttribute(contentDivId);
-    writer.writeClassAttribute("tobago-popup-content tobago-popup-none");
+    StyleClasses styleClasses = new StyleClasses();
+    styleClasses.addClass("popup", "content");
+    styleClasses.addClass("popup", "none");
+    if (component.isModal()) {
+      styleClasses.addClass("popup", "modal");
+    }
+    writer.writeClassAttribute(styleClasses);
 
     writer.writeAttribute(HtmlAttributes.STYLE, contentStyle.toString(), false);
   }