[richfaces-svn-commits] JBoss Rich Faces SVN: r5006 - in trunk/ui/modal-panel/src/main: templates/org/richfaces and 1 other directory.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Wed Dec 26 08:53:48 EST 2007


Author: sergeyhalipov
Date: 2007-12-26 08:53:48 -0500 (Wed, 26 Dec 2007)
New Revision: 5006

Modified:
   trunk/ui/modal-panel/src/main/java/org/richfaces/renderkit/ModalPanelRendererBase.java
   trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
Log:
http://jira.jboss.com/jira/browse/RF-1654

Modified: trunk/ui/modal-panel/src/main/java/org/richfaces/renderkit/ModalPanelRendererBase.java
===================================================================
--- trunk/ui/modal-panel/src/main/java/org/richfaces/renderkit/ModalPanelRendererBase.java	2007-12-26 06:03:57 UTC (rev 5005)
+++ trunk/ui/modal-panel/src/main/java/org/richfaces/renderkit/ModalPanelRendererBase.java	2007-12-26 13:53:48 UTC (rev 5006)
@@ -160,4 +160,27 @@
 	public void writeEventHandlerFunction(FacesContext context, UIComponent component, String eventName) throws IOException{
 		RendererUtils.writeEventHandlerFunction(context, component, eventName);
 	}
+	
+	public String getContentStyle(FacesContext context, UIModalPanel panel) {
+		StringBuffer result = new StringBuffer();
+		
+		result.append("overflow: hidden; ");
+		
+		String style = (String)panel.getAttributes().get("style");
+		if (null != style && !"".equals(style)) {
+			result.append(style).
+				append(" ");
+			
+		}
+		int minHeight = panel.getMinHeight();
+		int minWidth = panel.getMinWidth();
+		if (minWidth > -1) {
+			result.append("min-width: " + minWidth + "; ");
+		}
+		if (minHeight > -1) {
+			result.append("min-height: " + minHeight + "; ");
+		}
+		
+		return result.toString();
+	}
 }

Modified: trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
===================================================================
--- trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx	2007-12-26 06:03:57 UTC (rev 5005)
+++ trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx	2007-12-26 13:53:48 UTC (rev 5006)
@@ -73,7 +73,7 @@
 					style="#{component.shadowStyle}" >
 			   	</div>
 				<table id="#{clientId}ContentTable" cellpadding="0" cellspacing="0" border="0" style="position: absolute; z-index: 2;"><tbody><tr><td class="dr-mpnl-pnl">
-				<div id="#{clientId}ContentDiv" style="overflow: hidden; #{component.attributes['style']}" class="rich-mp-content">
+				<div id="#{clientId}ContentDiv" style="#{this:getContentStyle(context, component)}" class="rich-mp-content">
 						
 					<a href="#" class="dr-mpnl-pnl-a" id="#{clientId}FirstHref" >_</a>
 			        <table style="height: 100%; width: 100%;" border="0" cellpadding="0" cellspacing="0">




More information about the richfaces-svn-commits mailing list