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