[richfaces-svn-commits] JBoss Rich Faces SVN: r2511 - in trunk/ui/calendar: design/calendar-js and 2 other directories.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Mon Aug 27 11:15:15 EDT 2007
Author: akushunin
Date: 2007-08-27 11:15:14 -0400 (Mon, 27 Aug 2007)
New Revision: 2511
Modified:
trunk/ui/calendar/design/calendar-js/calendar-prototype.js
trunk/ui/calendar/design/calendar/calendar_div.html
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:
some fixes after classes refactoring
Modified: trunk/ui/calendar/design/calendar/calendar_div.html
===================================================================
--- trunk/ui/calendar/design/calendar/calendar_div.html 2007-08-27 15:15:07 UTC (rev 2510)
+++ trunk/ui/calendar/design/calendar/calendar_div.html 2007-08-27 15:15:14 UTC (rev 2511)
@@ -86,7 +86,7 @@
color : #ff7800; /*unknown parameter - need to add*/
}
-.rich-calendar-current{
+.rich-calendar-today{
background-color : #ff7800; /*unknown parameter - need to add*/
color : #ffebda; /*unknown parameter - need to add*/
font-weight : bold;
@@ -235,7 +235,7 @@
<td class="rich-cell-size rich-calendar-cell rich-calendar-btn">
7<br>
</td>
- <td class="rich-cell-size rich-calendar-cell rich-calendar-current rich-calendar-btn">
+ <td class="rich-cell-size rich-calendar-cell rich-calendar-today rich-calendar-btn">
8<br>
</td>
<td class="rich-cell-size rich-calendar-cell rich-calendar-btn">
Modified: trunk/ui/calendar/design/calendar-js/calendar-prototype.js
===================================================================
--- trunk/ui/calendar/design/calendar-js/calendar-prototype.js 2007-08-27 15:15:07 UTC (rev 2510)
+++ trunk/ui/calendar/design/calendar-js/calendar-prototype.js 2007-08-27 15:15:14 UTC (rev 2511)
@@ -129,7 +129,7 @@
var weekDayHtml = this.params.weekDayMarkup( {weekDay: this.params.weekDayLabels[weekDayCounter]} );
if (weekDayCounter==6) weekDayCounter=0; else weekDayCounter++;
- htmlTextWeekDayBar+='<td id="'+this.params.weekDayBarId+i+'" class="'+(i==this.firstWeekendDayNumber || i==this.secondWeekendDayNumber ? "rich-Weekendclass" : "rich-Dayclass")+'">'+weekDayHtml+'</td>';
+ htmlTextWeekDayBar+='<td id="'+this.params.weekDayBarId+i+'" class="'+(i==this.firstWeekendDayNumber || i==this.secondWeekendDayNumber ? "Weekendclass" : "Dayclass")+'">'+weekDayHtml+'</td>';
}
htmlTextWeekDayBar+='</tr>\n';
@@ -189,9 +189,9 @@
{
this.selectedDate=new Date(this.currentDate);
this.selectedDate.setDate(obj.data);
- if (this.selectedDateElement) Element.removeClassName(this.selectedDateElement, "rich-Selectedrich-Dayclass");
+ if (this.selectedDateElement) Element.removeClassName(this.selectedDateElement, "Selecteddayclass");
this.selectedDateElement = obj;
- Element.addClassName(obj, "rich-Selectedrich-Dayclass");
+ Element.addClassName(obj, "Selecteddayclass");
$('div_'+this.params.dayListTableId+'_selected_date').innerHTML=obj.data+"/"+(this.currentDate.getMonth()+1)+"/"+this.currentDate.getFullYear();
} else {
@@ -280,7 +280,7 @@
this.days = [];
var dayCounter = previousMonthDays - wd + 1;
// previuos month days
- if (wd>0) while (dayCounter<=previousMonthDays) {this.days.push({day:dayCounter, _isWeekend: this.isWeekend(p), _month:-1, _className:"rich-Disabledrich-Dayclass"}); dayCounter++; p++; }
+ if (wd>0) while (dayCounter<=previousMonthDays) {this.days.push({day:dayCounter, _isWeekend: this.isWeekend(p), _month:-1, _className:"Disableddayclass"}); dayCounter++; p++; }
dayCounter = 1;
// current month days
@@ -291,9 +291,9 @@
while (dayCounter<firstDay)
{
if (this.isWeekend(p%7))
- this.days.push({day:dayCounter, _isWeekend: true, _month:0, _className:"rich-Weekendrich-Dayclass", _hoverClassName:"rich-Hoveredweekclass"});
+ this.days.push({day:dayCounter, _isWeekend: true, _month:0, _className:"Weekenddayclass", _hoverClassName:"Hoveredweekclass"});
else
- this.days.push({day:dayCounter, _isWeekend: false, _month:0, _className:"rich-Commonrich-Dayclass", _hoverClassName:"rich-Hoveredrich-Dayclass"});
+ this.days.push({day:dayCounter, _isWeekend: false, _month:0, _className:"Commondayclass", _hoverClassName:"Hovereddayclass"});
dayCounter++;
p++;
@@ -308,8 +308,8 @@
obj = this.daysData.days[idx];
obj._isWeekend = flag;
obj._month = 0;
- if (flag) {obj._className = "rich-Weekendrich-Dayclass"; obj._hoverClassName = "rich-Hoveredweekclass";}
- else {obj._className = "rich-Commonrich-Dayclass"; obj._hoverClassName = "rich-Hoveredrich-Dayclass";}
+ if (flag) {obj._className = "Weekenddayclass"; obj._hoverClassName = "Hoveredweekclass";}
+ else {obj._className = "Commondayclass"; obj._hoverClassName = "Hovereddayclass";}
this.days.push(obj);
idx++;
dayCounter++;
@@ -319,9 +319,9 @@
while (dayCounter<=currentMonthDays)
{
if (this.isWeekend(p%7))
- this.days.push({day:dayCounter, _isWeekend: true, _month:0, _className:"rich-Weekendrich-Dayclass", _hoverClassName:"rich-Hoveredweekclass"});
+ this.days.push({day:dayCounter, _isWeekend: true, _month:0, _className:"Weekenddayclass", _hoverClassName:"Hoveredweekclass"});
else
- this.days.push({day:dayCounter, _isWeekend: false, _month:0, _className:"rich-Commonrich-Dayclass", _hoverClassName:"rich-Hoveredrich-Dayclass"});
+ this.days.push({day:dayCounter, _isWeekend: false, _month:0, _className:"Commondayclass", _hoverClassName:"Hovereddayclass"});
dayCounter++;
p++;
}
@@ -329,7 +329,7 @@
// next month days
var ld = 7-p%7;
- if (ld!=7) while (dayCounter<=ld) { this.days.push({day:dayCounter++, _isWeekend: this.isWeekend(p%7), _month:1, _className:"rich-Disabledrich-Dayclass"}); }
+ if (ld!=7) while (dayCounter<=ld) { this.days.push({day:dayCounter++, _isWeekend: this.isWeekend(p%7), _month:1, _className:"Disableddayclass"}); }
// render
p=0;
@@ -361,8 +361,8 @@
if (dataobj) {
element.data=dataobj.day;
element.innerHTML = this.params.dayListMarkupArray[p]( dataobj );
- element.className = dataobj._className + (todayflag /*&& dataobj._month==0 */&& dataobj.day==todaydate ? " rich-Torich-Dayclass" : "");
- if (selectedflag && dataobj._month==0 && dataobj.day==selecteddate) { this.selectedDateElement = element; element.className+=" rich-Selectedrich-Dayclass"; }
+ element.className = dataobj._className + (todayflag /*&& dataobj._month==0 */&& dataobj.day==todaydate ? " Todayclass" : "");
+ if (selectedflag && dataobj._month==0 && dataobj.day==selecteddate) { this.selectedDateElement = element; element.className+=" Selecteddayclass"; }
this.setCellEvents(element);
p++;
} else {
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-08-27 15:15:07 UTC (rev 2510)
+++ trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/css/calendar.xcss 2007-08-27 15:15:14 UTC (rev 2511)
@@ -67,7 +67,7 @@
color : #ff7800; /*unknown parameter - need to add*/
}*/
-/*.rich-calendar-current{
+/*.rich-calendar-today{
background-color : #ff7800; /*unknown parameter - need to add*/
color : #ffebda; /*unknown parameter - need to add*/
font-weight : bold;
@@ -154,7 +154,7 @@
<u:style name="font-family" skin="generalFamilyFont"/>
</u:selector>
- <u:selector name=".rich-Weekendclass">
+ <u:selector name=".Weekendclass">
<u:style name="color" value="red"/>
</u:selector>
@@ -174,7 +174,7 @@
</u:selector>
/*
-.rich-calendar-current{
+.rich-calendar-today{
background-color : #ff7800; /*unknown parameter - need to add
color : #ffebda; /*unknown parameter - need to add
font-weight : bold;
@@ -189,7 +189,7 @@
<u:style name="color" value="#a0a0a0"/> /*unknown parameter - need to add*/
</u:selector>
- <u:selector name=".rich-calendar-current">
+ <u:selector name=".rich-calendar-today">
<u:style name="background-color" value="#ff7800"/> /*unknown parameter - need to add*/
<u:style name="color" value="#ffebda"/> /*unknown parameter - need to add*/
<u:style name="font-weight" value="bold"/>
@@ -205,7 +205,7 @@
<u:style name="background-color" value="#f3f3f3"/> /*unknown parameter - need to add*/
</u:selector>
- <u:selector name=".rich-calendar-current.rich-calendar-hover">
+ <u:selector name=".rich-calendar-today.rich-calendar-hover">
<u:style name="color" value="#ff7800"/> /*unknown parameter - need to add*/
</u:selector>
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-27 15:15:07 UTC (rev 2510)
+++ trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-08-27 15:15:14 UTC (rev 2511)
@@ -492,7 +492,7 @@
if (weekDayCounter==6) weekDayCounter=0; else weekDayCounter++;
styleClass = "rich-calendar-days";
- if (i==this.firstWeekendDayNumber || i==this.secondWeekendDayNumber) styleClass += " rich-Weekendclass";
+ if (i==this.firstWeekendDayNumber || i==this.secondWeekendDayNumber) styleClass += " Weekendclass";
if (i==6) styleClass += " rich-right-cell";
htmlTextWeekDayBar+='<td class="'+styleClass+'">'+weekDayHtml+'</td>';
@@ -733,9 +733,9 @@
{
this.selectedDate=new Date(this.currentDate);
this.selectedDate.setDate(obj.data);
- if (this.selectedDateElement) Element.removeClassName(this.selectedDateElement, "rich-Selectedrich-Dayclass");
+ if (this.selectedDateElement) Element.removeClassName(this.selectedDateElement, "rich-Selected Dayclass");
this.selectedDateElement = obj;
- Element.addClassName(obj, "rich-Selectedrich-Dayclass");
+ Element.addClassName(obj, "rich-Selected Dayclass");
$(this.INPUT_DATE_ID).value=this.getSelectedDateString(this.params.datePattern);
this.renderHeader();
@@ -920,7 +920,7 @@
//var _d=new Date();
if (this.selectedDateElement) {
- Element.classNames(this.selectedDateElement).remove("rich-Selectedrich-Dayclass");
+ Element.classNames(this.selectedDateElement).remove("rich-Selected Dayclass");
this.selectedDateElement = null;
}
@@ -966,21 +966,21 @@
e.add('rich-calendar-btn');
}
- // TODO make some optimization with rich-calendar-current class
+ // TODO make some optimization with rich-calendar-today class
if (todayflag && dataobj._month==0 && dataobj.day==todaydate)
{
this.todayCellId = element.id;
this.todayCellColor = Element.getStyle(element, 'background-color').parseColor();
- e.add("rich-calendar-current");
+ e.add("rich-calendar-today");
}
else
{
- e.remove("rich-calendar-current");
+ e.remove("rich-calendar-today");
}
if (selectedflag && dataobj._month==0 && dataobj.day==selecteddate) {
this.selectedDateElement = element;
- e.add("rich-Selectedrich-Dayclass");
+ e.add("rich-Selected Dayclass");
}
this.setCellEvents(element);
@@ -1133,7 +1133,7 @@
}
else
{
- if (this.selectedDateElement) Element.removeClassName(this.selectedDateElement, "rich-Selectedrich-Dayclass");
+ if (this.selectedDateElement) Element.removeClassName(this.selectedDateElement, "rich-Selected Dayclass");
if (oldSelectedDate!=null) if (noUpdate) this.render(); else this.onUpdate();
this.today(noUpdate);
}
More information about the richfaces-svn-commits
mailing list