Subversion Repositories wimsdev

Rev

Rev 12974 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1.  
  2. !! \tooltip{texte}{option}{popup text}
  3. !set parms=!slashsubst $parms
  4. !set parmscnt=!itemcnt $parms
  5. !set parm1=!item 1 of $parms
  6. !if $parmscnt=2
  7.   !set text=!item 2 of $parms
  8.   !set option=
  9. !else
  10.   !set text=!item 3 to -1 of $parms
  11.   !set option=!item 2 of $parms
  12. !endif
  13. !set option=!trim $option
  14. !set option=!declosing $option
  15. !if $parm1 = $empty
  16.   !set special_out=$text
  17.   !goto end
  18. !else
  19.   !set text=!replace internal &#59; by ; in $text
  20.  !set text=!replace internal , by , in $text
  21.  !set text=!replace internal $\
  22. $ by $ in $text
  23.   !set option_=!lowercase $option
  24.   !!for small compatibility : use the old tooltip without option if no DURATION
  25.   !! the new option will be the css option (very small use with the old tooltip)
  26.   !if option!=$empty and $option=$option_
  27.     !set class=!getopt class in $option
  28.     !set style=!getopt style in $option
  29.     !if $style!=$empty
  30.       !set style=$ style="$style"
  31.     !endif
  32.   !endif
  33.   !set test_div=!detag $text
  34.   !if $test_div=$text
  35.     !set div0=span
  36.   !else
  37.     !set div0=div
  38.   !endif
  39.   !set special_out=$special_out\
  40.     <$div0 class="wims_tooltip">$parm1\
  41.       <$div0 class="wims_tooltiptext $class" $style>$text</$div0>\
  42.     </$div0>
  43. !endif
  44. :end
  45. $special_out
  46.  
  47. !reset special_out
  48.