From f20c4d02b883635746382700654066ce48663f97 Mon Sep 17 00:00:00 2001 From: nfreear Date: Wed, 8 Mar 2006 17:03:02 +0000 Subject: [PATCH] Accessibility: table summary and for day abbreviations. --- calendar/lib.php | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/calendar/lib.php b/calendar/lib.php index 80d94cacfb..7610d8b37c 100644 --- a/calendar/lib.php +++ b/calendar/lib.php @@ -161,7 +161,11 @@ function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_y //calendar_events_by_day($events, $display->tstart, $eventsbyday, $durationbyday, $typesbyday); calendar_events_by_day($events, $m, $y, $eventsbyday, $durationbyday, $typesbyday); - $content .= ''; // Begin table + //Accessibility: added summary and elements. + ///global $CALENDARDAYS; appears to be broken. + $days_title = array('sunday','monday','tuesday','wednesday','thursday','friday','saturday'); + + $content .= '
'; // Begin table $content .= ''; // Header row: day names // Print out the names of the weekdays @@ -169,7 +173,8 @@ function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_y for($i = $display->minwday; $i <= $display->maxwday; ++$i) { // This uses the % operator to get the correct weekday no matter what shift we have // applied to the $display->minwday : $display->maxwday range from the default 0 : 6 - $content .= ''; + $content .= '\n"; } $content .= ''; // End of day names; prepare for day numbers @@ -182,8 +187,6 @@ function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_y $content .= ''."\n"; } - //TODO (nfreear): delete, $strftimetimedayshort = get_string('strftimedayshort'); - // Now display all the calendar for($day = 1; $day <= $display->maxdays; ++$day, ++$dayweek) { if($dayweek > $display->maxwday) { @@ -240,12 +243,7 @@ function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_y } else { $popup = calendar_get_popup(false, $events[$eventid]->timestart, $popupcontent); } - -/*TODO (nfreear): delete. - $popupcaption = get_string('eventsfor', 'calendar', userdate($events[$eventid]->timestart, $strftimetimedayshort)); - $popupcontent = str_replace("'", "\'", htmlspecialchars($popupcontent)); - $popup = 'onmouseover="return overlib(\''.$popupcontent.'\', CAPTION, \''.$popupcaption.'\');" onmouseout="return nd();"'; -*/ + // Class and cell content if(isset($typesbyday[$day]['startglobal'])) { $class .= ' event_global'; @@ -285,6 +283,7 @@ function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_y $today = get_string('today', 'calendar').' '.userdate(time(), get_string('strftimedayshort')); if(! isset($eventsbyday[$day])) { + $class .= ' eventnone'; $popup = calendar_get_popup(true, false); $cell = ''.$day.''; } -- 2.39.5
'.get_string($days[$i % 7], 'calendar').''. + get_string($days[$i % 7], 'calendar') ."