-
Notifications
You must be signed in to change notification settings - Fork 0
/
morfixEnglishCanvas.xml
271 lines (204 loc) · 10.7 KB
/
morfixEnglishCanvas.xml
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="__MSG_title__" title_url="http://www.morfix.co.il/" description="__MSG_description__" author="Jeremy Glassenberg" author_email="[email protected]" author_location="Pittsburgh, PA" author_affiliation="Carnegie Mellon MBA Candidate" screenshot="http://www.morfix.co.il/morfixheb.jpg" thumbnail="http://www.morfix.co.il/morfixheb.jpg" scrolling="true" height="94">
<Locale messages="http://www.jeremyglassenberg.com/morfix_eng_bundle_default.xml"/>
<Locale lang="iw" messages="http://www.jeremyglassenberg.com/morfix_eng_bundle_heb.xml" />
<Require feature="dynamic-height"/>
<Require feature="views" />
</ModulePrefs>
<Content type="html" view="canvas">
<![CDATA[
<script type="text/javascript"><!--
google_ad_client = "pub-8220250523327935";
/* Morfix 728x90 */
google_ad_slot = "4927506222";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<script language="javascript">
var prefs = gadgets.views.getParams();
var radioSelect = prefs["radioSelect"];
var target_url = prefs["target_url"];
document.write("<iframe frameborder='0' width='100%' height='90%' src='"+target_url+"'></iframe>");
</script>
]]>
</Content>
<Content type="html" view="home">
<![CDATA[
<SCRIPT LANGUAGE="JAVASCRIPT">
// <--
var imgOn = 'post'
function setimgOn(set)
{
imgOn = set
}
function testCanvasStatus(target_url){
if (gadgets.views.getCurrentView().getName() == "HOME"){
form1.target = "_top";
form1.action=target_url;
form1.method = 'post';
form1.submit();
}
// return false;
};
function goToView(dest, params) {
var supported_views = gadgets.views.getSupportedViews();
var reqres = gadgets.views.requestNavigateTo(supported_views[dest], params);
setTimeout("testCanvasStatus('"+params["target_url"]+"')",1000);
};
function GetAction(imgOn)
{
//target_url = "http://www.morfix.co.il/defaultp.asp"
var prefs = {
target_url : "http://www.morfix.co.il/defaultp.asp",
radioSelect : "104"
};
var radioSelect="104";
if (_gel("RadioButtonExpSyn").checked){
prefs["radioSelect"]="101";
radioSelect = "101";
}
else if (_gel("RadioButtonMorphological").checked){
prefs["radioSelect"]="103";
radioSelect = "103";
}
else if (_gel("RadioButtonExact").checked){
prefs["radioSelect"]="106";
radioSelect = "106";
}
if (imgOn == 'get') // dictionary
{
if(form1.q.value){
prefs["target_url"] = "http://milon.morfix.co.il/?q="+form1.q.value;}
else{
prefs["target_url"] = "http://milon.morfix.co.il/MorDictFirstPage.htm"
//form1.method = 'get'
}
}
if(imgOn == 'post')
{
prefs["target_url"] = "http://www.morfix.co.il/Default.aspx?matchMode="+radioSelect+"&q="+form1.q.value; //search
//form1.method = 'post'
}
if (document.form1.target == "_blank")
{
//window.open(prefs["target_url"]);
form1.action=prefs["target_url"];
form1.method = 'post'
form1.submit();
}
else
{
goToView("canvas", prefs);
}
}
/*
* Shows the Keyboard window
*/
function showKeyboard()
{
//_gel("divkeyboard").innerHTML = _gel("keyboard").innerHTML.substr(4,_gel("keyboard").innerHTML.length-8);
if (_gel("keyboard").style.display == ""){
_gel("keyboard").style.display = "none";
}
else{
_gel("keyboard").style.display = "";
}
//_gel("keyboardToggle").onclick = "closeKeyboard()";
_IG_AdjustIFrameHeight();
}
function setStr(str)
{
//alert(document.form1)
document.form1.q.value+=str
}
function del()
{
var str
var Len = document.form1.q.value.length
str = document.form1.q.value.substring(0,Len- 1)
document.form1.q.value = str
}
function toggleMode(){
if(document.form1.target == "_blank"){
document.form1.target = "_top";
}
else {
document.form1.target = "_blank";
}
}
//-->
</SCRIPT>
<form id=form1 name=form1>
<input type="checkbox" onclick="showKeyboard();">keyboard <input type="checkbox" onclick="toggleMode();">show in new window<br/>
<button type="button" name="ButtonMilonMorfix" onclick="GetAction('get');" id="ButtonMilonMorfix" style="width:42px;">תרגום</button>
<button type="button" name="ButtonSearch" onclick="GetAction('post');" id="ButtonSearch" style="width:43px;">חיפוש</button>
<INPUT name=q dir=rtl SIZE=10 MAXLENGTH=100 style="HEIGHT: 22px; LEFT: 208px; TOP: 143px; WIDTH: 200px" > <br>
<DIV id=divFM style="BACKGROUND-COLOR: #ffff50; BORDER-BOTTOM: 1px solid; BORDER-LEFT: 1px solid; BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; PADDING-BOTTOM: 2px; PADDING-LEFT: 2px; PADDING-RIGHT: 2px; PADDING-TOP: 2px; POSITION: absolute; VISIBILITY: hidden"></DIV>
<FONT color=deeppink style="CURSOR: hand; FONT-FAMILY: David COLOR: blue; FONT-SIZE: 11px"><A name="" ><b>Precise String</b></A></FONT>
<INPUT id="RadioButtonSynonym" type="radio" name="MatchMode" value="RadioButtonExact">
<FONT style="CURSOR: hand; FONT-FAMILY: David COLOR: blue; FONT-SIZE: 11px" color=darkorange><A name="" ><b>Synonyms</b></A></FONT>
<INPUT id="RadioButtonExpSyn" type="radio" name="MatchMode" value="RadioButtonSynonym">
<FONT color=green style="CURSOR: hand; FONT-FAMILY: David COLOR: blue; FONT-SIZE: 11px"><A name="" ><b>Expanded Search</b></A></FONT>
<INPUT id="RadioButtonExact" type="radio" name="MatchMode" value="RadioButtonExpSyn">
<FONT color=darkblue style="CURSOR: hand; FONT-FAMILY: David COLOR: blue; FONT-SIZE: 11px"><A name="" ><b>Morfology</b></A></FONT>
<INPUT id="RadioButtonMorphological" type="radio" name="MatchMode" value="RadioButtonMorphological" checked="checked">
<input type=hidden name=start value=1>
<input type=hidden name=max value=20>
<input type=hidden name=sub value=0>
<input type=hidden name=log value=1>
<input type=hidden name=xml value=0>
<input type=hidden name=ali value=0> </FORM>
<div id="divkeyboard"></div>
<div id="keyboard" style="display:none;">
<table bgcolor = "lightgrey" width ="44%"><tr width = "100%">
<td><INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 21px" type=button value='"' onclick= "setStr('.')"></td>
<td><INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 21px" type=button value="'" onclick= "setStr('.')"></td>
<td><INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 21px" type=button value="ק" onclick= "setStr('ק')"></td>
<td><INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 21px" type=button value="ר" onclick= "setStr('ר')"></td>
<td><INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 21px" type=button value="א" onclick= "setStr('א')"></td>
<td><INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 21px" type=button value="ט" onclick= "setStr('ט')"></td>
<td><INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 21px" type=button value="ו" onclick= "setStr('ו')"></td>
<td><INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 21px" type=button value="ן" onclick= "setStr('ן')"></td>
<td><INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 21px" type=button value="ם" onclick= "setStr('ם')"></td>
<td><INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 21px" type=button value="פ" onclick= "setStr('פ')"></td>
</tr>
<tr>
<td><INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 21px" type=button value="ש" onclick= "setStr('ש')"></td>
<td><INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 21px" type=button value="ד" onclick= "setStr('ד')"></td>
<td><INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 21px" type=button value="ג" onclick= "setStr('ג')"></td>
<td><INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 21px" type=button value="כ" onclick= "setStr('כ')"></td>
<td><INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 21px" type=button value="ע" onclick= "setStr('ע')"></td>
<td><INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 21px" type=button value="י" onclick= "setStr('י')"></td>
<td><INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 21px" type=button value="ח" onclick= "setStr('ח')"></td>
<td><INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 21px" type=button value="ל" onclick= "setStr('ל')"></td>
<td><INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 21px" type=button value="ך" onclick= "setStr('ך')"></td>
<td><INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 21px" type=button value="ף" onclick= "setStr('ף')"></td>
</tr>
<tr>
<td><INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 21px" type=button value="ז" onclick= "setStr('ז')" ></td>
<td><INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 21px" type=button value="ס" onclick= "setStr('ס')"></td>
<td><INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 21px" type=button value="ב" onclick= "setStr('ב')"></td>
<td><INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 21px" type=button value="ה" onclick= "setStr('ה')"></td>
<td><INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 21px" type=button value="נ" onclick= "setStr('נ')"></td>
<td><INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 21px" type=button value="מ" onclick= "setStr('מ')"></td>
<td><INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 21px" type=button value="צ" onclick= "setStr('צ')"></td>
<td><INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 21px" type=button value="ת" onclick= "setStr('ת')"></td>
<td><INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 21px" type=button value="ץ" onclick= "setStr('ץ')"></td>
<td><INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 21px" type=button value="." onclick= "setStr('.')"></td>
</tr>
</table>
<tr>
<table bgcolor = "lightgrey" align = middle><tr><td width =18px > </td><td><INPUT width = "70px" id=button1 name=button1 style="HEIGHT: 16px; WIDTH: 170px" type=button onclick= "setStr(' ')">
</td> <td width =15px > </td><td> <INPUT id=button1 name=button1 style="HEIGHT: 24px; WIDTH: 30px" type=button onclick= "del()" value = Del></td></tr></table>
</div>
<script language="javascript">
_IG_AdjustIFrameHeight();
</script>
]]>
</Content>
</Module>