From 80cfc892939813ccd23705f21d979be8b4f7add0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20St=C3=B6ckel?= Date: Mon, 14 Feb 2011 11:03:12 +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 | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/calendar/inc/class.calendar_uiviews.inc.php b/calendar/inc/class.calendar_uiviews.inc.php index 59e5708807..f2ca61a350 100644 --- a/calendar/inc/class.calendar_uiviews.inc.php +++ b/calendar/inc/class.calendar_uiviews.inc.php @@ -1425,7 +1425,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 @@ -1520,11 +1520,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"; @@ -1542,9 +1546,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); @@ -1799,9 +1804,11 @@ function open_edit(series) } $prefix_icon = isset($event['prepend_icon']) ? $event['prepend_icon'] : ''; + + $z_index = is_null($z_index) ? 20 : (int)$z_index; $html = $indent.'
'.$prefix_icon."\n".$ie_fix.$html."\n". $indent."
"."\n";