From 8e61bf6e18374056cb4b809b4e35b810c757f8d5 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 14 Feb 2011 12:14:04 +0000 Subject: [PATCH] Clicking on a stack of events now always openes the event lying on top of the stack --- calendar/inc/class.calendar_uiviews.inc.php | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/calendar/inc/class.calendar_uiviews.inc.php b/calendar/inc/class.calendar_uiviews.inc.php index 98e7c3e5bd..f50be69746 100644 --- a/calendar/inc/class.calendar_uiviews.inc.php +++ b/calendar/inc/class.calendar_uiviews.inc.php @@ -1376,7 +1376,7 @@ function open_edit(series) } if ($left + $width > 100.0) $width = 100.0 - $left; $html .= $this->eventColWidget($eventCol,$left,$width,$indent."\t", - $owner ? $owner : $this->user);//,20+10*$n); + $owner ? $owner : $this->user, 20+10*$n); } $html .= $indent."\n"; // calDayCol @@ -1459,11 +1459,15 @@ function open_edit(series) if ($this->debug > 1 || $this->debug==='eventColWidget') $this->bo->debug_message('uiviews::eventColWidget(%1,left=%2,width=%3,)',False,$events,$left,$width); $html = $indent.'
use_time_grid ? ' top: '.$this->rowHeight.'%;' : '').'">'."\n"; foreach($events as $event) { - $html .= $this->eventWidget($event,$width,$indent."\t",$owner); + $html .= $this->eventWidget($event,$width,$indent."\t",$owner,false,'event_widget',$z_index); } $html .= $indent."
\n"; @@ -1481,9 +1485,10 @@ function open_edit(series) * @param int $owner owner of the calendar the event is in * @param boolean $return_array=false should an array with keys(tooltip,popup,html) be returned or the complete widget as string * @param string $block='event_widget' template used the render the widget + * @param int $z_index is the z-index of the drag-drobable outer box of the event. * @return string/array */ - function eventWidget($event,$width,$indent,$owner,$return_array=false,$block='event_widget') + function eventWidget($event,$width,$indent,$owner,$return_array=false,$block='event_widget',$z_index=null) { if ($this->debug > 1 || $this->debug==='eventWidget') $this->bo->debug_message('uiviews::eventWidget(%1,width=%2)',False,$event,$width); @@ -1710,8 +1715,12 @@ function open_edit(series) $style = 'position: relative; margin-top: 3px;'; } + $prefix_icon = isset($event['prepend_icon']) ? $event['prepend_icon'] : ''; + + $z_index = is_null($z_index) ? 20 : (int)$z_index; + $html = $indent.'
'."\n".$ie_fix.$html."\n". $indent."
"."\n";