[richfaces-svn-commits] JBoss Rich Faces SVN: r5145 - in branches/3.1.x/ui/modal-panel/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Fri Jan 4 12:10:17 EST 2008


Author: sergeyhalipov
Date: 2008-01-04 12:10:17 -0500 (Fri, 04 Jan 2008)
New Revision: 5145

Modified:
   branches/3.1.x/ui/modal-panel/src/main/java/org/richfaces/renderkit/ModalPanelRendererBase.java
   branches/3.1.x/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
   branches/3.1.x/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
Log:
http://jira.jboss.com/jira/browse/RF-1811

Modified: branches/3.1.x/ui/modal-panel/src/main/java/org/richfaces/renderkit/ModalPanelRendererBase.java
===================================================================
--- branches/3.1.x/ui/modal-panel/src/main/java/org/richfaces/renderkit/ModalPanelRendererBase.java	2008-01-04 16:25:25 UTC (rev 5144)
+++ branches/3.1.x/ui/modal-panel/src/main/java/org/richfaces/renderkit/ModalPanelRendererBase.java	2008-01-04 17:10:17 UTC (rev 5145)
@@ -151,4 +151,27 @@
 		}
 		return result.toString();
 	}
+	
+	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: branches/3.1.x/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
===================================================================
--- branches/3.1.x/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js	2008-01-04 16:25:25 UTC (rev 5144)
+++ branches/3.1.x/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js	2008-01-04 17:10:17 UTC (rev 5145)
@@ -70,7 +70,7 @@
 ModalPanel.Context = Class.create();
 ModalPanel.Context.prototype = {
 	initialize: function(modalPanel) {
-		this.cdiv = modalPanel.contentDiv;
+		this.cdiv = modalPanel.contentTable;
 		this.isPositionFixed = Richfaces.getComputedStyle(this.cdiv, "position") == "fixed";
 	},
 
@@ -121,6 +121,7 @@
 		this.cursorDiv = id + "CursorDiv";
 		this.cdiv = id + "CDiv";
 		this.contentDiv = id + "ContentDiv";
+		this.contentTable = id + "ContentTable";
 		this.shadowDiv = id + "ShadowDiv";
 
 		this.context = new ModalPanel.Context(this);

Modified: branches/3.1.x/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
===================================================================
--- branches/3.1.x/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx	2008-01-04 16:25:25 UTC (rev 5144)
+++ branches/3.1.x/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx	2008-01-04 17:10:17 UTC (rev 5145)
@@ -17,10 +17,10 @@
 	</h:styles>
 	<h:scripts>
 		new org.ajax4jsf.javascript.PrototypeScript(),
-		/org/richfaces/renderkit/html/scripts/utils.js,
+		/org/richfaces/renderkit/html/scripts/utils.js,
+		/org/richfaces/renderkit/html/scripts/browser_info.js,
 		/org/richfaces/renderkit/html/scripts/modalPanel.js,
-		/org/richfaces/renderkit/html/scripts/modalPanelBorders.js,
-		/org/richfaces/renderkit/html/scripts/browser_info.js
+		/org/richfaces/renderkit/html/scripts/modalPanelBorders.js
 	</h:scripts>
 
 	<f:clientid var="clientId"/>
@@ -42,7 +42,7 @@
 			<div class="dr-mpnl-mask-div rich-mpnl-mask-div" id="#{clientId}Div"
 				style="z-index: 1;"></div>
 			<div class="dr-mpnl-mask-div rich-mpnl-mask-div" id="#{clientId}CursorDiv"
-				style="filter: alpha(opacity=1); opacity: 0.01; z-index: -200"></div>
+				style="filter: alpha(opacity=1); z-index: -200"></div>
 
 			<div id="#{clientId}CDiv" class="dr-mpnl-panel rich-mpnl_panel" style="width: 1px; height: 1px; z-index: 2;">
 
@@ -72,9 +72,8 @@
 				<div id="#{clientId}ShadowDiv" class="dr-mpnl-shadow rich-mpnl-shadow"
 					style="#{component.shadowStyle}" >
 			   	</div>
-
-				<div style="position: absolute; overflow: hidden; z-index: 2; #{component.attributes['style']}"
-						class="dr-mpnl-pnl" id="#{clientId}ContentDiv">
+				<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="#{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">
@@ -113,6 +112,7 @@
 				        	</tr>
 			        </table>
 				</div>
+				</td></tr></tbody></table>
 			</div>
 
 			<script type="text/javascript">
@@ -131,10 +131,9 @@
 					top: "#{component.top}",
 
 					zindex: #{component.zindex},
-					
-					onshow: #{onshow},
+							
 					onhide: #{onhide},
-					
+													
 					keepVisualState: #{component.keepVisualState},
 					showWhenRendered: #{component.showWhenRendered},
 					selectBehavior: "#{component.tridentIVEngineSelectBehavior}",




More information about the richfaces-svn-commits mailing list