Subversion Repositories wimsdev

Rev

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

  1. !if $wims_read_parm=help
  2.   !read help/$lang/special/tooltip.phtml
  3.   !exit
  4. !endif
  5.  
  6. !set parms=$wims_read_parm
  7. !if $parms issametext
  8.   !set special_out= <script type="text/javascript" src="scripts/js/wz_tooltip.js"></script>
  9.    $special_out
  10.   !exit
  11. !endif
  12. !set parms=!slashsubst $parms
  13. !set parmscnt=!itemcnt $parms
  14. !set parm1=!item 1 of $parms
  15. !set text=!item 3 to -1 of $parms
  16. !if $text=$empty
  17.   !set text=!item 2 of $parms
  18. !else
  19.   !set option=!item 2 of $parms
  20. !endif
  21. !if nojs iswordof $option
  22.   !set option=!replace internal nojs by in $option
  23.   !set special_out=
  24. !endif
  25. !set option=!trim $option
  26. !set option=!declosing $option
  27. !if $parm1 = $empty
  28.   !set special_out=$text
  29.   !goto end
  30. !else
  31.   !set text=!replace internal &#59; by ; in $text
  32.  !set text=!replace internal &#44; by , in $text
  33.  !set text=!replace internal $\
  34. $ by $ in $text
  35.   !if DURATION notin $option
  36.     !set option_=!lowercase $option
  37.     !!for small compatibility : use the old tooltip without option if no DURATION
  38.     !! the new option will be the css option (very small use with the old tooltip)
  39.     !if option!=$empty and $option=$option_
  40.       !set class=!getopt class in $option
  41.       !set style=!getopt style in $option
  42.       !if $style!=$empty
  43.       !set style=$ style="$style"
  44.       !endif
  45.     !endif
  46.     !set test_div=!detag $text
  47.     !if $test_div=$text
  48.       !set div0=span
  49.     !else
  50.       !set div0=div
  51.     !endif
  52.     !set special_out=$special_out\
  53.       <$div0 class="wims_tooltip">$parm1\
  54.         <$div0 class="wims_tooltiptext $class" $style>$text</$div0>\
  55.       </$div0>
  56.   !else
  57.     !set text=!replace internal ' by \' in $text
  58.    !set text=!replace internal " by in $text
  59.    !set text=!replace internal $\
  60. $ by $ in $text
  61.    !set special_out=<script type="text/javascript" src="scripts/js/wz_tooltip.js"></script>
  62.    !set special_out=$special_out\
  63.    <span class="<tooltip"><a onmouseover="Tip('$text', $option)" onmouseout="UnTip()">$parm1</a></span>
  64.  !endif
  65. !endif
  66. :end
  67. $special_out
  68.  
  69. !reset special_out
  70.