Subversion Repositories wimsdev

Rev

Rev 7323 | Rev 12974 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7323 Rev 12973
Line -... Line 1...
-
 
1
 
1
!! \tooltip{texte}{[option]}{popup text}
2
!! \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
3
!set parms=!slashsubst $parms
8
!set parmscnt=!itemcnt $parms
4
!set parmscnt=!itemcnt $parms
9
!set parm1=!item 1 of $parms
5
!set parm1=!item 1 of $parms
10
!if $parmscnt=2
6
!if $parmscnt=2
11
  !set text=!item 2 of $parms
7
  !set text=!item 2 of $parms
12
  !set option=
8
  !set option=
13
!else
9
!else
14
 !set text=!item 3 to -1 of $parms
10
  !set text=!item 3 to -1 of $parms
15
 !set option=!item 2 of $parms
11
  !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
12
!endif
24
!set option=!trim $option
13
!set option=!trim $option
25
!set option=!declosing $option
14
!set option=!declosing $option
26
!if $option=$empty
15
!if $parm1 = $empty
27
  !set option=FONTSIZE, '12pt', ABOVE, 'true'
16
  !set special_out=$text
28
!endif
17
  !goto end
29
!if $parm1 != $empty
18
!else
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
19
  !set text=!replace internal &#59; by ; in $text
33
  !set text=!replace internal &#44; by , in $text
20
  !set text=!replace internal &#44; by , in $text
34
!! !set text=!replace internal " by &#quot; 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>!else
35
!! !set text=!replace internal < by &#lt; in $text
43
    !set text=!replace internal ' by \' in $text
36
!! !set text=!replace internal > by &#gt; in $text
44
    !set text=!replace internal " by in $text
37
 !set text=!replace internal $\
45
    !set text=!replace internal $\
38
$ by  $  in  $text
46
$ by $ in $text
-
 
47
    !set special_out=<script type="text/javascript" src="scripts/js/wz_tooltip.js"></script>
39
 !set special_out=$special_out\
48
    !set special_out=$special_out\
40
 <span class="tooltip"><a onmouseover="Tip('$text',$option)" onmouseout="UnTip()">$parm1</a></span>
49
    <span class="<tooltip"><a onmouseover="Tip('$text', $option)" onmouseout="UnTip()">$parm1</a></span>
41
 !else
50
  !endif
42
 !set special_out=$text
-
 
43
 !endif
51
!endif
44
$special_out
52
$special_out
-
 
53
 
-
 
54
!reset special_out