1 | package preferences
|
---|
2 |
|
---|
3 | # set within server
|
---|
4 |
|
---|
5 | # collectionoption is only set when cross-collection searching is turned on
|
---|
6 | _collectionoption_ {}
|
---|
7 |
|
---|
8 | # this macro will be set to "1" when the "source docs retrived from dl/web
|
---|
9 | # button is required - i.e. whenever PreferenceDocsFromWeb isn't set to false
|
---|
10 | # in collect.cfg
|
---|
11 | _PreferenceDocsFromWeb_ {}
|
---|
12 |
|
---|
13 |
|
---|
14 | #######################################################################
|
---|
15 | # java images/scripts
|
---|
16 | #######################################################################
|
---|
17 |
|
---|
18 | # the _javalinks_ macros are the flashy image links at the top right of
|
---|
19 | # the page. this is overridden here as we don't want a 'preferences'
|
---|
20 | # link on this page
|
---|
21 |
|
---|
22 | _javalinks_ {_imagehome__imagehelp_}
|
---|
23 | _javalinks_ [v=1] {
|
---|
24 | _imagehome_<br>
|
---|
25 | _imagehelp_<br>
|
---|
26 | }
|
---|
27 |
|
---|
28 |
|
---|
29 | #######################################################################
|
---|
30 | # scripts
|
---|
31 | # note that changing either the "m" or the "o" argument
|
---|
32 | # from the preferences page necessitates reseting the "r"
|
---|
33 | # argument to 1
|
---|
34 | #######################################################################
|
---|
35 |
|
---|
36 | _ccsfunctions_ {argcc = "";
|
---|
37 | savedccs = new Object();
|
---|
38 |
|
---|
39 | function initialize () \{
|
---|
40 | for (i = 0; i < document.links.length; i++)
|
---|
41 | savedhrefs[i] = document.links[i].href;
|
---|
42 |
|
---|
43 | s = "_cgiargcc_";
|
---|
44 | a = s.split (",");
|
---|
45 | for (i = 0; i < a.length ;i++) \{
|
---|
46 | for (j = 0; j < document.PrefForm.cc.length; j++) \{
|
---|
47 | if (a[i] == document.PrefForm.elements["cc"][j].value) \{
|
---|
48 | document.PrefForm.elements["cc"][j].checked = true;
|
---|
49 | savedccs[a[i]] = 1;
|
---|
50 | argcc = argcc + "&cc=" + a[i];
|
---|
51 | break;
|
---|
52 | \} else \{
|
---|
53 | savedccs[a[i]] = 0;
|
---|
54 | \}
|
---|
55 | \}
|
---|
56 | \}
|
---|
57 | updatehrefs();
|
---|
58 | \}
|
---|
59 |
|
---|
60 | function updatecc (collection) \{
|
---|
61 | if (savedccs[collection] == 1) savedccs[collection] = 0;
|
---|
62 | else savedccs[collection] = 1;
|
---|
63 |
|
---|
64 | var i;
|
---|
65 | argcc = "";
|
---|
66 | for (i in savedccs)
|
---|
67 | if (savedccs[i] == 1) argcc += "&cc=" + i;
|
---|
68 | updatehrefs();
|
---|
69 | \}
|
---|
70 | }
|
---|
71 |
|
---|
72 | _standardfunctions_ {
|
---|
73 | function initialize () \{
|
---|
74 | for (i = 0; i < document.links.length; i++)
|
---|
75 | savedhrefs[i] = document.links[i].href;
|
---|
76 | \}
|
---|
77 | }
|
---|
78 |
|
---|
79 | _getargsfunction_ {
|
---|
80 | function getargs () \{
|
---|
81 | return argk + args + argm + argo + argb_If_('_cgiargccs_ == 1',_ccsargs_)_If_(_htmloptions_,_htmlargs_);
|
---|
82 | \}
|
---|
83 | }
|
---|
84 |
|
---|
85 | _ccsargs_ {+ argcc}
|
---|
86 | _htmlargs_ {+ argel + argil + argfc + arghl}
|
---|
87 |
|
---|
88 | _htmlfunctions_ {argel = "";
|
---|
89 | argil = "";
|
---|
90 | argfc = "";
|
---|
91 | arghl = "";
|
---|
92 |
|
---|
93 | function updateel () \{
|
---|
94 | value = document.PrefForm.el.options[document.PrefForm.el.selectedIndex].value;
|
---|
95 | if (value != "_cgiargel_") argel = "&el=" + value;
|
---|
96 | else argel = "";
|
---|
97 | updatehrefs();
|
---|
98 | \}
|
---|
99 |
|
---|
100 | function updateil () \{
|
---|
101 | value = document.PrefForm.il.options[document.PrefForm.il.selectedIndex].value;
|
---|
102 | if (value != "_cgiargil_") argil = "&il=" + value;
|
---|
103 | else argil = "";
|
---|
104 | updatehrefs();
|
---|
105 | \}
|
---|
106 |
|
---|
107 | function updatefc () \{
|
---|
108 | if (document.PrefForm.fc.checked)
|
---|
109 | _If_("_cgiargfc_" eq "1",_argfcblank_,_argfcon_)
|
---|
110 | else
|
---|
111 | _If_("_cgiargfc_" ne "1",_argfcblank_,_argfcoff_)
|
---|
112 | updatehrefs();
|
---|
113 | \}
|
---|
114 |
|
---|
115 | function updatehl () \{
|
---|
116 | if (document.PrefForm.hl.checked)
|
---|
117 | _If_("_cgiarghl_" eq "1",_arghlblank_,_arghlon_)
|
---|
118 | else
|
---|
119 | _If_("_cgiarghl_" ne "1",_arghlblank_,_arghloff_)
|
---|
120 | updatehrefs();
|
---|
121 | \}
|
---|
122 | }
|
---|
123 |
|
---|
124 | _argfcblank_ {argfc = "";}
|
---|
125 | _argfcon_ {argfc = "&fc=1&f=1";}
|
---|
126 | _argfcoff_ {argfc = "&fc=0&f=0";}
|
---|
127 |
|
---|
128 | _arghlblank_ {arghl = "";}
|
---|
129 | _arghlon_ {arghl = "&hl=1";}
|
---|
130 | _arghloff_ {arghl = "&hl=0";}
|
---|
131 |
|
---|
132 | _pagescriptextra_ {
|
---|
133 | // preferences scripts generated from \_preferences:pagescriptextra\_
|
---|
134 |
|
---|
135 | savedhrefs = new Object();
|
---|
136 |
|
---|
137 | argk = "";
|
---|
138 | args = "";
|
---|
139 | argm = "";
|
---|
140 | argo = "";
|
---|
141 | argb = "";
|
---|
142 | _If_('_cgiargccs_ == 1',_ccsfunctions_,_standardfunctions_)
|
---|
143 | _If_(_htmloptions_,_htmlfunctions_)
|
---|
144 | _getargsfunction_
|
---|
145 | function updatehrefs () \{
|
---|
146 | for (i = 0; i < document.links.length; i++)
|
---|
147 | document.links[i].href = savedhrefs[i] + getargs();
|
---|
148 | \}
|
---|
149 |
|
---|
150 | function updatek (value) \{
|
---|
151 | if (value != _cgiargk_) argk = "&k=" + value;
|
---|
152 | else argk = "";
|
---|
153 | updatehrefs();
|
---|
154 | \}
|
---|
155 |
|
---|
156 | function updates (value) \{
|
---|
157 | if (value != _cgiargs_) args = "&s=" + value;
|
---|
158 | else args = "";
|
---|
159 | updatehrefs();
|
---|
160 | \}
|
---|
161 |
|
---|
162 | function updatem () \{
|
---|
163 | value = document.PrefForm.m.options[document.PrefForm.m.selectedIndex].value;
|
---|
164 | if (value != _cgiargm_) argm = "&r=1&m=" + value;
|
---|
165 | else argm = "";
|
---|
166 | updatehrefs();
|
---|
167 | \}
|
---|
168 |
|
---|
169 | function updateo () \{
|
---|
170 | value = document.PrefForm.o.options[document.PrefForm.o.selectedIndex].value;
|
---|
171 | if (value != _cgiargo_) argo = "&r=1&o=" + value;
|
---|
172 | else argo = "";
|
---|
173 | updatehrefs();
|
---|
174 | \}
|
---|
175 |
|
---|
176 | function updateb (value) \{
|
---|
177 | if (value != _cgiargb_) argb = "&b=" + value;
|
---|
178 | else argb = "";
|
---|
179 | updatehrefs();
|
---|
180 | \}
|
---|
181 |
|
---|
182 | function updatel () \{
|
---|
183 | value = document.PrefForm.l.options[document.PrefForm.l.selectedIndex].value;
|
---|
184 | location.href = location.href + "&l=" + value + getargs();
|
---|
185 | \}
|
---|
186 |
|
---|
187 | function updatev () \{
|
---|
188 | value = document.PrefForm.v.options[document.PrefForm.v.selectedIndex].value;
|
---|
189 | location.href = location.href + "&v=" + value + getargs();
|
---|
190 | \}
|
---|
191 |
|
---|
192 | function updatew () \{
|
---|
193 | value = document.PrefForm.w.options[document.PrefForm.w.selectedIndex].value;
|
---|
194 | location.href = location.href + "&nw=" + value + getargs();
|
---|
195 | \}
|
---|
196 | }
|
---|
197 |
|
---|
198 | #######################################################################
|
---|
199 | # headers
|
---|
200 | # these are overridden so we can put an onLoad event handler
|
---|
201 | # in the <body> tag of this page
|
---|
202 | #######################################################################
|
---|
203 |
|
---|
204 |
|
---|
205 | _header_ {_cgihead_
|
---|
206 | _htmlhead_(background="_httpiconchalk_" onLoad="initialize();")_startspacer__pagebanner_
|
---|
207 | }
|
---|
208 |
|
---|
209 | # this declaration ends up being the same as style=restrict, never mind
|
---|
210 | _header_[v=1] {_cgihead_
|
---|
211 | _htmlhead_(onLoad="initialize();")_pagebanner_
|
---|
212 | }
|
---|
213 |
|
---|
214 |
|
---|
215 | #######################################################################
|
---|
216 | # page content
|
---|
217 | #######################################################################
|
---|
218 |
|
---|
219 | _pagetitle_ {_collectionname_: _textpreferences_}
|
---|
220 | _imagethispage_ {_iconthispage_}
|
---|
221 |
|
---|
222 | _htmloptions_ {}
|
---|
223 |
|
---|
224 | _htmloptionson_ {
|
---|
225 | <p>
|
---|
226 | _fcoption_
|
---|
227 | <p>
|
---|
228 | _hloption_
|
---|
229 | <p>
|
---|
230 | _extlinkoption_
|
---|
231 | _If_(_PreferenceDocsFromWeb_,<p>
|
---|
232 | _intlinkoption_)
|
---|
233 | }
|
---|
234 |
|
---|
235 | _caseoption_ {
|
---|
236 | <input type=radio name=k value=1 onClick="updatek(1);"
|
---|
237 | _If_(_cgiargk_, checked)>_textignorecase_<br>
|
---|
238 | <input type=radio name=k value=0 onClick="updatek(0);"
|
---|
239 | _If_(_cgiargk_,, checked)>_textmatchcase_
|
---|
240 | }
|
---|
241 |
|
---|
242 | _fcoption_ {
|
---|
243 | <input type=checkbox name=fc onClick="updatefc();"_If_("_cgiargfc_" eq "1", checked)>
|
---|
244 | _textfcoption_
|
---|
245 | }
|
---|
246 |
|
---|
247 | _hloption_ {
|
---|
248 | <input type=checkbox name=hl onClick="updatehl();"_If_("_cgiarghl_" eq "1", checked)>
|
---|
249 | _texthloption_
|
---|
250 | }
|
---|
251 |
|
---|
252 | _caseoption_ [l=zh] {}
|
---|
253 |
|
---|
254 | _stemoption_ {
|
---|
255 | <input type=radio name=s value=1 onClick="updates(1);"
|
---|
256 | _If_(_cgiargs_, checked)>_textstem_<br>
|
---|
257 | <input type=radio name=s value=0 onClick="updates(0);"
|
---|
258 | _If_(_cgiargs_,, checked)>_textnostem_
|
---|
259 | }
|
---|
260 |
|
---|
261 | _stemoption_ [l=zh] {}
|
---|
262 |
|
---|
263 | _maxdocoption_ {
|
---|
264 | <select name="m" onChange="updatem();">
|
---|
265 | <option value="50"_If_("_cgiargm_" eq "50", selected)>50
|
---|
266 | <option value="100"_If_("_cgiargm_" eq "100", selected)>100
|
---|
267 | <option value="200"_If_("_cgiargm_" eq "200", selected)>200
|
---|
268 | </select>
|
---|
269 | }
|
---|
270 |
|
---|
271 | _hitsperpageoption_ {
|
---|
272 | <select name="o" onChange="updateo();">
|
---|
273 | <option value="10"_If_("_cgiargo_" eq "10", selected)>10
|
---|
274 | <option value="20"_If_("_cgiargo_" eq "20", selected)>20
|
---|
275 | <option value="50"_If_("_cgiargo_" eq "50", selected)>50
|
---|
276 | <option value="100")_If_("_cgiargo_" eq "100", selected)>_textall_
|
---|
277 | </select>
|
---|
278 | }
|
---|
279 |
|
---|
280 | _modeoption_ {
|
---|
281 | <input type=radio name=b value=0 onClick="updateb(0);"
|
---|
282 | _If_(_cgiargb_,, checked)>_textsimplemode_<br>
|
---|
283 | <input type=radio name=b value=1 onClick="updateb(1);"
|
---|
284 | _If_(_cgiargb_, checked)>_textadvancedmode_
|
---|
285 | }
|
---|
286 |
|
---|
287 | _extlinkoption_ {
|
---|
288 | _textextlink_
|
---|
289 | <select name="el" onChange="updateel();">
|
---|
290 | <option value="prompt"_If_("_cgiargel_" eq "prompt", selected)>
|
---|
291 | _textlinkinterm_
|
---|
292 | <option value="direct"_If_("_cgiargel_" eq "direct", selected)>
|
---|
293 | _textlinkdirect_
|
---|
294 | </select>
|
---|
295 | }
|
---|
296 |
|
---|
297 | _intlinkoption_ {
|
---|
298 | _textintlink_
|
---|
299 | <select name="il" onChange="updateil();">
|
---|
300 | <option value="l"_If_("_cgiargil_" eq "l", selected)>
|
---|
301 | _textdigitlib_
|
---|
302 | <option value="w"_If_("_cgiargil_" eq "w", selected)>
|
---|
303 | _textweb_
|
---|
304 | </select>
|
---|
305 | }
|
---|
306 |
|
---|
307 | _languageoption_ {}
|
---|
308 |
|
---|
309 | _enlanguageoption_ {<option value="en"_If_("_cgiargl_",, selected)_If_("_cgiargl_" eq "en", selected)>_textlangeng_}
|
---|
310 | _milanguageoption_ {<option value="mi"_If_("_cgiargl_" eq "mi", selected)>_textlangmaori_}
|
---|
311 | _zhlanguageoption_ {<option value="zh"_If_("_cgiargl_" eq "zh", selected)>_textlangchinese_}
|
---|
312 |
|
---|
313 | _encodingoption_ {
|
---|
314 | _textencoding_
|
---|
315 | <select name="w" onChange="updatew();">
|
---|
316 | <option value="w" _If_("_cgiargw_" eq "w",selected)>Western (ISO-8859-1)
|
---|
317 | <option value="u" _If_("_cgiargw_" eq "u",selected)>UTF-8
|
---|
318 | <option value="g" _If_("_cgiargw_" eq "g",selected)>GBK
|
---|
319 | </select>
|
---|
320 | }
|
---|
321 |
|
---|
322 | _formatoption_ {
|
---|
323 | _textformat_
|
---|
324 | <select name="v" onChange="updatev();">
|
---|
325 | <option value="0"_If_("_cgiargv_" eq "0", selected)>_textgraphical_
|
---|
326 | <option value="1"_If_("_cgiargv_" eq "1", selected)>_texttextual_
|
---|
327 | </select>
|
---|
328 | }
|
---|
329 |
|
---|
330 | _content_ {
|
---|
331 | <center>
|
---|
332 | _navigationbar_
|
---|
333 | </center>
|
---|
334 | <blockquote>
|
---|
335 |
|
---|
336 | <form name=PrefForm method=get action="_gwcgi_">
|
---|
337 |
|
---|
338 | <input type="hidden" name="e" value="_decodedcompressedoptions_">
|
---|
339 |
|
---|
340 | _If_(_collectionoption_,_collectionprefs_)
|
---|
341 | _presentationprefs_
|
---|
342 | _searchprefs_
|
---|
343 |
|
---|
344 | </blockquote>
|
---|
345 | </form>
|
---|
346 | }
|
---|
347 |
|
---|
348 | _searchprefs_ {
|
---|
349 | <h3>_textsearchprefs_</h3>
|
---|
350 | <p>
|
---|
351 | _caseoption_
|
---|
352 |
|
---|
353 | <p>
|
---|
354 | _stemoption_
|
---|
355 |
|
---|
356 | <p>
|
---|
357 | _modeoption_
|
---|
358 |
|
---|
359 | <p>
|
---|
360 | _textprefop_
|
---|
361 | <br>_iconblankbar_
|
---|
362 | }
|
---|
363 |
|
---|
364 | _collectionprefs_ {
|
---|
365 | <h3>_textcollectionprefs_</h3>
|
---|
366 | _collectionoption_
|
---|
367 | <br>_iconblankbar_
|
---|
368 | }
|
---|
369 |
|
---|
370 | _presentationprefs_ {
|
---|
371 | <h3>_textpresentationprefs_</h3>
|
---|
372 | _htmloptions_
|
---|
373 |
|
---|
374 | <p>
|
---|
375 | _languageoption_
|
---|
376 |
|
---|
377 | <p>
|
---|
378 | _encodingoption_
|
---|
379 |
|
---|
380 | <p>
|
---|
381 | _formatoption_
|
---|
382 | <br>_iconblankbar_
|
---|
383 | }
|
---|
384 |
|
---|
385 | #######################################################################
|
---|
386 | # https
|
---|
387 | #######################################################################
|
---|
388 |
|
---|
389 | _httpiconhpref_ {_httpimg_/h\_pref.gif}
|
---|
390 | _httpiconhpref_ [l=mi] {_httpimg_/mh\_pref.gif}
|
---|
391 | _widthhpref_ {200}
|
---|
392 | _widthhpref_ [l=mi] {220}
|
---|
393 | _heighthpref_ {57}
|
---|
394 |
|
---|
395 |
|
---|
396 | #######################################################################
|
---|
397 | # icons
|
---|
398 | #######################################################################
|
---|
399 |
|
---|
400 | _iconthispage_ {<img src="_httpiconhpref_" alt="_textpreferences_" width="_widthhpref_" height="_heighthpref_">}
|
---|
401 | _iconthispage_ [l=mi] {<img src="_httpimg_/mh\_pref.gif" alt="" width="220" height="57">}
|
---|
402 |
|
---|
403 |
|
---|
404 |
|
---|
405 |
|
---|
406 |
|
---|
407 |
|
---|
408 |
|
---|
409 |
|
---|