Subversion Repositories wimsdev

Rev

Rev 15457 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
700 bpr 1
!set anstype=yes
2
!set anstyle=symtext
3
!set ans_reaccent=yes
3851 bpr 4
!set ans_require=
700 bpr 5
 
6
!if $wims_read_parm=def
12532 bpr 7
  !exit
700 bpr 8
!endif
1018 bpr 9
 
700 bpr 10
!if debug iswordof $m_oefenv and ?analyze notin $(replygood$i)
12532 bpr 11
  !set replydefaulted=yes
12
  !if $oef_default=yes
13
   !set r_=!row 1 of $(replygood$i)
14
   !set r_=!translate | to $\
700 bpr 15
$ in $r_
12532 bpr 16
    !default reply$i=!line 1 of $r_
17
  !endif
700 bpr 18
!endif
1018 bpr 19
 
700 bpr 20
!if $wims_read_parm!=noprompt
12532 bpr 21
  <tr><td><label for="reply$i">$(replyname$i)</label></td><td>
700 bpr 22
!endif
23
!set keyboard=!getopt keyboard in $(replyoption$i)
24
!set style=!getopt style in $(replyoption$i)
25
!set style=!replace internal $ $ by ; in $style
26
!set style=!replace internal @ by $ $ in $style
1018 bpr 27
 
28
!set inputoption=!replace internal $	$ by $\
29
$ in $inputsize
30
!set inputsize=!line 1 of $inputoption
31
!set inputoption=!line 2 to -1 of $inputoption
32
!set option=!line 1 of $inputoption
33
!if $option issametext default
34
  !set option=class="wims_oef_input"
35
  !set inputoption=!line 2 to -1 of $inputoption
36
!endif
37
!if $inputoption!=
12532 bpr 38
  !set inputoption=$option $inputoption
1018 bpr 39
!else
12532 bpr 40
  !default inputoption=$option style="font-size:18px;background-color:#e8ffff;border:1px solid #3333CC;"
1018 bpr 41
!endif
42
!default style=color:black;border:1px solid grey;margin:1px;background-color:lightgrey;font-weight:bolder;font-size:100%
43
 
44
!set inputsize=!translate x to , in $inputsize
45
!set inputsize=!items2words $inputsize
46
!distribute words $inputsize into sizeh,sizev
47
!bound sizeh between integer 10 and 60 default 20
48
!bound sizev between integer 1 and 20 default 1
49
 
50
 
3548 bpr 51
!if universal isin $keyboard
12532 bpr 52
  !set key_lang=!replace internal _ by , in $keyboard
53
  !set key_lang=!item 2 of $key_lang
54
  !reset wims_html_header
55
  !read js/keyboard.phtml $key_lang
56
  $wims_html_header
1018 bpr 57
  !goto universal
58
!endif
700 bpr 59
!if $keyboard=si
12532 bpr 60
  !set keyboard=&#193; &#260; &#196; &#201; &#280; &#282; &#205;\
700 bpr 61
&#225; &#261; &#228; &#233; &#281; &#283; &#237;\
62
&#211; &#244; &#250; &#366; &#221; &#268;\
63
&#243; &#212; &#218; &#367; &#253; &#269;\
64
&#271; &#313; &#327; &#340; &#344; &#352; &#381;\
65
&#357; &#314; &#328; &#341; &#345; &#353;\
66
 
12532 bpr 67
  !goto kb
700 bpr 68
!endif
69
 
70
!if $keyboard=es
12532 bpr 71
  !set keyboard=&#193; &#201; &#205; &#209; &#211; &#218; &#220; &#191;\
700 bpr 72
&#225; &#233; &#237; &#241; &#243; &#250; &#252; &#161;
12532 bpr 73
  !goto kb
700 bpr 74
!endif
75
 
76
!if $keyboard=ru
12532 bpr 77
  !set keyboard=&#1040; &#1072; &#1041; &#1073; &#1042; &#1074; &#1043; &#1075; &#1044; &#1076; \
746 bpr 78
&#1045; &#1077; &#1025; &#1105; &#1046; &#1078; &#1047; &#1079; &#1048; &#1080;\
79
&#1049; &#1081; &#1050; &#1082; &#1051; &#1083; &#1052; &#1084; &#1053; &#1085;\
80
&#1054; &#1086; &#1055; &#1087; &#1056; &#1088; &#1057; &#1089; &#1058; &#1090;\
81
&#1059; &#1091; &#1060; &#1092; &#1061; &#1093; &#1062; &#1094;\
82
&#1063; &#1095; &#1064; &#1096; &#1065; &#1097; &#1066; &#1098; \
700 bpr 83
&#1067; &#1099; &#1068; &#1100; &#1069; &#1101; &#1070; &#1102; &#1071; &#1103;
12532 bpr 84
  !goto kb
