Rev 6722 | Rev 13384 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
20 | reyssat | 1 | !if $wims_read_parm=$empty |
2 | !exit |
||
3 | !endif |
||
4 | !if $wims_read_parm=help |
||
3298 | bpr | 5 | !read help/$lang/special/imagefill.phtml |
6 | !exit |
||
150 | bpr | 7 | !endif |
3298 | bpr | 8 | |
6574 | bpr | 9 | !set parm=!replace internal $ $, by , in $wims_read_parm |
10 | !set parm=!replace internal $ $ by $ ; $ in $parm |
||
20 | reyssat | 11 | !set parm1=!row 1 of $parm |
6151 | bpr | 12 | |
20 | reyssat | 13 | !distribute items $parm1 into imgurl,bigsize,smallsize |
6574 | bpr | 14 | |
20 | reyssat | 15 | !set bigsize=!translate x, to $ $ in $bigsize |
6574 | bpr | 16 | |
20 | reyssat | 17 | !distribute words $bigsize into bigsizex,bigsizey |
18 | !set ssize=!translate x, to $ $ in $smallsize |
||
19 | !distribute words $ssize into ssizex,ssizey |
||
20 | !set parm2=!row 2 to -1 of $parm |
||
21 | !set parm2=!nonempty rows $parm2 |
||
22 | !set icnt=!rowcnt $parm2 |
||
23 | |||
24 | !if $printing=yes or $cmd=hint |
||
6262 | bpr | 25 | <img src="$imgurl" alt="$imgurl" style="width:$(bigsizex)px;height:$(bigsizey)px;vertical-align:text-top" /> |
20 | reyssat | 26 | !exit |
27 | !endif |
||
28 | |||
29 | !set fill_reposition=yes |
||
30 | !reset flist hlist |
||
31 | !default fillcnt=0 |
||
32 | !set oldfillcnt=$[$fillcnt+1] |
||
33 | !for t=1 to $icnt |
||
34 | !set l=!row $t of $parm2 |
||
35 | !set l=!translate x to , in $l |
||
1804 | bpr | 36 | !distribute item $l into n_,x_,y_,sizei |
37 | !default sizei=1 |
||
20 | reyssat | 38 | !set n_=!text select 0123456789()+-*/ in $n_ |
39 | !set n_=$[$n_] |
||
40 | !bound n_ between integer 1 and 100 default $ |
||
41 | !if $n_!=$empty and r$n_ notitemof $embedded and\ |
||
150 | bpr | 42 | $(replytype$n_) iswordof clickfill dragfill |
20 | reyssat | 43 | !default wims_fill_type=$(replytype$n_) |
44 | !set embedded=!append item r$n_ to $embedded |
||
45 | !set flist=!append item $n_ to $flist |
||
46 | !set i=$n_ |
||
1804 | bpr | 47 | !set inputsize=$smallsize $sizei |
20 | reyssat | 48 | !read anstype/fill.inc noshow |
6262 | bpr | 49 | !set hlist=$hlist<input type="hidden" name="reply$n_" value="" /> |
20 | reyssat | 50 | !set fill_namelist=!append item $oldfillcnt to $fill_namelist |
51 | !increase fillcnt |
||
52 | !set serial_$fillcnt=$i |
||
53 | !set reposition_$fillcnt=$x_,$y_ |
||
54 | !endif |
||
55 | !next t |
||
56 | |||
6262 | bpr | 57 | <a id="fill$oldfillcnt"><img src="gifs/transparent.gif" alt="transparent" |
58 | style="width:$(bigsizex)px; height:$(bigsizey)px;vertical-align:text-top" /></a> |
||
20 | reyssat | 59 | !set thisjs=var f_bigimage$oldfillcnt=new DynLayer();\ |
1157 | bpr | 60 | f_bigimage$oldfillcnt.setAnchor({topA:'fill$oldfillcnt',leftA:'fill$oldfillcnt',\ |
20 | reyssat | 61 | stretchH:$bigsizex,stretchV:$bigsizey});\ |
62 | dynapi.document.addChild(f_bigimage$oldfillcnt);\ |
||
6557 | bpr | 63 | f_bigimage$oldfillcnt.setHTML('<img src="$imgurl" style="width:$(bigsizex)px; height:$(bigsizey)px" alt="" />'); |
20 | reyssat | 64 | !if $q_form=yes |
65 | $hlist |
||
66 | !set fillafter_js=$fillafter_js\ |
||
67 | $thisjs |
||
68 | !else |
||
69 | !distribute item 40C040,FF4040 into colorr_good,colorr_bad |
||
70 | !set colorr_ana=C8C8E0 |
||
71 | !distribute item 20,15 into Sx,Sy |
||
6262 | bpr | 72 | !set cc1='<table border="0" cellpadding="0" cellspacing="0" style="width:$(ssizex)px;height:$(ssizey)px"><tr><td align="center">' |
1157 | bpr | 73 | !set cc2='<\/td><\/tr><\/table>' |
20 | reyssat | 74 | !set wims_ins_alt=none |
75 | !read js/dynapi3.phtml |
||
6151 | bpr | 76 | <script type="text/javascript"> |
6722 | bpr | 77 | /*<![CDATA[*/ |
20 | reyssat | 78 | dynapi.onLoad(function() { |
79 | $thisjs |
||
80 | !for c=$oldfillcnt to $fillcnt |
||
81 | !set i=$(serial_$c) |
||
82 | !set embcnt=!positionof item r$i in $embedded |
||
83 | !default reply_$i=$(reply$i) |
||
84 | !set p_=$(reply_$i) |
||
85 | !set tt=!word 1 of $(replygood$i) |
||
86 | !if $tt!=?analyze |
||
7179 | bpr | 87 | !set cl=#$(colorr_$(diareply$i)) |
20 | reyssat | 88 | !else |
7179 | bpr | 89 | !if transparent iswordof $wims_fill_option |
90 | !set cl= |
||
91 | !else |
||
92 | !set cl=#$colorr_ana |
||
93 | !endif |
||
20 | reyssat | 94 | !set embedded_analyze=!append item $i to $embedded_analyze |
95 | !! !set embedded_bracket=$embedded_bracket [$embcnt] |
||
96 | !endif |
||
97 | !set replyname$i=[$embcnt] |
||
98 | !distribute item $(reposition_$c) into rx,ry |
||
99 | var f_l$c=new DynLayer(); |
||
100 | var f_t$c=new DynLayer(); |
||
101 | f_l$c.setAnchor({topA:'fill$oldfillcnt',leftA:'fill$oldfillcnt', |
||
1804 | bpr | 102 | left:$rx,top:$ry,stretchH:$sizei*$ssizex,stretchV:$ssizey}); |
20 | reyssat | 103 | dynapi.document.addChild(f_l$c); |
7179 | bpr | 104 | f_l$c.setBgColor('$cl'); |
20 | reyssat | 105 | !set ss=!replace internal " by \" in $(reply$i) |
1804 | bpr | 106 | !set ss=!replace internal , by in $(reply$i) |
1157 | bpr | 107 | !set ss=!replace internal ' by \' in $ss |
108 | f_l$c.setHTML($cc1+'$ss'+$cc2); |
||
20 | reyssat | 109 | !if $tt!=?analyze |
110 | f_t$c.setAnchor({topA:'fill$oldfillcnt',leftA:'fill$oldfillcnt', |
||
7179 | bpr | 111 | left:$[$rx+$ssizex-4],top:$ry,stretchH:$Sx,stretchV:$Sy}); |
20 | reyssat | 112 | dynapi.document.addChild(f_t$c); |
6262 | bpr | 113 | f_t$c.setHTML('<small>[$embcnt]<\/small>'); |
20 | reyssat | 114 | f_t$c.setZIndex(100); |
115 | !endif |
||
116 | !next c |
||
117 | }); |
||
6722 | bpr | 118 | /*]]>*/ |
20 | reyssat | 119 | </script> |
120 | !endif |