New: use jQuery tooltip

This commit is contained in:
Regis Houssin 2010-10-22 08:24:08 +00:00
parent 3990d8d153
commit 63b391a349

View File

@ -145,8 +145,7 @@ class Form
if (! $htmltext) return $text; if (! $htmltext) return $text;
$paramfortooltiptext =''; $paramfortooltip ='';
$paramfortooltippicto ='';
// Sanitize tooltip // Sanitize tooltip
$htmltext=str_replace("\\","\\\\",$htmltext); $htmltext=str_replace("\\","\\\\",$htmltext);
@ -159,26 +158,7 @@ class Form
if ($conf->use_javascript_ajax) if ($conf->use_javascript_ajax)
{ {
$htmltext=str_replace('"',""",$htmltext); $htmltext=str_replace('"',""",$htmltext);
/* $paramfortooltip.=' title="'.$htmltext.'"';
if ($tooltipon==1 || $tooltipon==3)
{
$paramfortooltiptext.=' onmouseover="showtip(\''.$htmltext.'\')"';
$paramfortooltiptext.=' onMouseout="hidetip()"';
}
if ($tooltipon==2 || $tooltipon==3)
{
$paramfortooltippicto.=' onmouseover="showtip(\''.$htmltext.'\')"';
$paramfortooltippicto.=' onMouseout="hidetip()"';
}
*/
if ($tooltipon==1 || $tooltipon==3)
{
$paramfortooltiptext.=' title="'.$htmltext.'"';
}
if ($tooltipon==2 || $tooltipon==3)
{
$paramfortooltippicto.=' title="'.$htmltext.'"';
}
} }
$s=""; $s="";
@ -187,18 +167,18 @@ class Form
{ {
if ($text != '') if ($text != '')
{ {
$s.='<td'.$paramfortooltiptext.'>'.$text; $s.='<td'.$paramfortooltip.'>'.$text;
if ($direction) $s.='&nbsp;'; if ($direction) $s.='&nbsp;';
$s.='</td>'; $s.='</td>';
} }
if ($direction) $s.='<td'.$paramfortooltippicto.' valign="top" width="14">'.$img.'</td>'; if ($direction) $s.='<td'.$paramfortooltip.' valign="top" width="14">'.$img.'</td>';
} }
else else
{ {
if ($direction) $s.='<td'.$paramfortooltippicto.' valign="top" width="14">'.$img.'</td>'; if ($direction) $s.='<td'.$paramfortooltip.' valign="top" width="14">'.$img.'</td>';
if ($text != '') if ($text != '')
{ {
$s.='<td'.$paramfortooltiptext.'>'; $s.='<td'.$paramfortooltip.'>';
if ($direction) $s.='&nbsp;'; if ($direction) $s.='&nbsp;';
$s.=$text.'</td>'; $s.=$text.'</td>';
} }