[128] | 1 | package preferences
|
---|
| 2 |
|
---|
[876] | 3 | # set within server
|
---|
[128] | 4 |
|
---|
[876] | 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 |
|
---|
[148] | 14 | #######################################################################
|
---|
[283] | 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 |
|
---|
[548] | 22 | _javalinks_ {_imagehome__imagehelp_}
|
---|
| 23 | _javalinks_ [v=1] {
|
---|
[283] | 24 | _imagehome_<br>
|
---|
| 25 | _imagehelp_<br>
|
---|
| 26 | }
|
---|
| 27 |
|
---|
| 28 |
|
---|
| 29 | #######################################################################
|
---|
[276] | 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 |
|
---|
[876] | 36 | _ccsfunctions_ {argcc = "";
|
---|
| 37 | savedccs = new Object();
|
---|
[276] | 38 |
|
---|
[876] | 39 | function initialize () \{
|
---|
| 40 | for (i = 0; i < document.links.length; i++)
|
---|
| 41 | savedhrefs[i] = document.links[i].href;
|
---|
[276] | 42 |
|
---|
[876] | 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 | \}
|
---|
[276] | 59 |
|
---|
[876] | 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 | }
|
---|
[276] | 71 |
|
---|
[876] | 72 | _standardfunctions_ {
|
---|
| 73 | function initialize () \{
|
---|
| 74 | for (i = 0; i < document.links.length; i++)
|
---|
| 75 | savedhrefs[i] = document.links[i].href;
|
---|
| 76 | \}
|
---|
| 77 | }
|
---|
[276] | 78 |
|
---|
[876] | 79 | _getargsfunction_ {
|
---|
| 80 | function getargs () \{
|
---|
[942] | 81 | return argk + args + argm + argo + arghd + argb_If_(_collectionoption_,_ccsargs_)_If_(_htmloptions_,_htmlargs_);
|
---|
[876] | 82 | \}
|
---|
| 83 | }
|
---|
[276] | 84 |
|
---|
[876] | 85 | _ccsargs_ {+ argcc}
|
---|
| 86 | _htmlargs_ {+ argel + argil + argfc + arghl}
|
---|
[276] | 87 |
|
---|
[876] | 88 | _htmlfunctions_ {argel = "";
|
---|
| 89 | argil = "";
|
---|
| 90 | argfc = "";
|
---|
| 91 | arghl = "";
|
---|
[276] | 92 |
|
---|
[876] | 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 | \}
|
---|
[276] | 99 |
|
---|
[876] | 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 | \}
|
---|
[548] | 106 |
|
---|
[876] | 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 | \}
|
---|
[725] | 114 |
|
---|
[876] | 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 | }
|
---|
[725] | 123 |
|
---|
[876] | 124 | _argfcblank_ {argfc = "";}
|
---|
| 125 | _argfcon_ {argfc = "&fc=1&f=1";}
|
---|
| 126 | _argfcoff_ {argfc = "&fc=0&f=0";}
|
---|
[276] | 127 |
|
---|
[876] | 128 | _arghlblank_ {arghl = "";}
|
---|
| 129 | _arghlon_ {arghl = "&hl=1";}
|
---|
| 130 | _arghloff_ {arghl = "&hl=0";}
|
---|
[591] | 131 |
|
---|
[942] | 132 | _arghdblank_ {arghd = "";}
|
---|
| 133 | _arghdon_ {arghd = "&hd=1";}
|
---|
| 134 | _arghdoff_{arghd = "&hd=0";}
|
---|
| 135 |
|
---|
[876] | 136 | _pagescriptextra_ {
|
---|
| 137 | // preferences scripts generated from \_preferences:pagescriptextra\_
|
---|
[591] | 138 |
|
---|
[876] | 139 | savedhrefs = new Object();
|
---|
| 140 |
|
---|
| 141 | argk = "";
|
---|
| 142 | args = "";
|
---|
| 143 | argm = "";
|
---|
| 144 | argo = "";
|
---|
| 145 | argb = "";
|
---|
[942] | 146 | arghd = "";
|
---|
[901] | 147 | _If_(_collectionoption_,_ccsfunctions_,_standardfunctions_)
|
---|
[876] | 148 | _If_(_htmloptions_,_htmlfunctions_)
|
---|
| 149 | _getargsfunction_
|
---|
| 150 | function updatehrefs () \{
|
---|
| 151 | for (i = 0; i < document.links.length; i++)
|
---|
| 152 | document.links[i].href = savedhrefs[i] + getargs();
|
---|
| 153 | \}
|
---|
| 154 |
|
---|
| 155 | function updatek (value) \{
|
---|
| 156 | if (value != _cgiargk_) argk = "&k=" + value;
|
---|
| 157 | else argk = "";
|
---|
| 158 | updatehrefs();
|
---|
| 159 | \}
|
---|
| 160 |
|
---|
| 161 | function updates (value) \{
|
---|
| 162 | if (value != _cgiargs_) args = "&s=" + value;
|
---|
| 163 | else args = "";
|
---|
| 164 | updatehrefs();
|
---|
| 165 | \}
|
---|
| 166 |
|
---|
| 167 | function updatem () \{
|
---|
| 168 | value = document.PrefForm.m.options[document.PrefForm.m.selectedIndex].value;
|
---|
| 169 | if (value != _cgiargm_) argm = "&r=1&m=" + value;
|
---|
| 170 | else argm = "";
|
---|
| 171 | updatehrefs();
|
---|
| 172 | \}
|
---|
| 173 |
|
---|
| 174 | function updateo () \{
|
---|
| 175 | value = document.PrefForm.o.options[document.PrefForm.o.selectedIndex].value;
|
---|
| 176 | if (value != _cgiargo_) argo = "&r=1&o=" + value;
|
---|
| 177 | else argo = "";
|
---|
| 178 | updatehrefs();
|
---|
| 179 | \}
|
---|
| 180 |
|
---|
| 181 | function updateb (value) \{
|
---|
| 182 | if (value != _cgiargb_) argb = "&b=" + value;
|
---|
| 183 | else argb = "";
|
---|
| 184 | updatehrefs();
|
---|
| 185 | \}
|
---|
| 186 |
|
---|
[942] | 187 | function updatehd () \{
|
---|
| 188 | if (document.PrefForm.hd.checked)
|
---|
| 189 | _If_("_cgiarghd_" eq "1",_arghdblank_,_arghdon_)
|
---|
| 190 | else
|
---|
| 191 | _If_("_cgiarghd_" ne "1",_arghdblank_,_arghdoff_)
|
---|
| 192 | updatehrefs();
|
---|
| 193 | \}
|
---|
| 194 |
|
---|
[876] | 195 | function updatel () \{
|
---|
| 196 | value = document.PrefForm.l.options[document.PrefForm.l.selectedIndex].value;
|
---|
| 197 | location.href = location.href + "&l=" + value + getargs();
|
---|
| 198 | \}
|
---|
| 199 |
|
---|
| 200 | function updatev () \{
|
---|
| 201 | value = document.PrefForm.v.options[document.PrefForm.v.selectedIndex].value;
|
---|
| 202 | location.href = location.href + "&v=" + value + getargs();
|
---|
| 203 | \}
|
---|
| 204 |
|
---|
| 205 | function updatew () \{
|
---|
| 206 | value = document.PrefForm.w.options[document.PrefForm.w.selectedIndex].value;
|
---|
| 207 | location.href = location.href + "&nw=" + value + getargs();
|
---|
| 208 | \}
|
---|
[276] | 209 | }
|
---|
| 210 |
|
---|
| 211 | #######################################################################
|
---|
| 212 | # headers
|
---|
| 213 | # these are overridden so we can put an onLoad event handler
|
---|
| 214 | # in the <body> tag of this page
|
---|
| 215 | #######################################################################
|
---|
| 216 |
|
---|
| 217 |
|
---|
| 218 | _header_ {_cgihead_
|
---|
| 219 | _htmlhead_(background="_httpiconchalk_" onLoad="initialize();")_startspacer__pagebanner_
|
---|
| 220 | }
|
---|
| 221 |
|
---|
| 222 | # this declaration ends up being the same as style=restrict, never mind
|
---|
[548] | 223 | _header_[v=1] {_cgihead_
|
---|
[276] | 224 | _htmlhead_(onLoad="initialize();")_pagebanner_
|
---|
| 225 | }
|
---|
| 226 |
|
---|
| 227 |
|
---|
| 228 | #######################################################################
|
---|
[148] | 229 | # page content
|
---|
| 230 | #######################################################################
|
---|
[128] | 231 |
|
---|
[148] | 232 | _pagetitle_ {_collectionname_: _textpreferences_}
|
---|
| 233 | _imagethispage_ {_iconthispage_}
|
---|
| 234 |
|
---|
[876] | 235 | _htmloptions_ {}
|
---|
| 236 |
|
---|
| 237 | _htmloptionson_ {
|
---|
| 238 | <p>
|
---|
| 239 | _fcoption_
|
---|
| 240 | <p>
|
---|
| 241 | _hloption_
|
---|
| 242 | <p>
|
---|
| 243 | _extlinkoption_
|
---|
| 244 | _If_(_PreferenceDocsFromWeb_,<p>
|
---|
| 245 | _intlinkoption_)
|
---|
| 246 | }
|
---|
| 247 |
|
---|
[128] | 248 | _caseoption_ {
|
---|
[591] | 249 | <input type=radio name=k value=1 onClick="updatek(1);"
|
---|
[180] | 250 | _If_(_cgiargk_, checked)>_textignorecase_<br>
|
---|
[591] | 251 | <input type=radio name=k value=0 onClick="updatek(0);"
|
---|
[180] | 252 | _If_(_cgiargk_,, checked)>_textmatchcase_
|
---|
[128] | 253 | }
|
---|
| 254 |
|
---|
[1201] | 255 | _caseoption_ [l=ar] {}
|
---|
| 256 |
|
---|
[876] | 257 | _fcoption_ {
|
---|
| 258 | <input type=checkbox name=fc onClick="updatefc();"_If_("_cgiargfc_" eq "1", checked)>
|
---|
| 259 | _textfcoption_
|
---|
| 260 | }
|
---|
| 261 |
|
---|
| 262 | _hloption_ {
|
---|
| 263 | <input type=checkbox name=hl onClick="updatehl();"_If_("_cgiarghl_" eq "1", checked)>
|
---|
| 264 | _texthloption_
|
---|
| 265 | }
|
---|
| 266 |
|
---|
[666] | 267 | _caseoption_ [l=zh] {}
|
---|
| 268 |
|
---|
[128] | 269 | _stemoption_ {
|
---|
[591] | 270 | <input type=radio name=s value=1 onClick="updates(1);"
|
---|
[876] | 271 | _If_(_cgiargs_, checked)>_textstem_<br>
|
---|
[591] | 272 | <input type=radio name=s value=0 onClick="updates(0);"
|
---|
[876] | 273 | _If_(_cgiargs_,, checked)>_textnostem_
|
---|
[128] | 274 | }
|
---|
| 275 |
|
---|
[666] | 276 | _stemoption_ [l=zh] {}
|
---|
| 277 |
|
---|
[128] | 278 | _maxdocoption_ {
|
---|
[591] | 279 | <select name="m" onChange="updatem();">
|
---|
[180] | 280 | <option value="50"_If_("_cgiargm_" eq "50", selected)>50
|
---|
| 281 | <option value="100"_If_("_cgiargm_" eq "100", selected)>100
|
---|
| 282 | <option value="200"_If_("_cgiargm_" eq "200", selected)>200
|
---|
[128] | 283 | </select>
|
---|
| 284 | }
|
---|
| 285 |
|
---|
| 286 | _hitsperpageoption_ {
|
---|
[591] | 287 | <select name="o" onChange="updateo();">
|
---|
[180] | 288 | <option value="10"_If_("_cgiargo_" eq "10", selected)>10
|
---|
| 289 | <option value="20"_If_("_cgiargo_" eq "20", selected)>20
|
---|
| 290 | <option value="50"_If_("_cgiargo_" eq "50", selected)>50
|
---|
[876] | 291 | <option value="100")_If_("_cgiargo_" eq "100", selected)>_textall_
|
---|
[128] | 292 | </select>
|
---|
| 293 | }
|
---|
| 294 |
|
---|
[548] | 295 | _modeoption_ {
|
---|
[591] | 296 | <input type=radio name=b value=0 onClick="updateb(0);"
|
---|
[548] | 297 | _If_(_cgiargb_,, checked)>_textsimplemode_<br>
|
---|
[591] | 298 | <input type=radio name=b value=1 onClick="updateb(1);"
|
---|
[548] | 299 | _If_(_cgiargb_, checked)>_textadvancedmode_
|
---|
| 300 | }
|
---|
| 301 |
|
---|
[942] | 302 | _searchhistoryop_ {
|
---|
| 303 | <input type=checkbox name="hd" onClick="updatehd();"
|
---|
| 304 | _If_("_cgiarghd_" eq "1", checked)>_texthistorydisplay_
|
---|
| 305 | }
|
---|
| 306 |
|
---|
[725] | 307 | _extlinkoption_ {
|
---|
| 308 | _textextlink_
|
---|
| 309 | <select name="el" onChange="updateel();">
|
---|
| 310 | <option value="prompt"_If_("_cgiargel_" eq "prompt", selected)>
|
---|
[876] | 311 | _textlinkinterm_
|
---|
[725] | 312 | <option value="direct"_If_("_cgiargel_" eq "direct", selected)>
|
---|
[876] | 313 | _textlinkdirect_
|
---|
[725] | 314 | </select>
|
---|
| 315 | }
|
---|
| 316 |
|
---|
| 317 | _intlinkoption_ {
|
---|
| 318 | _textintlink_
|
---|
| 319 | <select name="il" onChange="updateil();">
|
---|
| 320 | <option value="l"_If_("_cgiargil_" eq "l", selected)>
|
---|
[876] | 321 | _textdigitlib_
|
---|
[725] | 322 | <option value="w"_If_("_cgiargil_" eq "w", selected)>
|
---|
[876] | 323 | _textweb_
|
---|
[725] | 324 | </select>
|
---|
| 325 | }
|
---|
| 326 |
|
---|
[876] | 327 | _languageoption_ {}
|
---|
[725] | 328 |
|
---|
[876] | 329 | _enlanguageoption_ {<option value="en"_If_("_cgiargl_",, selected)_If_("_cgiargl_" eq "en", selected)>_textlangeng_}
|
---|
[1032] | 330 | _delanguageoption_ {<option value="de"_If_("_cgiargl_" eq "de", selected)>_textlanggerman_}
|
---|
[1212] | 331 | _frlanguageoption_ {<option value="fr"_If_("_cgiargl_" eq "fr", selected)>_textlangfrench_}
|
---|
| 332 | _eslanguageoption_ {<option value="es"_If_("_cgiargl_" eq "es", selected)>_textlangspanish_}
|
---|
[876] | 333 | _milanguageoption_ {<option value="mi"_If_("_cgiargl_" eq "mi", selected)>_textlangmaori_}
|
---|
| 334 | _zhlanguageoption_ {<option value="zh"_If_("_cgiargl_" eq "zh", selected)>_textlangchinese_}
|
---|
[1234] | 335 | _arlanguageoption_ {<option value="ar"_If_("_cgiargl_" eq "ar", selected)>_textlangarabic_}
|
---|
[276] | 336 |
|
---|
[591] | 337 | _encodingoption_ {
|
---|
| 338 | _textencoding_
|
---|
| 339 | <select name="w" onChange="updatew();">
|
---|
| 340 | <option value="w" _If_("_cgiargw_" eq "w",selected)>Western (ISO-8859-1)
|
---|
| 341 | <option value="u" _If_("_cgiargw_" eq "u",selected)>UTF-8
|
---|
| 342 | <option value="g" _If_("_cgiargw_" eq "g",selected)>GBK
|
---|
[1234] | 343 | <option value="a" _If_("_cgiargw_" eq "a",selected)>Arabic (windows 1256)
|
---|
[591] | 344 | </select>
|
---|
| 345 | }
|
---|
| 346 |
|
---|
[276] | 347 | _formatoption_ {
|
---|
| 348 | _textformat_
|
---|
[591] | 349 | <select name="v" onChange="updatev();">
|
---|
[644] | 350 | <option value="0"_If_("_cgiargv_" eq "0", selected)>_textgraphical_
|
---|
| 351 | <option value="1"_If_("_cgiargv_" eq "1", selected)>_texttextual_
|
---|
[276] | 352 | </select>
|
---|
| 353 | }
|
---|
| 354 |
|
---|
[128] | 355 | _content_ {
|
---|
[276] | 356 | <center>
|
---|
| 357 | _navigationbar_
|
---|
| 358 | </center>
|
---|
[128] | 359 | <blockquote>
|
---|
| 360 |
|
---|
| 361 | <form name=PrefForm method=get action="_gwcgi_">
|
---|
| 362 |
|
---|
[876] | 363 | <input type="hidden" name="e" value="_decodedcompressedoptions_">
|
---|
[128] | 364 |
|
---|
[876] | 365 | _If_(_collectionoption_,_collectionprefs_)
|
---|
| 366 | _presentationprefs_
|
---|
| 367 | _searchprefs_
|
---|
| 368 |
|
---|
| 369 | </blockquote>
|
---|
| 370 | </form>
|
---|
| 371 | }
|
---|
| 372 |
|
---|
| 373 | _searchprefs_ {
|
---|
| 374 | <h3>_textsearchprefs_</h3>
|
---|
[725] | 375 | <p>
|
---|
| 376 | _caseoption_
|
---|
[128] | 377 |
|
---|
[725] | 378 | <p>
|
---|
| 379 | _stemoption_
|
---|
[128] | 380 |
|
---|
| 381 | <p>
|
---|
[548] | 382 | _modeoption_
|
---|
| 383 |
|
---|
| 384 | <p>
|
---|
[942] | 385 | _searchhistoryop_
|
---|
| 386 |
|
---|
| 387 | <p>
|
---|
[876] | 388 | _textprefop_
|
---|
| 389 | <br>_iconblankbar_
|
---|
| 390 | }
|
---|
[725] | 391 |
|
---|
[876] | 392 | _collectionprefs_ {
|
---|
| 393 | <h3>_textcollectionprefs_</h3>
|
---|
| 394 | _collectionoption_
|
---|
| 395 | <br>_iconblankbar_
|
---|
| 396 | }
|
---|
[725] | 397 |
|
---|
[876] | 398 | _presentationprefs_ {
|
---|
| 399 | <h3>_textpresentationprefs_</h3>
|
---|
| 400 | _htmloptions_
|
---|
| 401 |
|
---|
[725] | 402 | <p>
|
---|
[276] | 403 | _languageoption_
|
---|
| 404 |
|
---|
| 405 | <p>
|
---|
[591] | 406 | _encodingoption_
|
---|
| 407 |
|
---|
| 408 | <p>
|
---|
[276] | 409 | _formatoption_
|
---|
[876] | 410 | <br>_iconblankbar_
|
---|
[128] | 411 | }
|
---|
[148] | 412 |
|
---|
| 413 | #######################################################################
|
---|
| 414 | # icons
|
---|
| 415 | #######################################################################
|
---|
| 416 |
|
---|
| 417 | _iconthispage_ {<img src="_httpiconhpref_" alt="_textpreferences_" width="_widthhpref_" height="_heighthpref_">}
|
---|