Subversion Repositories wimsdev

Rev

Rev 4429 | Rev 12973 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. !! \tooltip{texte}{[option]}{popup text}
  2. !if $parms issametext
  3.    !set special_out= <script type="text/javascript" src="scripts/js/wz_tooltip.js"></script>
  4.    $special_out
  5. !exit
  6. !endif
  7. !set parms=!slashsubst $parms
  8. !set parmscnt=!itemcnt $parms
  9. !set parm1=!item 1 of $parms
  10. !if $parmscnt=2
  11.   !set text=!item 2 of $parms
  12.   !set option=
  13. !else
  14.  !set text=!item 3 to -1 of $parms
  15.  !set option=!item 2 of $parms
  16. !endif
  17.  
  18. !if nojs iswordof $option
  19.   !set option=!replace internal nojs by in $option
  20.   !set special_out=
  21. !else
  22.   !set special_out= <script type="text/javascript" src="scripts/js/wz_tooltip.js"></script>
  23. !endif
  24. !set option=!trim $option
  25. !set option=!declosing $option
  26. !if $option=$empty
  27.   !set option=FONTSIZE, '12pt', ABOVE, 'true'
  28. !endif
  29. !if $parm1 != $empty
  30.  !set text=!replace internal ' by \' in $text
  31. !set text=!replace internal " by in $text
  32.  !set text=!replace internal &#59; by ; in $text
  33.  !set text=!replace internal &#44; by , in $text
  34. !! !set text=!replace internal " by &#quot; in $text
  35. !! !set text=!replace internal < by &#lt; in $text
  36. !! !set text=!replace internal > by &#gt; in $text
  37. !set text=!replace internal $\
  38. $ by  $  in  $text
  39. !set special_out=$special_out\
  40. <span class="tooltip"><a onmouseover="Tip('$text',$option)" onmouseout="UnTip()">$parm1</a></span>
  41. !else
  42. !set special_out=$text
  43. !endif
  44. $special_out
  45.