[richfaces-svn-commits] JBoss Rich Faces SVN: r5300 - in trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html: scripts and 1 other directory.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Fri Jan 11 09:26:49 EST 2008
Author: pyaschenko
Date: 2008-01-11 09:26:49 -0500 (Fri, 11 Jan 2008)
New Revision: 5300
Modified:
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/css/calendar.xcss
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
Log:
RF-1725
Modified: trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/css/calendar.xcss
===================================================================
--- trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/css/calendar.xcss 2008-01-11 12:43:31 UTC (rev 5299)
+++ trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/css/calendar.xcss 2008-01-11 14:26:49 UTC (rev 5300)
@@ -287,10 +287,17 @@
<u:style name="position" value="relative"/>
</u:selector>
+ <u:selector name=".rich-calendar-date-layout">
+ <u:style name="background" skin="tableBackgroundColor"/>
+ <u:style name="border" value="1px solid"/>
+ <u:style name="border-color" skin="panelBorderColor"/>
+ <u:style name="position" value="relative"/>
+ </u:selector>
+
<u:selector name=".rich-calendar-editor-container">
</u:selector>
- <u:selector name=".rich-calendar-time-layout, .rich-calendar-time-layout input">
+ <u:selector name=".rich-calendar-time-layout, .rich-calendar-date-layout, .rich-calendar-time-layout input">
<u:style name="font-size" skin="generalSizeFont"/>
<u:style name="font-family" skin="generalFamilyFont"/>
</u:selector>
@@ -308,12 +315,32 @@
<u:style name="padding" value="0px 1px 7px 7px"/>
</u:selector>
+ <u:selector name=".rich-calendar-date-layout-cancel">
+ <u:style name="background" skin="additionalBackgroundColor"/>
+ <u:style name="border-top" value="1px solid"/>
+ <u:style name="border-top-color" skin="panelBorderColor"/>
+ <u:style name="padding" value="5px 5px 5px 1px"/>
+ </u:selector>
+
+ <u:selector name=".rich-calendar-date-layout-ok">
+ <u:style name="background" skin="additionalBackgroundColor"/>
+ <u:style name="border-top" value="1px solid"/>
+ <u:style name="border-top-color" skin="panelBorderColor"/>
+ <u:style name="padding" value="5px 1px 5px 5px"/>
+ </u:selector>
+
+ <u:selector name=".rich-calendar-date-layout-split">
+ <u:style name="border-right" value="1px solid"/>
+ <u:style name="border-right-color" skin="panelBorderColor"/>
+ </u:selector>
+
<u:selector name=".rich-calendar-time-btn">
<u:style name="width" value="45px"/>
<u:style name="border" value="1px solid"/>
<u:style name="border-color" skin="tableBackgroundColor"/>
<u:style name="border-right-color" skin="panelBorderColor"/>
<u:style name="border-bottom-color" skin="panelBorderColor"/>
+ <u:style name="background" skin="additionalBackgroundColor"/>
<u:style name="text-align" value="center"/>
<u:style name="padding" value="2px"/>
<u:style name="white-space" value="nowrap"/>
@@ -391,22 +418,45 @@
</u:selector>
<u:selector name=".rich-calendar-editor-btn">
- <u:style name="width" value="40px" />
+ <u:style name="width" value="36px" />
<u:style name="padding" value="2px" />
+ <u:style name="margin" value="2px" />
<u:style name="text-align" value="center"/>
+ <u:style name="cursor" value="pointer"/>
</u:selector>
<u:selector name=".rich-calendar-editor-btn-over">
<u:style name="padding" value="1px" />
<u:style name="border" value="1px solid"/>
<u:style name="border-color" skin="panelBorderColor"/>
- <u:style name="cursor" value="pointer"/>
+ <u:style name="background" skin="calendarSpecBackgroundColor"/>
</u:selector>
<u:selector name=".rich-calendar-editor-btn-selected">
<u:style name="background-color" skin="calendarCurrentBackgroundColor" />
+ <u:style name="padding" value="2px" />
+ <u:style name="border" value="0px" />
<u:style name="color" skin="calendarCurrentTextColor" />
- <u:style name="font-weight" value="bold"/>
- </u:selector>
-
+ <u:style name="font-weight" value="bold"/>
+ <u:style name="cursor" value="default"/>
+ </u:selector>
+
+ <u:selector name=".rich-calendar-editor-tool-over">
+ <u:style name="padding" value="1px" />
+ <u:style name="border" value="1px solid"/>
+ <u:style name="background" skin="additionalBackgroundColor"/>
+ <u:style name="border-color" skin="tableBackgroundColor"/>
+ <u:style name="border-right-color" skin="panelBorderColor"/>
+ <u:style name="border-bottom-color" skin="panelBorderColor"/>
+ </u:selector>
+
+ <u:selector name=".rich-calendar-editor-tool-press">
+ <u:style name="padding" value="1px" />
+ <u:style name="border" value="1px solid"/>
+ <u:style name="background" skin="additionalBackgroundColor"/>
+ <u:style name="border-color" skin="panelBorderColor"/>
+ <u:style name="border-right-color" skin="tableBackgroundColor"/>
+ <u:style name="border-bottom-color" skin="tableBackgroundColor"/>
+ </u:selector>
+
</f:template>
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 2008-01-11 12:43:31 UTC (rev 5299)
+++ trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2008-01-11 14:26:49 UTC (rev 5300)
@@ -891,31 +891,39 @@
createDECell: function(id, value, buttonType, param, className)
{
- var onclick = (buttonType==0 ? '$(\''+this.id+'\').component.scrollEditorYear('+param+');' :
- buttonType==1 ? '$(\''+this.id+'\').component.dateEditorSelectMonth('+param+');':
- '$(\''+this.id+'\').component.dateEditorSelectYear('+param+');' );
- return '<td><div id="'+id+'" class="rich-calendar-editor-btn'+(className ? ' '+className : '')+'" onmouseover="Element.addClassName(this, \'rich-calendar-editor-btn-over\');" onmouseout="Element.removeClassName(this, \'rich-calendar-editor-btn-over\');" onclick="'+onclick+'">'+value+'</div></td>';
+ if (buttonType==0)
+ {
+ return '<div id="'+id+'" class="rich-calendar-editor-btn'+(className ? ' '+className : '')+
+ '" onmouseover="this.className=\'rich-calendar-editor-btn rich-calendar-editor-tool-over\';" onmouseout="this.className=\'rich-calendar-editor-btn\';" onmousedown="this.className=\'rich-calendar-editor-btn rich-calendar-editor-tool-press\';" onmouseup="this.className=\'rich-calendar-editor-btn rich-calendar-editor-tool-over\';" onclick="$(\''+this.id+'\').component.scrollEditorYear('+param+');">'+value+'</div>';
+ }
+ else
+ {
+ var onclick = (buttonType==1 ? '$(\''+this.id+'\').component.dateEditorSelectMonth('+param+');':
+ '$(\''+this.id+'\').component.dateEditorSelectYear('+param+');' );
+ return '<div id="'+id+'" class="rich-calendar-editor-btn'+(className ? ' '+className : '')+
+ '" onmouseover="Element.addClassName(this, \'rich-calendar-editor-btn-over\');" onmouseout="Element.removeClassName(this,\'rich-calendar-editor-btn-over\');" onclick="'+onclick+'">'+value+'</div>';
+ }
},
createDateEditorLayout: function()
{
- var htmlBegin = '<table id="'+this.DATE_EDITOR_LAYOUT_ID+'" class="rich-calendar-time-layout" border="0" cellpadding="0" cellspacing="0"><tbody><tr id="'+this.DATE_EDITOR_LAYOUT_ID+'TR">';
+ var htmlBegin = '<table id="'+this.DATE_EDITOR_LAYOUT_ID+'" class="rich-calendar-date-layout" border="0" cellpadding="0" cellspacing="0"><tbody><tr id="'+this.DATE_EDITOR_LAYOUT_ID+'TR">';
var htmlEnd = '</tr></tbody></table>';
var month = 0;
this.dateEditorYear = this.getCurrentYear();
var year = this.dateEditorStartYear = this.dateEditorYear-4;
- var htmlContent = this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'M'+month, this.params.monthLabelsShort[month], 1, month)
- +this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'M'+(month+6), this.params.monthLabelsShort[month+6], 1, month+6)
- +this.createDECell('','<', 0, -1)
- +this.createDECell('','>', 0, 1);
+ var htmlContent = '<td>'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'M'+month, this.params.monthLabelsShort[month], 1, month)+'</td>'
+ +'<td class="rich-calendar-date-layout-split">'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'M'+(month+6), this.params.monthLabelsShort[month+6], 1, month+6)+'</td>'
+ +'<td>'+this.createDECell('','<', 0, -1)+'</td>'
+ +'<td>'+this.createDECell('','>', 0, 1)+'</td>';
month++;
for (var i=0;i<5;i++)
{
- htmlContent+='</tr><tr>'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'M'+month, this.params.monthLabelsShort[month], 1, month)
- +this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'M'+(month+6), this.params.monthLabelsShort[month+6], 1, month+6)
- +this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'Y'+i, year, 2, i, (i==4 ? 'rich-calendar-editor-btn-selected' : ''))
- +this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'Y'+(i+5), year+5, 2, i+5);
+ htmlContent+='</tr><tr><td>'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'M'+month, this.params.monthLabelsShort[month], 1, month)+'</td>'
+ +'<td class="rich-calendar-date-layout-split">'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'M'+(month+6), this.params.monthLabelsShort[month+6], 1, month+6)+'</td>'
+ +'<td>'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'Y'+i, year, 2, i, (i==4 ? 'rich-calendar-editor-btn-selected' : ''))+'</td>'
+ +'<td>'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'Y'+(i+5), year+5, 2, i+5)+'</td>';
month++;
year++;
}
@@ -923,9 +931,9 @@
this.dateEditorMonth = this.getCurrentMonth();
this.dateEditorMonthID = this.DATE_EDITOR_LAYOUT_ID+'M'+this.dateEditorMonth;
- htmlContent+='</tr><tr><td colspan="2" class="rich-calendar-time-layout-ok">'+
+ htmlContent+='</tr><tr><td colspan="2" class="rich-calendar-date-layout-ok">'+
'<div class="rich-calendar-time-btn" style="float:right;" onmousedown="Element.addClassName(this, \'rich-calendar-time-btn-press\');" onmouseout="Element.removeClassName(this, \'rich-calendar-time-btn-press\');" onmouseup="Element.removeClassName(this, \'rich-calendar-time-btn-press\');" onclick="$(\''+this.id+'\').component.hideDateEditor(true);">'+this.params.labels.ok+'</div>'+
- '</td><td colspan="2" class="rich-calendar-time-layout-cancel">'+
+ '</td><td colspan="2" class="rich-calendar-date-layout-cancel">'+
'<div class="rich-calendar-time-btn" style="float:left;" onmousedown="Element.addClassName(this, \'rich-calendar-time-btn-press\');" onmouseout="Element.removeClassName(this, \'rich-calendar-time-btn-press\');" onmouseup="Element.removeClassName(this, \'rich-calendar-time-btn-press\');" onclick="$(\''+this.id+'\').component.hideDateEditor(false);">'+this.params.labels.cancel+'</div>'+
'</td>';
@@ -1937,10 +1945,10 @@
hideEditor: function()
{
+ if (this.isTimeEditorLayoutCreated) $(this.TIME_EDITOR_LAYOUT_ID).hide();
+ if (this.isDateEditorLayoutCreated) $(this.DATE_EDITOR_LAYOUT_ID).hide();
$(this.EDITOR_ID).hide();
$(this.EDITOR_SHADOW_ID).hide();
- if (this.isTimeEditorLayoutCreated) $(this.TIME_EDITOR_LAYOUT_ID).hide();
- if (this.isDateEditorLayoutCreated) $(this.DATE_EDITOR_LAYOUT_ID).hide();
this.isEditorVisible = false;
},
More information about the richfaces-svn-commits
mailing list