Author: pyaschenko
Date: 2010-04-30 12:42:51 -0400 (Fri, 30 Apr 2010)
New Revision: 16855
Modified:
branches/community/3.3.X/ui/calendar/src/main/config/component/calendar.xml
branches/community/3.3.X/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
branches/community/3.3.X/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx
Log:
https://jira.jboss.org/jira/browse/RF-4354 - hintParentElement attribute was added to
calendar component
Modified: branches/community/3.3.X/ui/calendar/src/main/config/component/calendar.xml
===================================================================
--- branches/community/3.3.X/ui/calendar/src/main/config/component/calendar.xml 2010-04-30
16:39:57 UTC (rev 16854)
+++ branches/community/3.3.X/ui/calendar/src/main/config/component/calendar.xml 2010-04-30
16:42:51 UTC (rev 16855)
@@ -183,6 +183,14 @@
<defaultvalue>false</defaultvalue>
</property>
<property>
+ <name>hidePopupOnScroll</name>
+ <classname>boolean</classname>
+ <description>
+ Hide popup when user scrolls content. If false opened popup wouldn't be closed on
scroll but component should be placed into a relative container, otherwise popup
wouldn't be scrolled. Does not affect on document body scroll. Default value is
"true".
+ </description>
+ <defaultvalue>true</defaultvalue>
+ </property>
+ <property>
<name>jointPoint</name>
<classname>java.lang.String</classname>
<description>
Modified:
branches/community/3.3.X/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
---
branches/community/3.3.X/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2010-04-30
16:39:57 UTC (rev 16854)
+++
branches/community/3.3.X/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2010-04-30
16:42:51 UTC (rev 16855)
@@ -1221,7 +1221,9 @@
Event.observe(window.document, "click", this.eventOnCollapse, false);
Richfaces.removeScrollEventHandlers(this.scrollElements, this.eventOnScroll);
- this.scrollElements = Richfaces.setupScrollEventHandlers(element,
this.eventOnScroll);
+ if (this.params.hidePopupOnScroll) {
+ this.scrollElements = Richfaces.setupScrollEventHandlers(element,
this.eventOnScroll);
+ }
}
},
@@ -2409,7 +2411,8 @@
showApplyButton: false,
selectedDate: null,
currentDate: null,
- defaultTime: {hours:12,minutes:0}
+ defaultTime: {hours:12,minutes:0},
+ hidePopupOnScroll: true
};
// must be :defaultTime, minDaysInFirstWeek, firstWeekday, weekDayLabels,
weekDayLabelsShort, monthLabels, monthLabelsShort
\ No newline at end of file
Modified:
branches/community/3.3.X/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx
===================================================================
---
branches/community/3.3.X/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx 2010-04-30
16:39:57 UTC (rev 16854)
+++
branches/community/3.3.X/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx 2010-04-30
16:42:51 UTC (rev 16855)
@@ -175,6 +175,7 @@
<c:scriptOption attributes="boundaryDatesMode"
defaultValue="inactive" />
<c:scriptOption attributes="horizontalOffset" defaultValue="0"
/>
<c:scriptOption attributes="verticalOffset" defaultValue="0"
/>
+ <c:scriptOption attributes="hidePopupOnScroll"
defaultValue="true" />
<c:scriptOption name="currentDate"
value="#{this:getCurrentDate(context, component, currentDate)}" />
<c:scriptOption name="selectedDate"
value="#{this:getSelectedDate(context, component)}" />