Permalink
Browse files

MDL-31824 - Calendar - Fixing HTML classes fopr calendar month view -…

… patch provided by Mark Ward
  • Loading branch information...
1 parent 9d940d6 commit 0bd4649a36c3b71e4920c4726aab718910e60df9 @jsnfwlr jsnfwlr committed with danpoltawski Aug 24, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 calendar/renderer.php
View
@@ -460,7 +460,7 @@ public function show_month_detailed(calendar_information $calendar, moodle_url $
// 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 @@ public function show_month_detailed(calendar_information $calendar, moodle_url $
}
// 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 @@ public function show_month_detailed(calendar_information $calendar, moodle_url $
// 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;

0 comments on commit 0bd4649

Please sign in to comment.