From 19127495f34093f867ab6e637a13d6ba7c8d2847 Mon Sep 17 00:00:00 2001 From: Christian Binder Date: Wed, 15 Nov 2006 19:46:20 +0000 Subject: [PATCH] display wholeDay-nonblocking events on Top in month-view too. Additionally added some fixes which makes the extraRows value only as big as needed. --- calendar/inc/class.uiviews.inc.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/calendar/inc/class.uiviews.inc.php b/calendar/inc/class.uiviews.inc.php index ddf41cdf72..1bcd35ddc2 100644 --- a/calendar/inc/class.uiviews.inc.php +++ b/calendar/inc/class.uiviews.inc.php @@ -268,7 +268,7 @@ class uiviews extends uical /** * Displays the monthview or a multiple week-view * - * @param int $weeks=0 number of weeks to show, if 0 (default) all weeks of one month are shows + * @param int $weeks=0 number of weeks to show, if 0 (default) all weeks of one month are shown * @param boolean $home=false if true return content suitable for home-page */ function &month($weeks=0,$home=false) @@ -312,7 +312,7 @@ class uiviews extends uical $title = lang('Wk').' '.adodb_date('W',$week_start); $title = $this->html->a_href($title,$week_view,'',' title="'.lang('Weekview').'"'); - $content .= $this->timeGridWidget($week,60,200,'',$title,0,$week_start+WEEK_s >= $this->last); + $content .= $this->timeGridWidget($this->tagWholeDayOnTop($week),60,200,'',$title,0,$week_start+WEEK_s >= $this->last); } if (!$home) { @@ -472,7 +472,6 @@ class uiviews extends uical if (count($users) == 1 || count($users) > 5) { $dayEvents =& $this->bo->search($this->search_params); - $dayEvents = $this->tagWholeDayOnTop($dayEvents); $owner = 0; } else @@ -485,10 +484,9 @@ class uiviews extends uical list(,$dayEvents[''.$label.'']) = each($this->bo->search($search_params)); $owner[] = $uid; } - $dayEvents = $this->tagWholeDayOnTop($dayEvents); } $cols = array(); - $cols[0] =& $this->timeGridWidget($dayEvents,$this->cal_prefs['interval'],450,'','',$owner); + $cols[0] =& $this->timeGridWidget($this->tagWholeDayOnTop($dayEvents),$this->cal_prefs['interval'],450,'','',$owner); // only show todo's for a single user if (count($users) == 1 && ($todos = $this->get_todos($todo_label)) !== false) @@ -1002,7 +1000,7 @@ class uiviews extends uical { if ($this->debug > 1 || $this->debug==='eventWidget') $this->bo->debug_message('uiviews::eventWidget(%1,width=%2)',False,$event,$width); - if($event['whole_day_on_top']) { $block='event_widget_wholeday_on_top'; } + if($this->use_time_grid && $event['whole_day_on_top']) { $block='event_widget_wholeday_on_top'; } static $tpl = False; if (!$tpl) @@ -1768,6 +1766,7 @@ class uiviews extends uical */ function tagWholeDayOnTop($dayEvents) { + $this->extraRows = $this->extraRowsOriginal; foreach ($dayEvents as $day=>$oneDayEvents) { $extraRowsToAdd = 0;