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 | var changed = 0;
|
---|
67 | for (i in savedccs)
|
---|
68 | if (savedccs[i] == 1) \{
|
---|
69 | argcc += "&cc=" + i;
|
---|
70 | changed = 1;
|
---|
71 | \}
|
---|
72 | if (changed == 1) argcc += "&r=1";
|
---|
73 | updatehrefs();
|
---|
74 | \}
|
---|
75 | }
|
---|
76 |
|
---|
77 | _standardfunctions_ {
|
---|
78 | function initialize () \{
|
---|
79 | for (i = 0; i < document.links.length; i++)
|
---|
80 | savedhrefs[i] = document.links[i].href;
|
---|
81 | \}
|
---|
82 | }
|
---|
83 |
|
---|
84 | _getargsfunction_ {
|
---|
85 | function getargs () \{
|
---|
86 | return argk + args + argm + argo + arghd + argb + argqb + argfqn_If_(_collectionoption_,_ccsargs_)_If_(_htmloptions_,_htmlargs_);
|
---|
87 | \}
|
---|
88 | }
|
---|
89 |
|
---|
90 | _ccsargs_ {+ argcc}
|
---|
91 | _htmlargs_ {+ argel + argil + argfc + arghl}
|
---|
92 |
|
---|
93 | _htmlfunctions_ {argel = "";
|
---|
94 | argil = "";
|
---|
95 | argfc = "";
|
---|
96 | arghl = "";
|
---|
97 |
|
---|
98 | function updateel () \{
|
---|
99 | value = document.PrefForm.el.options[document.PrefForm.el.selectedIndex].value;
|
---|
100 | if (value != "_cgiargel_") argel = "&el=" + value;
|
---|
101 | else argel = "";
|
---|
102 | updatehrefs();
|
---|
103 | \}
|
---|
104 |
|
---|
105 | function updateil () \{
|
---|
106 | value = document.PrefForm.il.options[document.PrefForm.il.selectedIndex].value;
|
---|
107 | if (value != "_cgiargil_") argil = "&il=" + value;
|
---|
108 | else argil = "";
|
---|
109 | updatehrefs();
|
---|
110 | \}
|
---|
111 |
|
---|
112 | function updatefc () \{
|
---|
113 | if (document.PrefForm.fc.checked)
|
---|
114 | _If_("_cgiargfc_" eq "1",_argfcblank_,_argfcon_)
|
---|
115 | else
|
---|
116 | _If_("_cgiargfc_" ne "1",_argfcblank_,_argfcoff_)
|
---|
117 | updatehrefs();
|
---|
118 | \}
|
---|
119 |
|
---|
120 | function updatehl () \{
|
---|
121 | if (document.PrefForm.hl.checked)
|
---|
122 | _If_("_cgiarghl_" eq "1",_arghlblank_,_arghlon_)
|
---|
123 | else
|
---|
124 | _If_("_cgiarghl_" ne "1",_arghlblank_,_arghloff_)
|
---|
125 | updatehrefs();
|
---|
126 | \}
|
---|
127 | }
|
---|
128 |
|
---|
129 | _argfcblank_ {argfc = "";}
|
---|
130 | _argfcon_ {argfc = "&fc=1&f=1";}
|
---|
131 | _argfcoff_ {argfc = "&fc=0&f=0";}
|
---|
132 |
|
---|
133 | _arghlblank_ {arghl = "";}
|
---|
134 | _arghlon_ {arghl = "&hl=1";}
|
---|
135 | _arghloff_ {arghl = "&hl=0";}
|
---|
136 |
|
---|
137 | _pagescriptextra_ {
|
---|
138 | // preferences scripts generated from \_preferences:pagescriptextra\_
|
---|
139 |
|
---|
140 | savedhrefs = new Object();
|
---|
141 |
|
---|
142 | argk = "";
|
---|
143 | args = "";
|
---|
144 | argm = "";
|
---|
145 | argo = "";
|
---|
146 | argb = "";
|
---|
147 | arghd = "";
|
---|
148 | argqb = "";
|
---|
149 | argfqn = "";
|
---|
150 |
|
---|
151 | _If_(_collectionoption_,_ccsfunctions_,_standardfunctions_)
|
---|
152 | _If_(_htmloptions_,_htmlfunctions_)
|
---|
153 | _getargsfunction_
|
---|
154 | function updatehrefs () \{
|
---|
155 | for (i = 0; i < document.links.length; i++)
|
---|
156 | document.links[i].href = savedhrefs[i] + getargs();
|
---|
157 | \}
|
---|
158 |
|
---|
159 | function updatek (value) \{
|
---|
160 | if (value != _cgiargk_) argk = "&k=" + value;
|
---|
161 | else argk = "";
|
---|
162 | updatehrefs();
|
---|
163 | \}
|
---|
164 |
|
---|
165 | function updates (value) \{
|
---|
166 | if (value != _cgiargs_) args = "&s=" + value;
|
---|
167 | else args = "";
|
---|
168 | updatehrefs();
|
---|
169 | \}
|
---|
170 |
|
---|
171 | function updatem () \{
|
---|
172 | value = document.PrefForm.m.options[document.PrefForm.m.selectedIndex].value;
|
---|
173 | if (value != _cgiargm_) argm = "&r=1&m=" + value;
|
---|
174 | else argm = "";
|
---|
175 | updatehrefs();
|
---|
176 | \}
|
---|
177 |
|
---|
178 | function updateo () \{
|
---|
179 | value = document.PrefForm.o.options[document.PrefForm.o.selectedIndex].value;
|
---|
180 | if (value != _cgiargo_) argo = "&r=1&o=" + value;
|
---|
181 | else argo = "";
|
---|
182 | updatehrefs();
|
---|
183 | \}
|
---|
184 |
|
---|
185 | function updatefqn () \{
|
---|
186 | value = document.PrefForm.fqn.options[document.PrefForm.fqn.selectedIndex].value;
|
---|
187 | if (value != _cgiargfqn_) argfqn = "&fqn=" + value;
|
---|
188 | else argfqn = "";
|
---|
189 | updatehrefs();
|
---|
190 | \}
|
---|
191 |
|
---|
192 | function updateb (value) \{
|
---|
193 | if (value != _cgiargb_) argb = "&b=" + value;
|
---|
194 | else argb = "";
|
---|
195 | updatehrefs();
|
---|
196 | \}
|
---|
197 |
|
---|
198 | function updatehd() \{
|
---|
199 | arghd="";
|
---|
200 | if (document.PrefForm.hd[0].checked) \{
|
---|
201 | if ("_cgiarghd_" != "0") arghd = "&hd=0";
|
---|
202 | \}
|
---|
203 | else \{
|
---|
204 | value = document.PrefForm.hdn[document.PrefForm.hdn.selectedIndex].value;
|
---|
205 | if (_cgiarghd_ != value) arghd = "&hd="+value;
|
---|
206 | \}
|
---|
207 | updatehrefs();
|
---|
208 | \}
|
---|
209 |
|
---|
210 | function updateqb(value) \{
|
---|
211 | if (value != _cgiargqb_) argqb = "&qb=" + value;
|
---|
212 | else argqb = "";
|
---|
213 | updatehrefs();
|
---|
214 | \}
|
---|
215 |
|
---|
216 | function updatel () \{
|
---|
217 | value = document.PrefForm.l.options[document.PrefForm.l.selectedIndex].value;
|
---|
218 | location.href = location.href + "&nl=1&l=" + value + getargs();
|
---|
219 | \}
|
---|
220 |
|
---|
221 | function updatev () \{
|
---|
222 | value = document.PrefForm.v.options[document.PrefForm.v.selectedIndex].value;
|
---|
223 | location.href = location.href + "&v=" + value + getargs();
|
---|
224 | \}
|
---|
225 |
|
---|
226 | function updatew () \{
|
---|
227 | value = document.PrefForm.w.options[document.PrefForm.w.selectedIndex].value;
|
---|
228 | location.href = location.href + "&nl=0&nw=" + value + getargs();
|
---|
229 | \}
|
---|
230 |
|
---|
231 | function updateqt () \{
|
---|
232 | value = document.PrefForm.qt.options[document.PrefForm.qt.selectedIndex].value;
|
---|
233 | location.href = location.href + "&qt=" + value + getargs();
|
---|
234 | \}
|
---|
235 | }
|
---|
236 |
|
---|
237 |
|
---|
238 | #######################################################################
|
---|
239 | # headers
|
---|
240 | # these are overridden so we can put an onLoad event handler
|
---|
241 | # in the <body> tag of this page
|
---|
242 | #######################################################################
|
---|
243 |
|
---|
244 |
|
---|
245 | _header_ {_cgihead_
|
---|
246 | _htmlhead_(background="_httpiconchalk_" onLoad="initialize();")_startspacer__pagebanner_
|
---|
247 | }
|
---|
248 |
|
---|
249 | # this declaration ends up being the same as style=restrict, never mind
|
---|
250 | _header_[v=1] {_cgihead_
|
---|
251 | _htmlhead_(onLoad="initialize();")_pagebanner_
|
---|
252 | }
|
---|
253 |
|
---|
254 |
|
---|
255 | #######################################################################
|
---|
256 | # page content
|
---|
257 | #######################################################################
|
---|
258 |
|
---|
259 | _pagetitle_ {_collectionname_: _textpreferences_}
|
---|
260 | _imagethispage_ {_iconthispage_}
|
---|
261 |
|
---|
262 | _htmloptions_ {}
|
---|
263 |
|
---|
264 | _htmloptionson_ {
|
---|
265 | <p>
|
---|
266 | <tr><td colspan=2>_fcoption_</td></tr>
|
---|
267 | <p>
|
---|
268 | <tr><td colspan=2>_hloption_</td></tr>
|
---|
269 | <p>
|
---|
270 | <tr>_extlinkoption_</tr>
|
---|
271 | _If_(_PreferenceDocsFromWeb_,<p>
|
---|
272 | <tr>_intlinkoption_</tr>)
|
---|
273 | }
|
---|
274 |
|
---|
275 | _fcoption_ {
|
---|
276 | <input type=checkbox name=fc onClick="updatefc();"_If_("_cgiargfc_" eq "1", checked)>
|
---|
277 | _textfcoption_
|
---|
278 | }
|
---|
279 |
|
---|
280 | _hloption_ {
|
---|
281 | <input type=checkbox name=hl onClick="updatehl();"_If_("_cgiarghl_" eq "1", checked)>
|
---|
282 | _texthloption_
|
---|
283 | }
|
---|
284 |
|
---|
285 | #search pref options
|
---|
286 | _boxsizeoption_{
|
---|
287 | <td valign=baseline>_textqueryboxsize_</td>
|
---|
288 | <td><input type=radio name=qb value=0 onClick="updateqb(0);"
|
---|
289 | _If_(_cgiargqb_,, checked)>_textregbox_<br>
|
---|
290 | <input type=radio name=qb value=1 onClick="updateqb(1);"
|
---|
291 | _If_(_cgiargqb_, checked)>_textbigbox_</td>
|
---|
292 | }
|
---|
293 |
|
---|
294 | _caseoption_ {
|
---|
295 | <td valign=baseline>_textcasediffs_</td>
|
---|
296 | <td><input type=radio name=k value=1 onClick="updatek(1);"
|
---|
297 | _If_(_cgiargk_, checked)>_textignorecase_<br>
|
---|
298 | <input type=radio name=k value=0 onClick="updatek(0);"
|
---|
299 | _If_(_cgiargk_,, checked)>_textmatchcase_</td>
|
---|
300 | }
|
---|
301 |
|
---|
302 | _caseoption_ [l=ar] {}
|
---|
303 | _caseoption_ [l=zh] {}
|
---|
304 |
|
---|
305 | _stemoption_ {
|
---|
306 | <td valign=baseline>_textwordends_</td>
|
---|
307 | <td><input type=radio name=s value=1 onClick="updates(1);"
|
---|
308 | _If_(_cgiargs_, checked)>_textstem_<br>
|
---|
309 | <input type=radio name=s value=0 onClick="updates(0);"
|
---|
310 | _If_(_cgiargs_,, checked)>_textnostem_</td>
|
---|
311 | }
|
---|
312 |
|
---|
313 | _stemoption_ [l=zh] {}
|
---|
314 |
|
---|
315 |
|
---|
316 | _modeoption_ {
|
---|
317 | <td valign=baseline>_textquerymode_</td>
|
---|
318 | <td><input type=radio name=b value=0 onClick="updateb(0);"
|
---|
319 | _If_(_cgiargb_,, checked)>_textsimplemode_<br>
|
---|
320 | <input type=radio name=b value=1 onClick="updateb(1);"
|
---|
321 | _If_(_cgiargb_, checked)>_textadvancedmode_</td>
|
---|
322 | }
|
---|
323 |
|
---|
324 |
|
---|
325 | _searchhistoryop_ {
|
---|
326 | <td valign=baseline>_textsearchhistory_</td>
|
---|
327 | <td><input type=radio name="hd" value=0 onClick="updatehd();"
|
---|
328 | _If_("_cgiarghd_" eq "0", checked)>_textnohistorydisplay_<br>
|
---|
329 | <input type=radio name="hd" value=1 onClick="updatehd();"
|
---|
330 | _If_("_cgiarghd_" eq "0",, checked)>_texthistorydisplay_</td>
|
---|
331 | }
|
---|
332 |
|
---|
333 | _historynumrecords_{<select name="hdn" onChange="updatehd();">
|
---|
334 | <option value="5"_If_("_cgiarghd_" eq "5", selected)>5
|
---|
335 | <option value="10"_If_("_cgiarghd_" eq "10", selected)>10
|
---|
336 | <option value="15"_If_("_cgiarghd_" eq "15", selected)>15
|
---|
337 | <option value="20"_If_("_cgiarghd_" eq "20", selected)>20
|
---|
338 | </select>}
|
---|
339 |
|
---|
340 | _maxdocoption_ {
|
---|
341 | <select name="m" onChange="updatem();">
|
---|
342 | <option value="50"_If_("_cgiargm_" eq "50", selected)>50
|
---|
343 | <option value="100"_If_("_cgiargm_" eq "100", selected)>100
|
---|
344 | <option value="200"_If_("_cgiargm_" eq "200", selected)>200
|
---|
345 | </select>
|
---|
346 | }
|
---|
347 |
|
---|
348 | _hitsperpageoption_ {
|
---|
349 | <select name="o" onChange="updateo();">
|
---|
350 | <option value="10"_If_("_cgiargo_" eq "10", selected)>10
|
---|
351 | <option value="20"_If_("_cgiargo_" eq "20", selected)>20
|
---|
352 | <option value="50"_If_("_cgiargo_" eq "50", selected)>50
|
---|
353 | <option value="100")_If_("_cgiargo_" eq "100", selected)>_textall_
|
---|
354 | </select>
|
---|
355 | }
|
---|
356 |
|
---|
357 | _extlinkoption_ {
|
---|
358 | <td>_textextlink_</td>
|
---|
359 | <td><select name="el" onChange="updateel();">
|
---|
360 | <option value="prompt"_If_("_cgiargel_" eq "prompt", selected)>
|
---|
361 | _textlinkinterm_
|
---|
362 | <option value="direct"_If_("_cgiargel_" eq "direct", selected)>
|
---|
363 | _textlinkdirect_
|
---|
364 | </select></td>
|
---|
365 | }
|
---|
366 |
|
---|
367 | _intlinkoption_ {
|
---|
368 | <td>_textintlink_</td>
|
---|
369 | <td><select name="il" onChange="updateil();">
|
---|
370 | <option value="l"_If_("_cgiargil_" eq "l", selected)>
|
---|
371 | _textdigitlib_
|
---|
372 | <option value="w"_If_("_cgiargil_" eq "w", selected)>
|
---|
373 | _textweb_
|
---|
374 | </select></td>
|
---|
375 | }
|
---|
376 |
|
---|
377 | # set from within pageaction
|
---|
378 | _languageoption_ {}
|
---|
379 | _encodingoption_ {}
|
---|
380 |
|
---|
381 | _formatoption_ {
|
---|
382 | <td>_textformat_</td>
|
---|
383 | <td><select name="v" onChange="updatev();">
|
---|
384 | <option value="0"_If_("_cgiargv_" eq "0", selected)>_textgraphical_
|
---|
385 | <option value="1"_If_("_cgiargv_" eq "1", selected)>_texttextual_
|
---|
386 | </select></td>
|
---|
387 | }
|
---|
388 |
|
---|
389 | _content_ {
|
---|
390 | <center>
|
---|
391 | _navigationbar_
|
---|
392 | </center>
|
---|
393 |
|
---|
394 | <blockquote>
|
---|
395 |
|
---|
396 | <form name=PrefForm method=get action="_gwcgi_">
|
---|
397 |
|
---|
398 | <input type="hidden" name="e" value="_decodedcompressedoptions_">
|
---|
399 |
|
---|
400 | _If_(_collectionoption_,_collectionprefs_)
|
---|
401 | _presentationprefs_
|
---|
402 | _If_("_cgiargct_" eq "1",_mgppsearchprefs_,_mgsearchprefs_)
|
---|
403 |
|
---|
404 | </blockquote>
|
---|
405 | </form>
|
---|
406 | }
|
---|
407 |
|
---|
408 | #search prefs for mg collections
|
---|
409 | _mgsearchprefs_ {
|
---|
410 | <h3>_textsearchprefs_</h3>
|
---|
411 | <table>
|
---|
412 | <tr>_boxsizeoption_</tr>
|
---|
413 |
|
---|
414 | <tr>_caseoption_</tr>
|
---|
415 |
|
---|
416 | <tr>_stemoption_</tr>
|
---|
417 |
|
---|
418 | <tr>_modeoption_</tr>
|
---|
419 |
|
---|
420 | <tr>_searchhistoryop_</tr>
|
---|
421 |
|
---|
422 | <tr><td colspan=2>_textprefop_</td></tr>
|
---|
423 | </table>
|
---|
424 | <br>_iconblankbar_
|
---|
425 | }
|
---|
426 |
|
---|
427 | _collectionprefs_ {
|
---|
428 | <h3>_textcollectionprefs_</h3>
|
---|
429 | _collectionoption_
|
---|
430 | <br>_iconblankbar_
|
---|
431 | }
|
---|
432 |
|
---|
433 | _presentationprefs_ {
|
---|
434 | <h3>_textpresentationprefs_</h3>
|
---|
435 | <table>_htmloptions_
|
---|
436 |
|
---|
437 | _If_(_languageoption_,<tr><td>_textlanguage_</td><td>_languageoption_</td></tr>)
|
---|
438 |
|
---|
439 | _If_(_encodingoption_,<tr><td>_textencoding_</td><td>_encodingoption_</td></tr>)
|
---|
440 |
|
---|
441 | <tr>_formatoption_</tr></table>
|
---|
442 | <br>_iconblankbar_
|
---|
443 | }
|
---|
444 |
|
---|
445 | #######################################################
|
---|
446 | ## new stuff for prefs for form vs text search - for mgpp collections
|
---|
447 | _mgppsearchprefs_ {
|
---|
448 | <h3>_textsearchprefs_</h3>
|
---|
449 | <table>
|
---|
450 | <tr>_searchtypeop_</tr>
|
---|
451 |
|
---|
452 | _If_(_cgiargqt_,_formsearchoptions_,_textsearchoptions_)
|
---|
453 |
|
---|
454 | <tr>_caseoption_</tr>
|
---|
455 |
|
---|
456 | <tr>_stemoption_</tr>
|
---|
457 |
|
---|
458 | <tr>_searchhistoryop_</tr>
|
---|
459 |
|
---|
460 | <tr><td colspan=2>_textprefop_</td></tr></table>
|
---|
461 | <br>_iconblankbar_
|
---|
462 | }
|
---|
463 |
|
---|
464 |
|
---|
465 | _searchtypeop_ {
|
---|
466 | <td>_texttypesearch_</td>
|
---|
467 | <td><select name="qt" onChange="updateqt();">
|
---|
468 | <option value="0"_If_("_cgiargqt_" eq "0", selected)>_texttextsearch_
|
---|
469 | <option value="1"_If_("_cgiargqt_" eq "1", selected)>_textformsearch_
|
---|
470 | </select></td>
|
---|
471 | }
|
---|
472 |
|
---|
473 | _formsearchoptions_ {
|
---|
474 | <tr>_formmodeoption_</tr>
|
---|
475 | }
|
---|
476 |
|
---|
477 | _textsearchoptions_ {
|
---|
478 | <tr>_boxsizeoption_</tr>
|
---|
479 | <tr>_modeoption_</tr>
|
---|
480 | }
|
---|
481 |
|
---|
482 | _formmodeoption_{
|
---|
483 | <td valign=baseline>_textformtype_</td>
|
---|
484 | <td><input type=radio name=b value=0 onClick="updateb(0);"
|
---|
485 | _If_(_cgiargb_,, checked)>_textsimple_<br>
|
---|
486 | <input type=radio name=b value=1 onClick="updateb(1);"
|
---|
487 | _If_(_cgiargb_, checked)>_textadvanced_<br>
|
---|
488 | _formnumoption_</td>
|
---|
489 | }
|
---|
490 |
|
---|
491 | _formnumoption_ {_textwith_
|
---|
492 | <select name="fqn" onChange="updatefqn();">
|
---|
493 | <option value="2"_If_("_cgiargfqn_" eq "2", selected)>2
|
---|
494 | <option value="4"_If_("_cgiargfqn_" eq "4", selected)>4
|
---|
495 | <option value="6"_If_("_cgiargfqn_" eq "6", selected)>6
|
---|
496 | <option value="8"_If_("_cgiargfqn_" eq "8", selected)>8
|
---|
497 | </select>_textfields_</td>
|
---|
498 | }
|
---|
499 |
|
---|
500 |
|
---|
501 | #######################################################################
|
---|
502 | # icons
|
---|
503 | #######################################################################
|
---|
504 |
|
---|
505 | _iconthispage_ {<img src="_httpiconhpref_" alt="_textpreferences_" width="_widthhpref_" height="_heighthpref_">}
|
---|