Subversion Repositories wimsdev

Rev

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

  1. !if $wims_read_parm=help
  2. <script type="text/javascript" src="scripts/js/wz_tooltip.js"></script>
  3. create a tooltip :  the first parameter is the text of the
  4. link,
  5. the third parameter is the text which appears in the tooltip.
  6. the second parameter is text option inside bracket :
  7. Inside brackets, you must put option as in the wz_tooltip.js documentation.
  8. Default is : [FONTSIZE, '12pt', ABOVE, 'true']
  9. If you want only to load the javascript (once time is sufficient for one
  10. html page), don't put any parameter. If you don't want to load the javascript
  11. because you are sure it is already loaded in the html page, add <tt>nojs</tt>
  12. in the second parameter.
  13. You can configure css style class <tt> span.tooltip</tt>.
  14.  
  15. <p><b>Example</b> <br>
  16. <pre>
  17. \special{tooltip click here, ,the word has 5 letters}
  18. \special{tooltip click here,[DURATION, 4000, FONTSIZE, '18pt'], the word has 5 letters}
  19. \special{tooltip click here,[TITLE, 'Some Title', PADDING, 9],un texte}
  20. \special{tooltip }
  21. \special{tooltip\special{tooltip click here,nojs [TITLE, 'Some Title', PADDING, 9],un texte}
  22. </pre>
  23. <p>The possible options for tooltips are  (from www.walterzorn.com)
  24.  <embed>
  25. !read js/tooltip_doc.html
  26. </embed>
  27. !exit
  28. !endif
  29.  
  30. !set parms=$wims_read_parm
  31. !if $parms issametext
  32.    !set special_out= <script type="text/javascript" src="scripts/js/wz_tooltip.js"></script>
  33.    $special_out
  34. !exit
  35. !endif
  36. !set parm1=!item 1 of $parms
  37. !set text=!item 3 to -1 of $parms
  38. !set option=!item  2 of $parms
  39. !if nojs iswordof $option
  40.   !set option=!replace internal nojs by in $option
  41.   !set special_out=
  42. !else
  43.   !set special_out= <script type="text/javascript" src="scripts/js/wz_tooltip.js"></script>  
  44. !endif
  45. !set option=!trim $option
  46. !set option=!declosing $option
  47. !if $option=$empty
  48.   !set option=FONTSIZE, '12pt', ABOVE, 'true'
  49. !endif
  50. !if $parm1 != $empty
  51.  !set text=!replace internal ' by \' in $text
  52. !set text=!replace internal $\
  53. $ by  $  in  $text
  54. !set special_out=$special_out\
  55. <span class=tooltip><a onmouseover="Tip('$text', $option)">$parm1</a></span>
  56. !else
  57. !set special_out=$text
  58. !endif
  59. $special_out
  60.  
  61.