From 2a4e0a3f3efe934d313d4440a104177d1d333183 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 24 Jan 2010 03:19:59 +0000 Subject: [PATCH] make long tooltips scrollable and remove double call to html::tooltips --- calendar/inc/class.calendar_uiviews.inc.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/calendar/inc/class.calendar_uiviews.inc.php b/calendar/inc/class.calendar_uiviews.inc.php index f7a68c5931..666c1300ed 100644 --- a/calendar/inc/class.calendar_uiviews.inc.php +++ b/calendar/inc/class.calendar_uiviews.inc.php @@ -1313,7 +1313,6 @@ class calendar_uiviews extends calendar_ui } */ $tooltip = $tpl->fp('tooltip','event_tooltip'); - $tpl->set_var('tooltip',html::tooltip($tooltip,False,array('BorderWidth'=>0,'Padding'=>0))); $html = $tpl->fp('out',$block); @@ -1352,11 +1351,18 @@ class calendar_uiviews extends calendar_ui 'color' => $color, ); } + $ttip_options = array( + 'BorderWidth' => 0, // as we use our round borders + 'Padding' => 0, + 'Sticky' => true, // make long tooltips scrollable + 'ClickClose' => true, + 'FollowMouse' => false, + ); $ie_fix = ''; if (html::$user_agent == 'msie') // add a transparent image to make the event "opaque" to mouse events { $ie_fix = $indent."\t".html::image('calendar','transparent.gif','', - html::tooltip($tooltip,False,array('BorderWidth'=>0,'Padding'=>0)). + html::tooltip($tooltip,False,$ttip_options). ' style="top:0px; left:0px; position:absolute; height:100%; width:100%; z-index:1"') . "\n"; } if ($this->use_time_grid) @@ -1381,7 +1387,7 @@ class calendar_uiviews extends calendar_ui $html = $indent.'
0,'Padding'=>0)). + $popup.' '.html::tooltip($tooltip,False,$ttip_options). '>'."\n".$ie_fix.$html."\n". $indent."
"."\n";