Author: pyaschenko
Date: 2007-12-13 11:28:20 -0500 (Thu, 13 Dec 2007)
New Revision: 4823
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-1623
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 2007-12-13
16:22:53 UTC (rev 4822)
+++
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/css/calendar.xcss 2007-12-13
16:28:20 UTC (rev 4823)
@@ -206,13 +206,10 @@
</u:selector>
<u:selector name=".rich-calendar-hover">
- <u:style name="background-color" value="#f3f3f3"/> /*unknown
parameter - need to add*/
+ <u:style name="background-color"
skin="calendarSpecBackgroundColor"/>
+ <u:style name="color" skin="calendarSpecTextColor"/>
</u:selector>
- <u:selector name=".rich-calendar-today.rich-calendar-hover">
- <u:style name="color"
skin="calendarCurrentBackgroundColor"/>
- </u:selector>
-
<u:selector name=".rich-calendar-toolfooter">
<u:style name="background"
skin="additionalBackgroundColor"/>
<u:style name="font-size" skin="generalSizeFont"/>
@@ -231,7 +228,8 @@
</u:selector>
<u:selector name=".rich-calendar-tool-btn-hover">
- <u:style name="background"
skin="calendarWeekBackgroundColor"/>
+ <u:style name="background-color"
skin="calendarWeekBackgroundColor"/>
+ <u:style name="color" skin="generalTextColor"/>
<u:style name="border" value="1px solid"/>
<u:style name="border-color" skin="tableBackgroundColor"/>
<u:style name="border-right-color" skin="panelBorderColor"/>
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-12-13
16:22:53 UTC (rev 4822)
+++
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-12-13
16:28:20 UTC (rev 4823)
@@ -1201,7 +1201,7 @@
//var date = new Date(this.currentDate.getFullYear(),
this.currentDate.getMonth()+daydata._month, daydata.day);
if (this.invokeEvent("datemouseover", obj, e, daydata.date) &&
daydata.enabled)
{
- if (daydata._month==0) Element.addClassName(obj,'rich-calendar-hover');
+ if (daydata._month==0 && obj.id!=this.selectedDateCellId &&
obj.id!=this.todayCellId) Element.addClassName(obj,'rich-calendar-hover');
}
}
},
@@ -1214,7 +1214,7 @@
//var date = new Date(this.currentDate.getFullYear(),
this.currentDate.getMonth()+daydata._month, daydata.day);
if (this.invokeEvent("datemouseout", obj, e, daydata.date) &&
daydata.enabled)
{
- if (daydata._month==0) Element.removeClassName(obj,'rich-calendar-hover');
+ if (daydata._month==0 && obj.id!=this.selectedDateCellId &&
obj.id!=this.todayCellId) Element.removeClassName(obj,'rich-calendar-hover');
}
}
},
@@ -1295,7 +1295,7 @@
return result;
},
- clearEffect: function (element_id, effect, className)
+ clearEffect: function (element_id, effect, className, className1)
{
if (effect)
{
@@ -1307,6 +1307,7 @@
var e = $(element_id);
e.style['backgroundColor'] = '';
if (className) Element.removeClassName(e, className);
+ if (className1) Element.addClassName(e, className1);
}
return null;
},
@@ -1403,7 +1404,7 @@
var boundaryDatesModeFlag = (this.params.boundaryDatesMode == "scroll" ||
this.params.boundaryDatesMode == "select");
this.todayCellId = this.clearEffect(this.todayCellId, this.highlightEffect,
"rich-calendar-today");
- this.selectedDateCellId = this.clearEffect(this.selectedDateCellId,
this.highlightEffect2, "rich-calendar-select");
+ this.selectedDateCellId = this.clearEffect(this.selectedDateCellId,
this.highlightEffect2, "rich-calendar-select", "rich-calendar-btn");
//var _d=new Date();
var obj = $(this.params.weekNumberBarId+"1");
@@ -1503,6 +1504,7 @@
{
this.selectedDateCellId = element.id;
this.selectedDateCellColor = this.getCellBackgroundColor(element);
+ e.remove("rich-calendar-btn");
e.add("rich-calendar-select");
}
@@ -1731,9 +1733,12 @@
// find cell and change style class
var e = $(this.DATE_ELEMENT_ID+(this.firstDateIndex +
this.selectedDate.getDate()-1));
- this.clearEffect(this.selectedDateCellId, this.highlightEffect2,
"rich-calendar-select");
+ this.clearEffect(this.selectedDateCellId, this.highlightEffect2,
"rich-calendar-select", "rich-calendar-btn");
this.selectedDateCellId = e.id;
this.selectedDateCellColor = this.getCellBackgroundColor(e);
+
+ Element.removeClassName(e, "rich-calendar-btn");
+ Element.removeClassName(e, "rich-calendar-hover");
Element.addClassName(e, "rich-calendar-select");
this.renderHF();
@@ -1753,7 +1758,7 @@
this.selectedDate = null;
field.value = "";
- this.clearEffect(this.selectedDateCellId, this.highlightEffect2,
"rich-calendar-select");
+ this.clearEffect(this.selectedDateCellId, this.highlightEffect2,
"rich-calendar-select", "rich-calendar-btn");
if (this.selectedDateCellId)
{
@@ -1790,7 +1795,7 @@
{
this.selectedDate = null;
- this.selectedDateCellId = this.clearEffect(this.selectedDateCellId,
this.highlightEffect2, "rich-calendar-select");
+ this.selectedDateCellId = this.clearEffect(this.selectedDateCellId,
this.highlightEffect2, "rich-calendar-select", "rich-calendar-btn");
this.renderHF();
if (!this.showApplyButton)