700 bpr 85
!endif
86
 
87
!if $keyboard=de
12532 bpr 88
  !set keyboard= &#196; &#228; &#201; &#233; &#214; &#246; &#220; &#252; &#223;
89
  !goto kb
700 bpr 90
!endif
91
 
92
!if $keyboard=el
4751 bpr 93
 !set keyboard= &#913; &#914; &#915; &#916; &#917; &#918; &#919; &#920; &#921; &#922;\
94
 &#945; &#946; &#947; &#948; &#949; &#950; &#951; &#952; &#953; &#954;\
95
&#923; &#924; &#925; &#926; &#927; &#960; &#961;  &#931; \
96
&#955; &#956; &#957; &#958; &#959; &#929; &#963; &#932;\
700 bpr 97
&#964; &#933; &#965; &#934; &#966; &#935; &#967; &#936; &#968; &#937; &#969;
98
 
99
!!&#x3A0; &#x3A0; &#x3C4;\
100
 
101
!endif
102
!if $keyboard=pl
15457 bpr 103
  !set keyboard=&#260; &#280; &#211; &#262; &#321; &#323; &#346; &#377; &#379; \
7691 bpr 104
  &#261; &#281; &#243; &#263; &#322; &#324; &#347; &#378; &#380;
12532 bpr 105
  !goto kb
700 bpr 106
!endif
107
 
108
!if $keyboard=it
12532 bpr 109
  !set keyboard=&#192; &#193; &#200; &#201; &#204; &#205; &#210; &#211; &#217; &#218;\
700 bpr 110
 &#224; &#225; &#232; &#233; &#236; &#237; &#242; &#243; &#249; &#250;
15457 bpr 111
  !goto kb
700 bpr 112
!endif
113
 
114
!if $keyboard=en_ipa
15457 bpr 115
  !set keyboard=&#593; &#230; &#601; &#618; &#650; &#652; e &#594; \
5683 bpr 116
 &#593;&#58; &#604; &#604;: &#594;: i: u: &#596;:\
700 bpr 117
 &#331; &#643; &#952; &#240; &#658; &#734; &#679; &#676;\
118
 e&#618; a&#618; &#596;&#618; a&#650; &#601;&#650; &#618;&#601; e&#601;
119
 
120
!!&#171; &#187; &#128; &#649; &#248; &#592; &#655; &#231; &#946;
121
!!&#611; &#654; &#626; &#641; &#613; &#660;
12532 bpr 122
  !goto kb
700 bpr 123
!endif
1449 bpr 124
!if $keyboard=ipa
12532 bpr 125
  !set keyboard= &#593; &#592; &#594; &#230; &#595; &#665; &#946; &#596; &#597; &#231; &#599; &#598; &#240; &#676; &#601; &#600; &#602; &#603; &#604; \
1449 bpr 126
&#605; &#606;&#607; &#644; &#609; &#608; &#610; &#610; &#667; &#614; &#615; &#295; &#613; &#668; &#616; &#618; &#669; &#621; &#620; &#619; &#622; &#671;\
127
&#625; &#623; &#624; &#331; &#627; &#626; &#628; &#248; &#629; &#632; &#952; &#339; &#630; &#664; &#633; &#634; &#638; &#635; &#640; &#641; &#637;\
128
&#642; &#643; &#648; &#679; &#649; &#651; &#650; &#652; &#611; &#612; &#653; &#967; &#654; &#655; &#657; &#656; &#658;\
7691 bpr 129
&#660; &#673; &#661; &#674; &#448; &#449; &#450; &#451;
12532 bpr 130
  !goto kb
1449 bpr 131
!endif
132
 
133
!if $keyboard=fr_ipa
15457 bpr 134
  !set keyboard= i e &#603; a &#593; &#596; o u y &#248;  &#339; &#601; \
3253 bpr 135
&#603;&#771; &#593;&#771; &#596;&#771; j w &#613; [ ]\
136
p b t d k g v f\
137
s z &#643; &#658; l m n &#626; &#640;      \
1449 bpr 138
 
12532 bpr 139
  !! &#627;
140
  !goto kb
