From b90e590f661e96768c42335989e77d9cce041a51 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 11 Feb 2011 15:44:50 +0000 Subject: [PATCH] * Calendar: using equally sized, non-overlaping columns for multiple events at the same time - old overlapping events failed for more then 6 columns - clicking on events opened the frist/underlaying event not the visible one --- calendar/inc/class.calendar_uiviews.inc.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/calendar/inc/class.calendar_uiviews.inc.php b/calendar/inc/class.calendar_uiviews.inc.php index 186ed43bc8..dd22047c39 100644 --- a/calendar/inc/class.calendar_uiviews.inc.php +++ b/calendar/inc/class.calendar_uiviews.inc.php @@ -1124,8 +1124,11 @@ function open_edit(series) // displaying all event columns of the day foreach($eventCols as $n => $eventCol) { - $html .= $this->eventColWidget($eventCol,!$n ? 0 : 60-10*(count($eventCols)-$n), - count($eventCols) == 1 ? 100 : (!$n ? 80 : 50),$indent."\t", + // equal sized columns + $width = 95.0 / count($eventCols); + $left = 2.5 + $n * $width; + + $html .= $this->eventColWidget($eventCol,$left,$width,$indent."\t", $owner ? $owner : $this->user); } $html .= $indent."\n"; // calDayCol @@ -1195,11 +1198,12 @@ function open_edit(series) * @param string $indent string for correct indention * @param int $owner owner of the eventCol */ - function eventColWidget($events,$left,$width,$indent,$owner) + function eventColWidget($events,$left,$width,$indent,$owner,$z_index=null) { if ($this->debug > 1 || $this->debug==='eventColWidget') $this->bo->debug_message('uiviews::eventColWidget(%1,left=%2,width=%3,)',False,$events,$left,$width); $html = $indent.'
'."\n"; foreach($events as $event) {