Author: akushunin
Date: 2007-11-21 08:54:42 -0500 (Wed, 21 Nov 2007)
New Revision: 4135
Modified:
trunk/ui/calendar/src/main/config/component/calendar.xml
trunk/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx
Log:
RF-1391
Modified: trunk/ui/calendar/src/main/config/component/calendar.xml
===================================================================
--- trunk/ui/calendar/src/main/config/component/calendar.xml 2007-11-21 13:35:25 UTC (rev
4134)
+++ trunk/ui/calendar/src/main/config/component/calendar.xml 2007-11-21 13:54:42 UTC (rev
4135)
@@ -492,8 +492,39 @@
<description>
Should be binded to some JS function that returns day state.
</description>
- </property>
-
+ </property>
+ <property>
+ <name>showWeeksDayBar</name>
+ <classname>boolean</classname>
+ <description>
+ If false this bar should not be shown
+ </description>
+ <defaultvalue>true</defaultvalue>
+ </property>
+ <property>
+ <name>showWeeksBar</name>
+ <classname>boolean</classname>
+ <description>
+ If false this bar should not be shown
+ </description>
+ <defaultvalue>true</defaultvalue>
+ </property>
+ <property>
+ <name>showScrollerBar</name>
+ <classname>boolean</classname>
+ <description>
+ If false this bar should not be shown
+ </description>
+ <defaultvalue>true</defaultvalue>
+ </property>
+ <property>
+ <name>showToday</name>
+ <classname>boolean</classname>
+ <description>
+ If false this bar should not be shown
+ </description>
+ <defaultvalue>true</defaultvalue>
+ </property>
</component>
&listeners;
</components>
Modified: trunk/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java
===================================================================
--- trunk/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java 2007-11-21
13:35:25 UTC (rev 4134)
+++ trunk/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java 2007-11-21
13:54:42 UTC (rev 4135)
@@ -178,7 +178,23 @@
public abstract String getCellWidth();
public abstract void setCellWidth(String cellWidth);
-
+
+ public abstract boolean isShowWeeksDaysBar();
+
+ public abstract void setShowWeeksDaysBar(boolean showWeekDaysBar);
+
+ public abstract boolean isShowWeeksBar();
+
+ public abstract void setShowWeeksBar(boolean showWeeksBar);
+
+ public abstract boolean isShowScrollerBar();
+
+ public abstract void setShowScrollerBar(boolean showScrollerBar);
+
+ public abstract boolean isShowToday();
+
+ public abstract void setShowToday(boolean showToday);
+
// TODO onclick add users onclick
// currentDate processing -------------------------------------------------
Modified:
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
---
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-11-21
13:35:25 UTC (rev 4134)
+++
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-11-21
13:54:42 UTC (rev 4135)
@@ -432,8 +432,8 @@
this.id = id;
this.params = parameters;
- if (!this.params.showWeekDaysBar) this.params.showWeekDaysBar = true;
- if (!this.params.showWeeksBar) this.params.showWeeksBar = true;
+ if (this.params.showWeekDaysBar==undefined) this.params.showWeekDaysBar = true;
+ if (this.params.showWeeksBar==undefined) this.params.showWeeksBar = true;
if (!this.params.datePattern) this.params.datePattern = "MMM d, y";
// markups initialization
Modified: trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx
===================================================================
--- trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx 2007-11-21
13:35:25 UTC (rev 4134)
+++ trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx 2007-11-21
13:54:42 UTC (rev 4135)
@@ -149,10 +149,15 @@
horizontalOffset: #{component.horizontalOffset},
style:'z-index: #{component.attributes["zindex"]};
#{component.attributes["style"]}',
firstWeekDay: #{this:getFirstWeekDay(context, component)},
- minDaysInFirstWeek: #{this:getMinDaysInFirstWeek(context, component)}
+ minDaysInFirstWeek: #{this:getMinDaysInFirstWeek(context, component)},
+ showToday:#{component.attributes['showToday']},
+ showScrollerBar:#{component.attributes['showScrollerBar']},
+ showWeeksBar:#{component.attributes['showWeeksBar']},
+ showWeeksDayBar:#{component.attributes['showWeeksDayBar']}
+
<f:call name="writeClass"/>
<f:call name="writeDayCellClass"/>
<f:call name="writeDayStyleClass"/>
Show replies by date