1449 bpr 141
!endif
7388 bpr 142
!if $keyboard=braille
12532 bpr 143
  !set prefix=10
144
  !set keyboard=&#241; &#243; &#249; &#265; &#257; &#251; &#267; &#259; &#250; &#266; \
7388 bpr 145
&#245; &#247; &#253; &#269; &#261; &#255; &#271; &#263; &#254; &#270; &#277; \
146
&#279; &#298; &#285; &#301; &#293; &#300;&#241; &#300;&#243; &#300;&#249; &#300;&#265; &#300;&#257; &#300;&#251; &#300;&#267; \
147
&#300;&#259; &#300;&#250; &#300;&#266; &#294; &#294; &#242; &#262; &#252; &#276; \
148
&#290; &#278; &#246; &#278; &#244; &#290; &#290;
1449 bpr 149
 
12532 bpr 150
  !goto kb
7388 bpr 151
!endif
152
 
700 bpr 153
:kb
7388 bpr 154
 
700 bpr 155
!set keyboard=!declosing $keyboard
156
!set keyboard=!rows2lines $keyboard
157
!set keyboard=!lines2rows $keyboard
158
!set keyboard=!singlespace $keyboard
159
!set keyboard=!rows2lines $keyboard
7388 bpr 160
!if $prefix!=
161
  !set keyboard=!replace internal # by #$prefix in $keyboard
162
!endif
163
 
700 bpr 164
!set cnt_kb=!linecnt $keyboard
165
 
13351 obado 166
<script>
6361 bpr 167
/*<![CDATA[*/
700 bpr 168
var browser="";
169
var obj=new Object();
170
!for u = 1 to $cnt_kb
12532 bpr 171
  !set l=!line $u of $keyboard
172
  !set l=!trim $l
173
  !set l$u = !items2words $l
700 bpr 174
!next
175
 
176
!if $cnt_kb= 0
177
  !set cnt_kb=4
178
!endif
179
 
180
!for u = 1 to $cnt_kb
12532 bpr 181
  var l$u= "$(l$u)" ;
700 bpr 182
!next
183
 
184
function checkBrowser()
185
	{
186
	if(navigator.appName=='Microsoft Internet Explorer')
187
		{browser='I';}
188
	else if(navigator.appName=='Netscape')
189
		{browser='N';}
190
	return browser;
191
	}
192
function addText(text)
193
	{
194
	obj=document.forms['replyform'].elements['reply$i'];
195
	if(checkBrowser()=="I")
196
	 {
197
		var start=obj.selectionStart;
198
		var beg=obj.value.substring(0, start);
199
		var end=obj.value.substring(start);
200
		obj.value=end+text+beg;
201
		obj.selectionStart=obj.selectionEnd=start+text.length;
7691 bpr 202
		}
700 bpr 203
	else
204
		{
205
		var start=obj.selectionStart;
206
		var beg=obj.value.substring(0, start);
207
		var end=obj.value.substring(start);
208
		obj.value=beg+text+end;
209
		obj.selectionStart=obj.selectionEnd=start+text.length;
210
		obj.focus();
211
		}
212
	}
213
 
214
function writeChar(win,string)
215
	{
216
	var buttons=string.split(' ');
217
	var i;
218
	for(i=0;i<buttons.length;i++)
219
		{
17171 bpr 220
		document.write('<input style="{$style}" type="button" value="'+buttons[i]+'" id="'+buttons[i]+'" onclick="addText(\''+buttons[i]+'\');">');
700 bpr 221
		}
222
	}
6361 bpr 223
/*]]>*/
700 bpr 224
</script>
6134 bpr 225
<div class="wimscenter">
13351 obado 226
<script>
6361 bpr 227
/*<![CDATA[*/
700 bpr 228
!for a = 1 to $cnt_kb
229
  writeChar(self,l$a);
17171 bpr 230
  document.write('<br>');
700 bpr 231
!next
6361 bpr 232
/*]]>*/
700 bpr 233
</script>
6134 bpr 234
</div>
1018 bpr 235
 
236
:universal
6134 bpr 237
<div class="wimscenter">
1018 bpr 238
<textarea name="reply$i" rows="$sizev" cols="$sizeh"  $wims_id $inputoption>$(reply$i)</textarea>
6134 bpr 239
</div>
700 bpr 240
 
241
!!data= decodeURIComponent(data);
5644 bpr 242
!if $wims_read_parm!=noprompt
243
 </td></tr>
244
!endif
700 bpr 245
!reset inputsize