From richfaces-svn-commits at lists.jboss.org Wed Oct 31 10:12:04 2007 Content-Type: multipart/mixed; boundary="===============1921550977620708196==" MIME-Version: 1.0 From: richfaces-svn-commits at lists.jboss.org To: richfaces-svn-commits at lists.jboss.org Subject: [richfaces-svn-commits] JBoss Rich Faces SVN: r3634 - in trunk/ui/calendar/src/main: templates/org/richfaces and 1 other directory. Date: Wed, 31 Oct 2007 10:08:03 -0400 Message-ID: --===============1921550977620708196== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: akushunin Date: 2007-10-31 10:08:03 -0400 (Wed, 31 Oct 2007) New Revision: 3634 Modified: trunk/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRenderer= Base.java trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx Log: Calendar refactoring Modified: trunk/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarR= endererBase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendere= rBase.java 2007-10-31 13:29:40 UTC (rev 3633) +++ trunk/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendere= rBase.java 2007-10-31 14:08:03 UTC (rev 3634) @@ -204,7 +204,7 @@ } } = - public void writeDayCellClass(FacesContext context, UIComponent component) + public void dayCellClass(FacesContext context, UIComponent component) throws IOException { // if cellWidth/Height is set send dayCellClass to script Integer cellwidth =3D (Integer) component.getAttributes() @@ -212,19 +212,23 @@ Integer cellheight =3D (Integer) component.getAttributes().get( "cellHeight"); ResponseWriter writer =3D context.getResponseWriter(); + String clientId =3D component.getClientId(context); + String divStyle=3D"." + clientId + "DayCell{"; + if (cellwidth !=3D null && cellwidth.intValue() > 0){ + divStyle =3D divStyle + "width:"+ cellwidth.toString() + "px;"; = + } = + if(cellheight !=3D null + && cellheight.intValue() > 0){ + divStyle =3D divStyle +"height:"+ cellheight.toString() + "px;"; + } + = if (cellwidth !=3D null && cellwidth.intValue() > 0 || cellheight !=3D n= ull && cellheight.intValue() > 0) { - - String clientId =3D component.getClientId(context); - = - String divStyle =3D "." + clientId + "DayCell{width: " - + cellwidth.toString() + "px; height:" - + cellheight.toString() + "px; } =