Author: pyaschenko
Date: 2007-08-28 12:25:55 -0400 (Tue, 28 Aug 2007)
New Revision: 2544
Modified:
trunk/ui/calendar/src/main/config/component/calendar.xml
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-725 partial fix
Modified: trunk/ui/calendar/src/main/config/component/calendar.xml
===================================================================
--- trunk/ui/calendar/src/main/config/component/calendar.xml 2007-08-28 16:21:35 UTC (rev
2543)
+++ trunk/ui/calendar/src/main/config/component/calendar.xml 2007-08-28 16:25:55 UTC (rev
2544)
@@ -312,6 +312,93 @@
replacing any message that comes from the converter
</description>
</property>
+
+ <property>
+ <name>onclick</name>
+ <classname>java.lang.String</classname>
+ <description>
+ onClick event handler
+ </description>
+ </property>
+ <property>
+ <name>onfocus</name>
+ <classname>java.lang.String</classname>
+ <description>
+ onFocus event handler
+ </description>
+ </property>
+ <property>
+ <name>onBlur</name>
+ <classname>java.lang.String</classname>
+ <description>
+ onBlur event handler
+ </description>
+ </property>
+ <property>
+ <name>onChange</name>
+ <classname>java.lang.String</classname>
+ <description>
+ onChange event handler
+ </description>
+ </property>
+
+ <property>
+ <name>oninputchange</name>
+ <classname>java.lang.String</classname>
+ <description>
+ input onChange event handler
+ </description>
+ </property>
+ <property>
+ <name>oninputselect</name>
+ <classname>java.lang.String</classname>
+ <description>
+ input onSelect event handler
+ </description>
+ </property>
+ <property>
+ <name>oninputfocus</name>
+ <classname>java.lang.String</classname>
+ <description>
+ input onFocus event handler
+ </description>
+ </property>
+ <property>
+ <name>oninputblur</name>
+ <classname>java.lang.String</classname>
+ <description>
+ input onBlur event handler
+ </description>
+ </property>
+ <property>
+ <name>oninputclick</name>
+ <classname>java.lang.String</classname>
+ <description>
+ input onClick event handler
+ </description>
+ </property>
+ <property>
+ <name>oninputkeypress</name>
+ <classname>java.lang.String</classname>
+ <description>
+ input onKeyPress event handler
+ </description>
+ </property>
+ <property>
+ <name>oninputkeydown</name>
+ <classname>java.lang.String</classname>
+ <description>
+ input onKeyDown event handler
+ </description>
+ </property>
+ <property>
+ <name>oninputkeyup</name>
+ <classname>java.lang.String</classname>
+ <description>
+ input onKeyUp event handler
+ </description>
+ </property>
+
<property hidden="true">
<name>localValueSet</name>
<description>localValueSet</description>
@@ -320,5 +407,10 @@
<name>valid</name>
<description>valid</description>
</property>
+ <property hidden="true">
+ <name>valid</name>
+ <description>valid</description>
+ </property>
+
</component>
</components>
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-08-28
16:21:35 UTC (rev 2543)
+++
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-08-28
16:25:55 UTC (rev 2544)
@@ -233,8 +233,8 @@
});
/* Year:
- * yy - 00-99
- * y,yyy+ - 1999
+ * y,yy - 00-99
+ * yyy+ - 1999
* Month:
* M - 1-12
* MM - 01-12
@@ -261,9 +261,10 @@
var shortLabel=false;
pattern = pattern.replace(/([.*+?^<>=!:${}()|[\]\/\\])/g, '\\$1');
- pattern = pattern.replace(/(yy^y|y+|M^M|MM^M|MMM^M|M+|d^d|d+)/g,
+ pattern = pattern.replace(/(y+|M+|d+)/g,
function($1) {
switch ($1) {
+ case 'y' :
case 'yy' : y=counter; counter++; return '(\\d{2})';
case 'MM' : m=counter; counter++; return '(\\d{2})';
case 'M' : m=counter; counter++; return '(\\d{1,2})';
@@ -296,10 +297,11 @@
if (!monthNames) monthNames = Date.getDefaultMonthNames();
if (!monthNamesShort) monthNamesShort = Date.getDefaultMonthNames(true);
var d = this; var mm; var dd;
- return pattern.replace(/(yy^y|y+|M^M|MM^M|MMM^M|M+|d^d|d+)/g,
+ return pattern.replace(/(y+|M+|d+)/g,
function($1) {
switch ($1) {
- case 'yy': return d.getYear().toString().substr(-2);
+ case 'y':
+ case 'yy': return str = d.getYear().toString().slice(-2);
case 'M': return d.getMonth()+1;
case 'MM': return (mm = d.getMonth()+1)<10 ? '0'+mm :
mm;
case 'MMM': return monthNamesShort[d.getMonth()];
Modified: trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx
===================================================================
--- trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx 2007-08-28
16:21:35 UTC (rev 2543)
+++ trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx 2007-08-28
16:25:55 UTC (rev 2544)
@@ -125,15 +125,18 @@
disabled="#{component.attributes['disabled']}"
accesskey="#{component.attributes['accesskey']}"
maxlength="#{component.attributes['maxlength']}"
- onchange="#{component.attributes['onchange']}"
- onselect="#{component.attributes['onselect']}"
- onfocus="#{component.attributes['onfocus']}"
- onblur="#{component.attributes['onblur']}"
+ onchange="#{component.attributes['oninputchange']}"
+ onselect="#{component.attributes['oninputselect']}"
+ onfocus="#{component.attributes['oninputfocus']}"
+ onblur="#{component.attributes['oninputblur']}"
+ onclick="#{component.attributes['oninputclick']}"
+ onkeypress="#{component.attributes['oninputkeypress']}"
+ onkeydown="#{component.attributes['oninputkeydown']}"
+ onkeyup="#{component.attributes['oninputkeyup']}"
size="#{component.attributes['inputSize']}"
style="vertical-align: middle;
#{component.attributes['inputStyle']}"
class="rich-calendar-input #{component.attributes['inputClass']}"
- tabindex="#{component.attributes['tabindex']}"
- onclick="#{onclick}">
+ tabindex="#{component.attributes['tabindex']}">
</input>
<img id="#{clientId}PopupButton"
class="rich-calendar-popupicon"
Show replies by date