From 97f622c41b84903725a21e55159924c5b5619680 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 21 Oct 2010 23:42:18 +0000 Subject: [PATCH] Fix: delete obsolete ajax tooltip --- htdocs/core/class/html.form.class.php | 94 +++++++++++---------------- 1 file changed, 38 insertions(+), 56 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 8b0730bbf8c..e6aa1832ddb 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -133,16 +133,13 @@ class Form * Show a text and picto with tooltip on text or picto * @param text Text to show * @param htmltext Content html of tooltip, coded into HTML/UTF8 - * @param tooltipon 1=tooltip sur texte, 2=tooltip sur picto, 3=tooltip sur les 2, 4=tooltip sur les 2 et force en Ajax + * @param tooltipon 1=tooltip sur texte, 2=tooltip sur picto, 3=tooltip sur les 2 * @param direction -1=Le picto est avant, 0=pas de picto, 1=le picto est apres * @param img Code img du picto (use img_xxx() function to get it) - * @param i Numero of tooltip - * @param width Width of tooltip - * @param shiftX Shift of tooltip * @return string Code html du tooltip (texte+picto) * @see Use function textwithpicto if you can. */ - function textwithtooltip($text,$htmltext,$tooltipon=1,$direction=0,$img='',$i=1,$width='200',$shiftX='10') + function textwithtooltip($text,$htmltext,$tooltipon=1,$direction=0,$img='') { global $conf; @@ -159,60 +156,45 @@ class Form $htmltext=str_replace("
\n","
",$htmltext); $htmltext=str_replace("\n","",$htmltext); - if ($conf->use_javascript_ajax && $tooltipon == 4) + if ($conf->use_javascript_ajax) { - $s = '
'."\n"; - $s.= $text; - $s.= '
'."\n"; - $s.= ''."\n"; - $s.= ''."\n"; - } - else - { - if ($conf->use_javascript_ajax) - { - $htmltext=str_replace('"',""",$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()"'; - } + $htmltext=str_replace('"',""",$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()"'; + } + } + + $s=""; + $s.=''; + if ($direction > 0) + { + if ($text != '') + { + $s.=''.$text; + if ($direction) $s.=' '; + $s.=''; + } + if ($direction) $s.=''.$img.''; + } + else + { + if ($direction) $s.=''.$img.''; + if ($text != '') + { + $s.=''; + if ($direction) $s.=' '; + $s.=$text.''; + } + } + $s.='
'; - $s=""; - $s.=''; - if ($direction > 0) - { - if ($text != '') - { - $s.=''.$text; - if ($direction) $s.=' '; - $s.=''; - } - if ($direction) $s.=''.$img.''; - } - else - { - if ($direction) $s.=''.$img.''; - if ($text != '') - { - $s.=''; - if ($direction) $s.=' '; - $s.=$text.''; - } - } - $s.='
'; - } return $s; }