File: textcomp.input

package info (click to toggle)
wims 2%3A4.29a%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 185,704 kB
  • sloc: xml: 366,687; javascript: 120,570; ansic: 62,341; java: 62,170; sh: 7,744; perl: 3,937; yacc: 3,217; cpp: 1,915; lex: 1,805; makefile: 1,084; lisp: 914; pascal: 601; python: 520; php: 318; asm: 7
file content (94 lines) | stat: -rw-r--r-- 2,366 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
!set anstype=yes
!set anstyle=symtext
!set ans_require=
!if $wims_read_parm=def
  !exit
!endif
!set lenlimit=40
!set imgs=$(replygood$i)
!set imgs=!translate internal | to , in $imgs
!set imgs=!rows2lines $imgs
!set atest=!line 1 of $imgs
!if ?analyze iswordof $atest
  !set imgs=!line 2 to -1 of $imgs
!endif
!set imgs=!lines2items $imgs
!set imgs=!singlespace $imgs
!set imgs=!nonempty items $imgs
!set imgs=!listuniq $imgs
!set imgs=!sort nocase items $imgs
!set imgcnt=!itemcnt $imgs
!set imgarr=!replace internal , by "," in "$imgs"
!set imgarr=!replace internal \ by \\ in $imgarr
!set wims_ins_alt=none
!set backslash_back=$wims_backslash_insmath
!set wims_backslash_insmath=

<script>
/*<![CDATA[*/
 var imgcnt=0;
 imgs=new Array($imgarr);
 strs=new Array($lenlimit+1);
 strs[0]="";

 function addone(t) {
  if(t<0 || imgcnt>=$lenlimit) return;
  if(imgcnt>0) strs[imgcnt+1]=strs[imgcnt]+" "+imgs[t];
  else strs[imgcnt+1]=imgs[t];
  imgcnt++;
  document.forms['replyform'].reply$i.value=strs[imgcnt];
 }

 function lockdata() {
  document.forms['replyform'].reply$i.value=strs[imgcnt];
 }

 function backone() {
  if(imgcnt<1) return;
  imgcnt--;
  document.forms['replyform'].reply$i.value=strs[imgcnt];
 }

 function cleanall() {
  if(imgcnt<1) return;
  document.forms['replyform'].reply$i.value="";
  imgcnt=0;
 }
/*]]>*/
</script>
!set wims_backslash_insmath=$backslash_back

!if $wims_read_parm!=noprompt
  <tr><td align="right"><label for="reply$i">$(replyname$i)</label><td>
!endif
!bound inputsize between integer 1 and 100 default 50
<textarea id="reply$i" rows="3" cols="$inputsize" name="reply$i" readonly="readonly"
wrap onchange="lockdata(); onfocus=this.blur()";></textarea>
!reset inputsize

!if $wims_read_parm!=noprompt
  <tr><td colspan="2">
!else
  <p>
!endif
!if $module_language=fr
 Composez votre rponse en cliquant sur les mots ci-dessous.
 !goto cont
!endif
Compose your reply by clicking on the words below.
:cont
<br>
!set instex_color=blue
!for i_=1 to $imgcnt
 !set src=!item $i_ of $imgs
 <a href="#" onclick="addone($i_-1)">$src</a>&nbsp;
!next i_
!set instex_color=black
<sup>
<a href="#" onclick="backone()"><img height="20" border="1" align="middle"
 src="gifs/arrows/left3.32.gif" alt="left"></a>
<a href="#" onclick="cleanall()"><img height="20" border="1" align="middle"
 src="gifs/reset.gif" alt="reset"></a>
</sup>