[richfaces-svn-commits] JBoss Rich Faces SVN: r13448 - in trunk: samples/themes/src/main/templates/org/richfaces and 1 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Wed Apr 8 20:26:42 EDT 2009


Author: alexsmirnov
Date: 2009-04-08 20:26:42 -0400 (Wed, 08 Apr 2009)
New Revision: 13448

Modified:
   trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/theme2.xcss
   trunk/samples/themes/src/main/templates/org/richfaces/theme2.jspx
   trunk/ui/layout/src/main/java/org/richfaces/renderkit/AbstractLayoutRenderer.java
Log:
Scinnable theme2

Modified: trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/theme2.xcss
===================================================================
--- trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/theme2.xcss	2009-04-08 23:32:52 UTC (rev 13447)
+++ trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/theme2.xcss	2009-04-09 00:26:42 UTC (rev 13448)
@@ -3,25 +3,75 @@
 <f:template xmlns:f='http:/jsf.exadel.com/template'
    xmlns:u='http:/jsf.exadel.com/template/util'
    xmlns="http://www.w3.org/1999/xhtml">
+	<u:selector name="body">
+		<u:style name="background" skin="generalBackgroundColor"/>
+		<u:style name="margin" value="0px"/>
+	</u:selector>
 
+	<u:selector name=".header_bg">
+		<u:style name="background-image">
+		    <!-- images/bg_header.png -->
+			<f:resource f:key="org.richfaces.renderkit.html.images.PageContentGradient"/>
+		</u:style>
+		<u:style name="border-bottom" value="1px solid" />
+		<u:style name="border-bottom-color" skin="generalBackgroundColor" />
+		<u:style name="background-color" skin="headerBackgroundColor"/>
+		<u:style name="background-repeat" value="repeat-x"/>
+		<u:style name="background-position" value="top left"/>
+	</u:selector>
+
+	<u:selector name=".footer_bg">
+		<u:style name="background-image">
+		    <!-- images/bg_footer.png -->
+			<f:resource f:key="org.richfaces.renderkit.html.images.PageContentGradient"/>
+		</u:style>
+		<u:style name="border-top" value="1px solid" />
+		<u:style name="border-top-color" skin="generalBackgroundColor" />
+		<u:style name="background-color" skin="panelBorderColor"/>
+		<u:style name="background-repeat" value="repeat-x"/>
+		<u:style name="background-position" value="top left"/>
+	</u:selector>
+
+	<u:selector name=".menu_col">
+		<u:style name="background" skin="generalBackgroundColor"/>
+		<u:style name="vertical-align" value="top"/>
+		<u:style name="border-top" value="2px solid" />
+		<u:style name="border-top-color" skin="panelBorderColor" />
+		<u:style name="border-right" value="2px solid" />
+		<u:style name="border-right-color" skin="panelBorderColor" />
+		<u:style name="border-bottom" value="2px solid" />
+		<u:style name="border-bottom-color" skin="panelBorderColor" />
+	</u:selector>
+
+	<u:selector name=".content_col">
+		<u:style name="background" skin="generalBackgroundColor"/>
+		<u:style name="vertical-align" value="top"/>
+		<u:style name="width" value="100%"/>
+		<u:style name="border-top" value="2px solid" />
+		<u:style name="border-top-color" skin="panelBorderColor" />
+		<u:style name="border-bottom" value="2px solid" />
+		<u:style name="border-bottom-color" skin="panelBorderColor" />
+	</u:selector>
+	<u:selector name="*.menu_col, *.content_col, *.footer_bg">
+			<u:style name="font-family" skin="generalFamilyFont" />
+			<u:style name="color" skin="generalTextColor" />
+			<u:style name="font-size" skin="generalSizeFont" />	
+	</u:selector>
+	<u:selector name="*.header_content">
+			<u:style name="font-family" skin="headerFamilyFont" />
+			<u:style name="color" skin="headerTextColor" />
+			<u:style name="font-size" skin="headerSizeFont" />	
+	</u:selector>
 	<f:verbatim>
 		<![CDATA[
 .menu_width{width : 300px;}
 
-body {
-	margin : 0px; 
-	background : #f1f1f1;  /*generalBackgroundColor*/
-}
 
 .page_size {
 	width : 100%; 
 	height : 100%;
 }
 
-.header_bg {
-	background : url(images/bg_header.png) top left repeat-x #005000; /*headerBackgroundColor*/
-	border-bottom : 1px solid #f1f1f1;  /*generalBackgroundColor*/
-}
 
 .header_content {
 	margin : 0px 0px 0px 0px; 
@@ -30,41 +80,7 @@
 
 .spacer{font-size : 1px;}
 
-.menu_col {
-	border-right : 2px solid #C0C0C0;  /*panelBorderColor*/
-	border-top : 2px solid #C0C0C0;  /*panelBorderColor*/
-	border-bottom : 2px solid #C0C0C0;  /*panelBorderColor*/
-	vertical-align : top; 
-	background : #f1f1f1;  /*generalBackgroundColor*/
-}
 
-.content_col {
-	border-top : 2px solid #C0C0C0;  /*panelBorderColor*/
-	border-bottom : 2px solid #C0C0C0;  /*panelBorderColor*/
-	vertical-align : top; 
-	width : 100%; 
-	background : #f1f1f1;  /*generalBackgroundColor*/
-}
-
-*.menu_col, *.content_col, *.footer_bg {
-	color : #000000; /*generalTextColor*/
-	font-size : 11px; /*generalSizeFont*/
-	font-family : Arial, Verdana, sans-serif ; /*generalFamilyFont*/
-	
-}
-
-*.header_content {
-	color : #FFFFFF; /*headerTextColor*/
-	font-size : 12px; /*headerSizeFont*/
-	font-family : Arial, Verdana, sans-serif ; /*headerFamilyFont*/
-	
-}
-
-.footer_bg {
-	border-top : 1px solid #f1f1f1;  /*generalBackgroundColor*/
-	background : url(images/bg_footer.png) top left  repeat-x #c0c0c0;  /*panelBorderColor*/
-}
-
 .footer_bg_content {
 	margin : 0px 0px 0px 0px; 
 	height : 45px; 

Modified: trunk/samples/themes/src/main/templates/org/richfaces/theme2.jspx
===================================================================
--- trunk/samples/themes/src/main/templates/org/richfaces/theme2.jspx	2009-04-08 23:32:52 UTC (rev 13447)
+++ trunk/samples/themes/src/main/templates/org/richfaces/theme2.jspx	2009-04-09 00:26:42 UTC (rev 13448)
@@ -19,11 +19,12 @@
 		   <title>#{component.attributes['pageTitle']}</title>
 		   <f:call name="themeStyle"/>
 		   <f:call name="themeScript"/>
+		   <f:call name="pageStyle"/>		   
 		   <u:insertFacet name="pageHeader"/>
 
 </head>
 <body  x:passThruWithExclusions="value,name,type,id">
-			<table border="0" cellpadding="0" cellspacing="0" class="page_size">
+			<table border="0" cellpadding="0" cellspacing="0" class="rich-page">
 				<tr>
 					<td class="header_bg">
 							<div class="header_content">
@@ -38,7 +39,7 @@
 						<table cellpadding="0" cellspacing="0" border="0"  width="100%" height="100%">
 							<tr>
 								<td class="menu_col">
-									<div class="menu_width spacer"></div>
+									<div class="menu_width spacer" style="width:#{component.attributes['sidebarWidth']}"></div>
 <!-- begin menu -->
 		         <u:insertFacet name="sidebar"/>
 <!-- end meny -->

Modified: trunk/ui/layout/src/main/java/org/richfaces/renderkit/AbstractLayoutRenderer.java
===================================================================
--- trunk/ui/layout/src/main/java/org/richfaces/renderkit/AbstractLayoutRenderer.java	2009-04-08 23:32:52 UTC (rev 13447)
+++ trunk/ui/layout/src/main/java/org/richfaces/renderkit/AbstractLayoutRenderer.java	2009-04-09 00:26:42 UTC (rev 13448)
@@ -170,6 +170,6 @@
 	}
 
 	private boolean isEmpty(String leftWidth) {
-		return null == leftWidth || leftWidth.length() >0;
+		return null == leftWidth || leftWidth.length() == 0;
 	}
 }




More information about the richfaces-svn-commits mailing list