source: trunk/gsdl/macros/pref.dm@ 666

Last change on this file since 666 was 666, checked in by sjboddie, 25 years ago

* empty log message *

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 8.2 KB
Line 
1package preferences
2
3
4#######################################################################
5# java images/scripts
6#######################################################################
7
8# the _javalinks_ macros are the flashy image links at the top right of
9# the page. this is overridden here as we don't want a 'preferences'
10# link on this page
11
12_javalinks_ {_imagehome__imagehelp_}
13_javalinks_ [v=1] {
14_imagehome_<br>
15_imagehelp_<br>
16}
17
18
19#######################################################################
20# scripts
21# note that changing either the "m" or the "o" argument
22# from the preferences page necessitates reseting the "r"
23# argument to 1
24#######################################################################
25
26_pagescriptextra_ {
27// preferences scripts generated from \_preferences:pagescriptextra\_
28
29 savedhrefs = new Object();
30
31 argk = "";
32 args = "";
33 argm = "";
34 argo = "";
35 argb = "";
36
37 function initialize () \{
38 for (i = 0; i < document.links.length; i++)
39 savedhrefs[i] = document.links[i].href;
40 \}
41
42 function updatehrefs () \{
43 for (i = 0; i < document.links.length; i++)
44 document.links[i].href = savedhrefs[i] + argk + args + argm + argo + argb;
45 \}
46
47 function updatek (value) \{
48 if (value != _cgiargk_) argk = "&k=" + value;
49 else argk = "";
50 updatehrefs();
51 \}
52
53 function updates (value) \{
54 if (value != _cgiargs_) args = "&s=" + value;
55 else args = "";
56 updatehrefs();
57 \}
58
59 function updatem () \{
60 value = document.PrefForm.m.options[document.PrefForm.m.selectedIndex].value;
61 if (value != _cgiargm_) argm = "&r=1&m=" + value;
62 else argm = "";
63 updatehrefs();
64 \}
65
66 function updateo () \{
67 value = document.PrefForm.o.options[document.PrefForm.o.selectedIndex].value;
68 if (value != _cgiargo_) argo = "&r=1&o=" + value;
69 else argo = "";
70 updatehrefs();
71 \}
72
73 function updateb (value) \{
74 if (value != _cgiargb_) argb = "&b=" + value;
75 else argb = "";
76 updatehrefs();
77 \}
78
79 function updatel () \{
80 value = document.PrefForm.l.options[document.PrefForm.l.selectedIndex].value;
81 location.href = location.href + argk + args + argm + argo + argb + "&l=" + value;
82 \}
83
84 function updatev () \{
85 value = document.PrefForm.v.options[document.PrefForm.v.selectedIndex].value;
86 location.href = location.href + argk + args + argm + argo + argb + "&v=" + value;
87 \}
88
89 function updatew () \{
90 value = document.PrefForm.w.options[document.PrefForm.w.selectedIndex].value;
91 location.href = location.href + argk + args + argm + argo + argb + "&nw=" + value;
92 \}
93
94}
95
96#######################################################################
97# headers
98# these are overridden so we can put an onLoad event handler
99# in the <body> tag of this page
100#######################################################################
101
102
103_header_ {_cgihead_
104_htmlhead_(background="_httpiconchalk_" onLoad="initialize();")_startspacer__pagebanner_
105}
106
107# this declaration ends up being the same as style=restrict, never mind
108_header_[v=1] {_cgihead_
109_htmlhead_(onLoad="initialize();")_pagebanner_
110}
111
112
113#######################################################################
114# page content
115#######################################################################
116
117_pagetitle_ {_collectionname_: _textpreferences_}
118_imagethispage_ {_iconthispage_}
119
120_caseoption_ {
121<input type=radio name=k value=1 onClick="updatek(1);"
122 _If_(_cgiargk_, checked)>_textignorecase_<br>
123<input type=radio name=k value=0 onClick="updatek(0);"
124 _If_(_cgiargk_,, checked)>_textmatchcase_
125}
126
127_caseoption_ [l=zh] {}
128
129_stemoption_ {
130<input type=radio name=s value=1 onClick="updates(1);"
131 _If_(_cgiargs_, checked)>_textstem_<br>
132<input type=radio name=s value=0 onClick="updates(0);"
133 _If_(_cgiargs_,, checked)>_textnostem_
134}
135
136_stemoption_ [l=zh] {}
137
138_maxdocoption_ {
139<select name="m" onChange="updatem();">
140 <option value="50"_If_("_cgiargm_" eq "50", selected)>50
141 <option value="100"_If_("_cgiargm_" eq "100", selected)>100
142 <option value="200"_If_("_cgiargm_" eq "200", selected)>200
143</select>
144}
145
146_hitsperpageoption_ {
147<select name="o" onChange="updateo();">
148 <option value="10"_If_("_cgiargo_" eq "10", selected)>10
149 <option value="20"_If_("_cgiargo_" eq "20", selected)>20
150 <option value="50"_If_("_cgiargo_" eq "50", selected)>50
151 <option value="100")_If_("_cgiargo_" eq "100", selected)>all
152</select>
153}
154
155_modeoption_ {
156<input type=radio name=b value=0 onClick="updateb(0);"
157 _If_(_cgiargb_,, checked)>_textsimplemode_<br>
158<input type=radio name=b value=1 onClick="updateb(1);"
159 _If_(_cgiargb_, checked)>_textadvancedmode_
160}
161
162_languageoption_ {
163_textlanguage_
164<select name="l" onChange="updatel();">
165 <option value="en"_If_("_cgiargl_",, selected)_If_("_cgiargl_" eq "en", selected)>English
166 <option value="mi"_If_("_cgiargl_" eq "mi", selected)>M&auml;ori
167 <option value="zh"_If_("_cgiargl_" eq "zh", selected)>Chinese
168</select>
169}
170
171_encodingoption_ {
172_textencoding_
173<select name="w" onChange="updatew();">
174 <option value="w" _If_("_cgiargw_" eq "w",selected)>Western (ISO-8859-1)
175 <option value="u" _If_("_cgiargw_" eq "u",selected)>UTF-8
176 <option value="g" _If_("_cgiargw_" eq "g",selected)>GBK
177</select>
178}
179
180_formatoption_ {
181_textformat_
182<select name="v" onChange="updatev();">
183 <option value="0"_If_("_cgiargv_" eq "0", selected)>_textgraphical_
184 <option value="1"_If_("_cgiargv_" eq "1", selected)>_texttextual_
185</select>
186}
187
188_content_ {
189<center>
190_navigationbar_
191</center>
192<blockquote>
193
194<form name=PrefForm method=get action="_gwcgi_">
195
196<input type="hidden" name="e" value="_compressedoptions_">
197
198<p>_caseoption_
199
200<p>_stemoption_
201
202<p>
203_textprefop_
204
205<p>
206_modeoption_
207
208<p>
209_languageoption_
210
211<p>
212_encodingoption_
213
214<p>
215_formatoption_
216
217</blockquote>
218</form>
219}
220
221
222#######################################################################
223# https
224#######################################################################
225
226_httpiconhpref_ {_httpimg_/h\_pref.gif}
227_httpiconhpref_ [l=mi] {_httpimg_/mh\_pref.gif}
228_widthhpref_ {200}
229_widthhpref_ [l=mi] {220}
230_heighthpref_ {57}
231
232
233#######################################################################
234# icons
235#######################################################################
236
237_iconthispage_ {<img src="_httpiconhpref_" alt="_textpreferences_" width="_widthhpref_" height="_heighthpref_">}
238_iconthispage_ [l=mi] {<img src="_httpimg_/mh\_pref.gif" alt="" width="220" height="57">}
239
240
241#######################################################################
242# english macros
243#######################################################################
244
245_textpreferences_ {Preferences}
246_textignorecase_ { ignore case differences}
247_textmatchcase_ { upper/lower case must match}
248_textstem_ { ignore word endings}
249_textnostem_ { whole word must match}
250_textprefop_ {Return up to _maxdocoption_ hits with _hitsperpageoption_ hits per page.}
251_textlanguage_ {Interface language: }
252_textencoding_ {Encoding: }
253_textformat_ {Interface format: }
254_textsimplemode_ {simple query mode}
255_textadvancedmode_ {advanced query mode (allows boolean searching using !, &, |, and parenthesis)}
256_textgraphical_ {Graphical}
257_texttextual_ {Textual}
258
259
260#######################################################################
261# chinese macros
262#######################################################################
263
264_textprefop_ [l=zh] {查询最倚返回 
265  _maxdocoption_ 记圕每页返回
266_hitsperpageoption_ 记圕}
267_textlanguage_ [l=zh] {界面语蚀}
268_textencoding_ [l=zh] {猖码方匏}
269_textformat_ [l=zh] {界面栌匏}
270
271#######################################################################
272# maori macros
273#######################################################################
274
275_textpreferences_ [l=mi] {Whiriwhiringa}
276_textignorecase_ [l=mi] { hei aha te p&uuml; matua me te p&uuml; iti}
277_textmatchcase_ [l=mi] { me tika te p&uuml; matua me te p&uuml; iti}
278_textstem_ [l=mi] { hei aha te k&uuml;muri}
279_textnostem_ [l=mi] { me tika te k&uuml;muri}
280_textprefop_ [l=mi] {Whakahokia mai te _maxdocoption_ kupu, &auml;, kia _hitsperpageoption_ kupu ki ia wh&auml;rangi.}
281_textlanguage_ [l=mi] {Reo: }
282_textencoding_ [l=mi] {Whakatakotoranga p&uuml;: }
283_textformat_ [l=mi] {Whakatakotoranga wh&auml;rangi: }
284_textsimplemode_ [l=mi] {te rapu wh&auml;iti}
285_textadvancedmode_ [l=mi] {te rapu wh&auml;nui (ka taea te whakamahia ng&auml; p&uuml; boolean,
286p&euml;r&auml; i te !, &, |, me te "()" hoki)}
287_textgraphical_ [l=mi] {Whakaahua}
288_texttextual_ [l=mi] {K&auml;ore he whakaahua}
289
290
291
292
Note: See TracBrowser for help on using the repository browser.