small improvements regarding the tooltip behavior for calendar

This commit is contained in:
Klaus Leithoff 2010-02-02 11:23:11 +00:00
parent 6e258109d8
commit 995940eeb5
2 changed files with 10 additions and 5 deletions

View File

@ -1351,12 +1351,19 @@ class calendar_uiviews extends calendar_ui
'color' => $color, 'color' => $color,
); );
} }
$draggableID = 'drag_'.$event['id'].'_O'.$event['owner'].'_C'.$owner;
$ttip_options = array( $ttip_options = array(
'BorderWidth' => 0, // as we use our round borders 'BorderWidth' => 0, // as we use our round borders
'Padding' => 0, 'Padding' => 0,
'Sticky' => true, // make long tooltips scrollable 'Sticky' => true, // make long tooltips scrollable
'ClickClose' => true, 'ClickClose' => true,
'FollowMouse' => false, 'FOLLOWMOUSE' => false,
'DELAY' => 600,
'FIX' => "['".$draggableID."',10,-5]",
'SHADOW' => false,
'WIDTH' => -400,
); );
$ie_fix = ''; $ie_fix = '';
if (html::$user_agent == 'msie') // add a transparent image to make the event "opaque" to mouse events if (html::$user_agent == 'msie') // add a transparent image to make the event "opaque" to mouse events
@ -1383,8 +1390,6 @@ class calendar_uiviews extends calendar_ui
$style = 'position: relative; margin-top: 3px;'; $style = 'position: relative; margin-top: 3px;';
} }
$draggableID = 'drag_'.$event['id'].'_O'.$event['owner'].'_C'.$owner;
$html = $indent.'<div id="'.$draggableID.'" class="calEvent'.($is_private ? 'Private' : '').' '.$status_class. $html = $indent.'<div id="'.$draggableID.'" class="calEvent'.($is_private ? 'Private' : '').' '.$status_class.
'" style="'.$style.' border-color: '.$headerbgcolor.'; background: '.$background.'; z-index: 20;"'. '" style="'.$style.' border-color: '.$headerbgcolor.'; background: '.$background.'; z-index: 20;"'.
$popup.' '.html::tooltip($tooltip,False,$ttip_options). $popup.' '.html::tooltip($tooltip,False,$ttip_options).

View File

@ -127,7 +127,7 @@ class html
$value = $value ? 'true' : 'false'; $value = $value ? 'true' : 'false';
break; break;
case 'string': case 'string':
$value = "'$value'"; if (stripos($value,"'")===false) $value = "'$value'";
break; break;
} }
$ttip .= ','.$option.','.$value; $ttip .= ','.$option.','.$value;
@ -135,7 +135,7 @@ class html
} }
$ttip .= ')"'; $ttip .= ')"';
if (!$sticky) $ttip .= ' onmouseout="UnTip()"'; $ttip .= ' onmouseout="UnTip()"';
return $ttip; return $ttip;
} }