MDL-31824 - Calendar - Fixing HTML classes fopr calendar month view - patch provided by Mark Ward

This commit is contained in:
Jason Fowler 2012-08-24 10:10:55 +08:00
parent ecfe814e0f
commit 9e142d1121

View File

@ -460,7 +460,7 @@ class core_calendar_renderer extends plugin_renderer_base {
// Paddding (the first week may have blank days in the beginning)
for($i = $display->minwday; $i < $startwday; ++$i) {
$cell = new html_table_cell('&nbsp;');
$cell->attributes = array('class'=>'nottoday');
$cell->attributes = array('class'=>'nottoday dayblank');
$row->cells[] = $cell;
}
@ -519,10 +519,10 @@ class core_calendar_renderer extends plugin_renderer_base {
}
// Special visual fx for today
if($display->thismonth && $calendar->day == $calendar->day) {
$cellclasses[] = 'today';
if ($display->thismonth && $calendar->day == $date['mday']) {
$cellclasses[] = 'day today';
} else {
$cellclasses[] = 'nottoday';
$cellclasses[] = 'day nottoday';
}
$cell->attributes = array('class'=>join(' ',$cellclasses));
@ -553,7 +553,7 @@ class core_calendar_renderer extends plugin_renderer_base {
// Paddding (the last week may have blank days at the end)
for($i = $dayweek; $i <= $display->maxwday; ++$i) {
$cell = new html_table_cell('&nbsp;');
$cell->attributes = array('class'=>'nottoday');
$cell->attributes = array('class'=>'nottoday dayblank');
$row->cells[] = $cell;
}
$table->data[] = $row;