mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 00:58:55 +01:00
handing argument types for wz_tooltips and only using UnTip(), if tooltip is NOT sticky
This commit is contained in:
parent
27c2de1986
commit
49b237ec72
@ -113,14 +113,29 @@ class html
|
||||
|
||||
$ttip = ' onmouseover="Tip(\''.str_replace(array("\n","\r","'",'"'),array('','',"\\'",'"'),$text).'\'';
|
||||
|
||||
$sticky = false;
|
||||
if (is_array($options))
|
||||
{
|
||||
foreach($options as $option => $value)
|
||||
{
|
||||
$ttip .= ','.strtoupper($option).','.$value;
|
||||
$option = strtoupper($option);
|
||||
if ($option == 'STICKY') $sticky = (bool)$value;
|
||||
|
||||
switch(gettype($value))
|
||||
{
|
||||
case 'boolean':
|
||||
$value = $value ? 'true' : 'false';
|
||||
break;
|
||||
case 'string':
|
||||
$value = "'$value'";
|
||||
break;
|
||||
}
|
||||
$ttip .= ','.$option.','.$value;
|
||||
}
|
||||
}
|
||||
$ttip .= ')" onmouseout="UnTip()"';
|
||||
$ttip .= ')"';
|
||||
|
||||
if (!$sticky) $ttip .= ' onmouseout="UnTip()"';
|
||||
|
||||
return $ttip;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user