mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-22 10:52:00 +02: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).'\'';
|
$ttip = ' onmouseover="Tip(\''.str_replace(array("\n","\r","'",'"'),array('','',"\\'",'"'),$text).'\'';
|
||||||
|
|
||||||
|
$sticky = false;
|
||||||
if (is_array($options))
|
if (is_array($options))
|
||||||
{
|
{
|
||||||
foreach($options as $option => $value)
|
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;
|
return $ttip;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user