Author: ppitonak(a)redhat.com
Date: 2010-11-04 13:20:47 -0400 (Thu, 04 Nov 2010)
New Revision: 19933
Added:
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichCalendarBean.properties
modules/tests/metamer/trunk/application/src/main/webapp/resources/images/heart.png
modules/tests/metamer/trunk/application/src/main/webapp/resources/images/star.png
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml
Log:
https://jira.jboss.org/browse/RF-9178
* added two images usable instead calendar's button
* calendar sample fixed
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java 2010-11-04
17:18:31 UTC (rev 19932)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java 2010-11-04
17:20:47 UTC (rev 19933)
@@ -58,10 +58,15 @@
attributes = Attributes.getUIComponentAttributes(UICalendar.class, getClass(),
false);
+ attributes.setAttribute("datePattern", "MMM d, yyyy HH:mm");
attributes.setAttribute("popup", true);
attributes.setAttribute("rendered", true);
+ attributes.setAttribute("showApplyButton", true);
+ attributes.setAttribute("showHeader", true);
attributes.setAttribute("showFooter", true);
attributes.setAttribute("showInput", true);
+ attributes.setAttribute("showWeeksBar", true);
+ attributes.setAttribute("showWeekDaysBar", true);
// TODO has to be tested in another way
attributes.remove("converter");
Added:
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichCalendarBean.properties
===================================================================
---
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichCalendarBean.properties
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichCalendarBean.properties 2010-11-04
17:20:47 UTC (rev 19933)
@@ -0,0 +1,35 @@
+attr.boundaryDatesMode.inactive=inactive
+attr.boundaryDatesMode.scroll=scroll
+attr.boundaryDatesMode.select=select
+attr.boundaryDatesMode.null=
+
+attr.buttonIcon.star=/resources/images/star.png
+attr.buttonIcon.heart=/resources/images/heart.png
+attr.buttonIcon.null=
+
+attr.buttonIconDisabled.star=/resources/images/star.png
+attr.buttonIconDisabled.heart=/resources/images/heart.png
+attr.buttonIconDisabled.null=
+
+attr.dayStyleClass.yellowTuesdays=yellowTuesdays
+attr.dayStyleClass.aquaWeekends=aquaWeekends
+attr.dayStyleClass.null=
+
+attr.direction.top-left=top-left
+attr.direction.top-right=top-right
+attr.direction.bottom-left=bottom-left
+attr.direction.bottom-right=bottom-right
+attr.direction.auto=auto
+attr.direction.null=
+
+attr.jointPoint.top-left=top-left
+attr.jointPoint.top-right=top-right
+attr.jointPoint.bottom-left=bottom-left
+attr.jointPoint.bottom-right=bottom-right
+attr.jointPoint.auto=auto
+attr.jointPoint.null=
+
+attr.todayControlMode.scroll=scroll
+attr.todayControlMode.select=select
+attr.todayControlMode.hidden=hidden
+attr.todayControlMode.null=
\ No newline at end of file
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml 2010-11-04
17:18:31 UTC (rev 19932)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml 2010-11-04
17:20:47 UTC (rev 19933)
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
-
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
-
xmlns:rich="http://richfaces.org/rich">
+<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
xmlns:rich="http://richfaces.org/rich">
<!--
JBoss, Home of Professional Open Source
@@ -34,8 +33,33 @@
<f:converter converterId="templatesListConverter" />
</f:viewParam>
</f:metadata>
+ <style type="text/css">
+ .yellowDay {
+ background: yellow;
+ }
+
+ .aquaDay {
+ background: aqua;
+ }
+
+ </style>
+
<script type="text/javascript">
- testedComponentId =
"#{rich:clientId('calendar')}";
+ function yellowTuesdays(day) {
+ if (day.date.getDay() == 2) {
+ return 'yellowDay';
+ }
+ return false;
+ }
+
+ function aquaWeekends(day) {
+ if (day.isWeekend) {
+ return 'aquaDay';
+ }
+ return false;
+ }
+
+ testedComponentId = "#{rich:clientId('calendar')}";
</script>
</ui:define>
@@ -43,71 +67,73 @@
</ui:define>
<ui:define name="component">
+ <div style="padding: 250px">
+ <!-- add attributes direction and jointPoint ASAP -->
+ <rich:calendar id="calendar"
+
boundaryDatesMode="#{richCalendarBean.attributes['boundaryDatesMode'].value}"
+
buttonClass="#{richCalendarBean.attributes['buttonClass'].value}"
+
buttonIcon="#{richCalendarBean.attributes['buttonIcon'].value}"
+
buttonIconDisabled="#{richCalendarBean.attributes['buttonIconDisabled'].value}"
+
buttonLabel="#{richCalendarBean.attributes['buttonLabel'].value}"
+
converterMessage="#{richCalendarBean.attributes['converterMessage'].value}"
+
currentDate="#{richCalendarBean.attributes['currentDate'].value}"
+
datePattern="#{richCalendarBean.attributes['datePattern'].value}"
+
dayEnabled="#{richCalendarBean.attributes['dayEnabled'].value}"
+
dayStyleClass="#{richCalendarBean.attributes['dayStyleClass'].value}"
+
defaultTime="#{richCalendarBean.attributes['defaultTime'].value}"
- <rich:calendar id="calendar"
-
boundaryDatesMode="#{richCalendarBean.attributes['boundaryDatesMode'].value}"
-
buttonClass="#{richCalendarBean.attributes['buttonClass'].value}"
-
buttonIcon="#{richCalendarBean.attributes['buttonIcon'].value}"
-
buttonIconDisabled="#{richCalendarBean.attributes['buttonIconDisabled'].value}"
-
buttonLabel="#{richCalendarBean.attributes['buttonLabel'].value}"
-
converterMessage="#{richCalendarBean.attributes['converterMessage'].value}"
-
currentDate="#{richCalendarBean.attributes['currentDate'].value}"
-
datePattern="#{richCalendarBean.attributes['datePattern'].value}"
-
dayEnabled="#{richCalendarBean.attributes['dayEnabled'].value}"
-
dayStyleClass="#{richCalendarBean.attributes['dayStyleClass'].value}"
-
defaultTime="#{richCalendarBean.attributes['defaultTime'].value}"
-
direction="#{richCalendarBean.attributes['direction'].value}"
-
disable="#{richCalendarBean.attributes['disable'].value}"
-
enableManualInput="#{richCalendarBean.attributes['enableManualInput'].value}"
-
firstWeekDay="#{richCalendarBean.attributes['firstWeekDay'].value}"
-
hidePopupOnScroll="#{richCalendarBean.attributes['hidePopupOnScroll'].value}"
-
horizontalOffset="#{richCalendarBean.attributes['horizontalOffset'].value}"
-
immediate="#{richCalendarBean.attributes['immediate'].value}"
-
inputClass="#{richCalendarBean.attributes['inputClass'].value}"
-
inputSize="#{richCalendarBean.attributes['inputSize'].value}"
-
inputStyle="#{richCalendarBean.attributes['inputStyle'].value}"
-
jointPoint="#{richCalendarBean.attributes['jointPoint'].value}"
-
locale="#{richCalendarBean.attributes['locale'].value}"
-
minDaysInFirstWeek="#{richCalendarBean.attributes['minDaysInFirstWeek'].value}"
-
monthLabels="#{richCalendarBean.attributes['monthLabels'].value}"
-
monthLabelsShort="#{richCalendarBean.attributes['monthLabelsShort'].value}"
-
oninputblur="#{richCalendarBean.attributes['oninputblur'].value}"
-
oninputchange="#{richCalendarBean.attributes['oninputchange'].value}"
-
oninputclick="#{richCalendarBean.attributes['oninputclick'].value}"
-
oninputdblclick="#{richCalendarBean.attributes['oninputdblclick'].value}"
-
oninputfocus="#{richCalendarBean.attributes['oninputfocus'].value}"
-
oninputkeydown="#{richCalendarBean.attributes['oninputkeydown'].value}"
-
oninputkeypress="#{richCalendarBean.attributes['oninputkeypress'].value}"
-
oninputkeyup="#{richCalendarBean.attributes['oninputkeyup'].value}"
-
oninputmousedown="#{richCalendarBean.attributes['oninputmousedown'].value}"
-
oninputmousemove="#{richCalendarBean.attributes['oninputmousemove'].value}"
-
oninputmouseout="#{richCalendarBean.attributes['oninputmouseout'].value}"
-
oninputmouseover="#{richCalendarBean.attributes['oninputmouseover'].value}"
-
oninputmouseup="#{richCalendarBean.attributes['oninputmouseup'].value}"
-
oninputselect="#{richCalendarBean.attributes['oninputselect'].value}"
-
popup="#{richCalendarBean.attributes['popup'].value}"
-
rendered="#{richCalendarBean.attributes['rendered'].value}"
-
required="#{richCalendarBean.attributes['required'].value}"
-
requiredMessage="#{richCalendarBean.attributes['requiredMessage'].value}"
-
resetTimeOnDateSelect="#{richCalendarBean.attributes['resetTimeOnDateSelect'].value}"
-
showApplyButton="#{richCalendarBean.attributes['showApplyButton'].value}"
-
showFooter="#{richCalendarBean.attributes['showFooter'].value}"
-
showHeader="#{richCalendarBean.attributes['showHeader'].value}"
-
showInput="#{richCalendarBean.attributes['showInput'].value}"
-
showWeekDaysBar="#{richCalendarBean.attributes['showWeekDaysBar'].value}"
-
showWeeksBar="#{richCalendarBean.attributes['showWeeksBar'].value}"
-
style="#{richCalendarBean.attributes['style'].value}"
-
tabindex="#{richCalendarBean.attributes['tabindex'].value}"
-
timeZone="#{richCalendarBean.attributes['timeZone'].value}"
-
todayControlMode="#{richCalendarBean.attributes['todayControlMode'].value}"
-
validatorMessage="#{richCalendarBean.attributes['validatorMessage'].value}"
-
value="#{richCalendarBean.attributes['value'].value}"
-
verticalOffset="#{richCalendarBean.attributes['verticalOffset'].value}"
-
weekDayLabels="#{richCalendarBean.attributes['weekDayLabels'].value}"
-
weekDayLabelsShort="#{richCalendarBean.attributes['weekDayLabelsShort'].value}"
-
zindex="#{richCalendarBean.attributes['zindex'].value}"
- />
+
disable="#{richCalendarBean.attributes['disable'].value}"
+
enableManualInput="#{richCalendarBean.attributes['enableManualInput'].value}"
+
firstWeekDay="#{richCalendarBean.attributes['firstWeekDay'].value}"
+
hidePopupOnScroll="#{richCalendarBean.attributes['hidePopupOnScroll'].value}"
+
horizontalOffset="#{richCalendarBean.attributes['horizontalOffset'].value}"
+
immediate="#{richCalendarBean.attributes['immediate'].value}"
+
inputClass="#{richCalendarBean.attributes['inputClass'].value}"
+
inputSize="#{richCalendarBean.attributes['inputSize'].value}"
+
inputStyle="#{richCalendarBean.attributes['inputStyle'].value}"
+
locale="#{richCalendarBean.attributes['locale'].value}"
+
minDaysInFirstWeek="#{richCalendarBean.attributes['minDaysInFirstWeek'].value}"
+
monthLabels="#{richCalendarBean.attributes['monthLabels'].value}"
+
monthLabelsShort="#{richCalendarBean.attributes['monthLabelsShort'].value}"
+
oninputblur="#{richCalendarBean.attributes['oninputblur'].value}"
+
oninputchange="#{richCalendarBean.attributes['oninputchange'].value}"
+
oninputclick="#{richCalendarBean.attributes['oninputclick'].value}"
+
oninputdblclick="#{richCalendarBean.attributes['oninputdblclick'].value}"
+
oninputfocus="#{richCalendarBean.attributes['oninputfocus'].value}"
+
oninputkeydown="#{richCalendarBean.attributes['oninputkeydown'].value}"
+
oninputkeypress="#{richCalendarBean.attributes['oninputkeypress'].value}"
+
oninputkeyup="#{richCalendarBean.attributes['oninputkeyup'].value}"
+
oninputmousedown="#{richCalendarBean.attributes['oninputmousedown'].value}"
+
oninputmousemove="#{richCalendarBean.attributes['oninputmousemove'].value}"
+
oninputmouseout="#{richCalendarBean.attributes['oninputmouseout'].value}"
+
oninputmouseover="#{richCalendarBean.attributes['oninputmouseover'].value}"
+
oninputmouseup="#{richCalendarBean.attributes['oninputmouseup'].value}"
+
oninputselect="#{richCalendarBean.attributes['oninputselect'].value}"
+
popup="#{richCalendarBean.attributes['popup'].value}"
+
rendered="#{richCalendarBean.attributes['rendered'].value}"
+
required="#{richCalendarBean.attributes['required'].value}"
+
requiredMessage="#{richCalendarBean.attributes['requiredMessage'].value}"
+
resetTimeOnDateSelect="#{richCalendarBean.attributes['resetTimeOnDateSelect'].value}"
+
showApplyButton="#{richCalendarBean.attributes['showApplyButton'].value}"
+
showFooter="#{richCalendarBean.attributes['showFooter'].value}"
+
showHeader="#{richCalendarBean.attributes['showHeader'].value}"
+
showInput="#{richCalendarBean.attributes['showInput'].value}"
+
showWeekDaysBar="#{richCalendarBean.attributes['showWeekDaysBar'].value}"
+
showWeeksBar="#{richCalendarBean.attributes['showWeeksBar'].value}"
+
style="#{richCalendarBean.attributes['style'].value}"
+
tabindex="#{richCalendarBean.attributes['tabindex'].value}"
+
timeZone="#{richCalendarBean.attributes['timeZone'].value}"
+
todayControlMode="#{richCalendarBean.attributes['todayControlMode'].value}"
+
validatorMessage="#{richCalendarBean.attributes['validatorMessage'].value}"
+
value="#{richCalendarBean.attributes['value'].value}"
+
verticalOffset="#{richCalendarBean.attributes['verticalOffset'].value}"
+
weekDayLabels="#{richCalendarBean.attributes['weekDayLabels'].value}"
+
weekDayLabelsShort="#{richCalendarBean.attributes['weekDayLabelsShort'].value}"
+
zindex="#{richCalendarBean.attributes['zindex'].value}"
+ />
+ </div>
+
<br/><br/>
</ui:define>
Added: modules/tests/metamer/trunk/application/src/main/webapp/resources/images/heart.png
===================================================================
(Binary files differ)
Property changes on:
modules/tests/metamer/trunk/application/src/main/webapp/resources/images/heart.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/tests/metamer/trunk/application/src/main/webapp/resources/images/star.png
===================================================================
(Binary files differ)
Property changes on:
modules/tests/metamer/trunk/application/src/main/webapp/resources/images/star.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream