[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 () \{
|
---|
[901] | 81 | return argk + args + argm + argo + 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 |
|
---|
[876] | 132 | _pagescriptextra_ {
|
---|
| 133 | // preferences scripts generated from \_preferences:pagescriptextra\_
|
---|
[591] | 134 |
|
---|
[876] | 135 | savedhrefs = new Object();
|
---|
| 136 |
|
---|
| 137 | argk = "";
|
---|
| 138 | args = "";
|
---|
| 139 | argm = "";
|
---|
| 140 | argo = "";
|
---|
| 141 | argb = "";
|
---|
[901] | 142 | _If_(_collectionoption_,_ccsfunctions_,_standardfunctions_)
|
---|
[876] | 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 | \}
|
---|
[276] | 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
|
---|
[548] | 210 | _header_[v=1] {_cgihead_
|
---|
[276] | 211 | _htmlhead_(onLoad="initialize();")_pagebanner_
|
---|
| 212 | }
|
---|
| 213 |
|
---|
| 214 |
|
---|
| 215 | #######################################################################
|
---|
[148] | 216 | # page content
|
---|
| 217 | #######################################################################
|
---|
[128] | 218 |
|
---|
[148] | 219 | _pagetitle_ {_collectionname_: _textpreferences_}
|
---|
| 220 | _imagethispage_ {_iconthispage_}
|
---|
| 221 |
|
---|
[876] | 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 |
|
---|
[128] | 235 | _caseoption_ {
|
---|
[591] | 236 | <input type=radio name=k value=1 onClick="updatek(1);"
|
---|
[180] | 237 | _If_(_cgiargk_, checked)>_textignorecase_<br>
|
---|
[591] | 238 | <input type=radio name=k value=0 onClick="updatek(0);"
|
---|
[180] | 239 | _If_(_cgiargk_,, checked)>_textmatchcase_
|
---|
[128] | 240 | }
|
---|
| 241 |
|
---|
[876] | 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 |
|
---|
[666] | 252 | _caseoption_ [l=zh] {}
|
---|
| 253 |
|
---|
[128] | 254 | _stemoption_ {
|
---|
[591] | 255 | <input type=radio name=s value=1 onClick="updates(1);"
|
---|
[876] | 256 | _If_(_cgiargs_, checked)>_textstem_<br>
|
---|
[591] | 257 | <input type=radio name=s value=0 onClick="updates(0);"
|
---|
[876] | 258 | _If_(_cgiargs_,, checked)>_textnostem_
|
---|
[128] | 259 | }
|
---|
| 260 |
|
---|
[666] | 261 | _stemoption_ [l=zh] {}
|
---|
| 262 |
|
---|
[128] | 263 | _maxdocoption_ {
|
---|
[591] | 264 | <select name="m" onChange="updatem();">
|
---|
[180] | 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
|
---|
[128] | 268 | </select>
|
---|
| 269 | }
|
---|
| 270 |
|
---|
| 271 | _hitsperpageoption_ {
|
---|
[591] | 272 | <select name="o" onChange="updateo();">
|
---|
[180] | 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
|
---|
[876] | 276 | <option value="100")_If_("_cgiargo_" eq "100", selected)>_textall_
|
---|
[128] | 277 | </select>
|
---|
| 278 | }
|
---|
| 279 |
|
---|
[548] | 280 | _modeoption_ {
|
---|
[591] | 281 | <input type=radio name=b value=0 onClick="updateb(0);"
|
---|
[548] | 282 | _If_(_cgiargb_,, checked)>_textsimplemode_<br>
|
---|
[591] | 283 | <input type=radio name=b value=1 onClick="updateb(1);"
|
---|
[548] | 284 | _If_(_cgiargb_, checked)>_textadvancedmode_
|
---|
| 285 | }
|
---|
| 286 |
|
---|
[725] | 287 | _extlinkoption_ {
|
---|
| 288 | _textextlink_
|
---|
| 289 | <select name="el" onChange="updateel();">
|
---|
| 290 | <option value="prompt"_If_("_cgiargel_" eq "prompt", selected)>
|
---|
[876] | 291 | _textlinkinterm_
|
---|
[725] | 292 | <option value="direct"_If_("_cgiargel_" eq "direct", selected)>
|
---|
[876] | 293 | _textlinkdirect_
|
---|
[725] | 294 | </select>
|
---|
| 295 | }
|
---|
| 296 |
|
---|
| 297 | _intlinkoption_ {
|
---|
| 298 | _textintlink_
|
---|
| 299 | <select name="il" onChange="updateil();">
|
---|
| 300 | <option value="l"_If_("_cgiargil_" eq "l", selected)>
|
---|
[876] | 301 | _textdigitlib_
|
---|
[725] | 302 | <option value="w"_If_("_cgiargil_" eq "w", selected)>
|
---|
[876] | 303 | _textweb_
|
---|
[725] | 304 | </select>
|
---|
| 305 | }
|
---|
| 306 |
|
---|
[876] | 307 | _languageoption_ {}
|
---|
[725] | 308 |
|
---|
[876] | 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_}
|
---|
[276] | 312 |
|
---|
[591] | 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 |
|
---|
[276] | 322 | _formatoption_ {
|
---|
| 323 | _textformat_
|
---|
[591] | 324 | <select name="v" onChange="updatev();">
|
---|
[644] | 325 | <option value="0"_If_("_cgiargv_" eq "0", selected)>_textgraphical_
|
---|
| 326 | <option value="1"_If_("_cgiargv_" eq "1", selected)>_texttextual_
|
---|
[276] | 327 | </select>
|
---|
| 328 | }
|
---|
| 329 |
|
---|
[128] | 330 | _content_ {
|
---|
[276] | 331 | <center>
|
---|
| 332 | _navigationbar_
|
---|
| 333 | </center>
|
---|
[128] | 334 | <blockquote>
|
---|
| 335 |
|
---|
| 336 | <form name=PrefForm method=get action="_gwcgi_">
|
---|
| 337 |
|
---|
[876] | 338 | <input type="hidden" name="e" value="_decodedcompressedoptions_">
|
---|
[128] | 339 |
|
---|
[876] | 340 | _If_(_collectionoption_,_collectionprefs_)
|
---|
| 341 | _presentationprefs_
|
---|
| 342 | _searchprefs_
|
---|
| 343 |
|
---|
| 344 | </blockquote>
|
---|
| 345 | </form>
|
---|
| 346 | }
|
---|
| 347 |
|
---|
| 348 | _searchprefs_ {
|
---|
| 349 | <h3>_textsearchprefs_</h3>
|
---|
[725] | 350 | <p>
|
---|
| 351 | _caseoption_
|
---|
[128] | 352 |
|
---|
[725] | 353 | <p>
|
---|
| 354 | _stemoption_
|
---|
[128] | 355 |
|
---|
| 356 | <p>
|
---|
[548] | 357 | _modeoption_
|
---|
| 358 |
|
---|
| 359 | <p>
|
---|
[876] | 360 | _textprefop_
|
---|
| 361 | <br>_iconblankbar_
|
---|
| 362 | }
|
---|
[725] | 363 |
|
---|
[876] | 364 | _collectionprefs_ {
|
---|
| 365 | <h3>_textcollectionprefs_</h3>
|
---|
| 366 | _collectionoption_
|
---|
| 367 | <br>_iconblankbar_
|
---|
| 368 | }
|
---|
[725] | 369 |
|
---|
[876] | 370 | _presentationprefs_ {
|
---|
| 371 | <h3>_textpresentationprefs_</h3>
|
---|
| 372 | _htmloptions_
|
---|
| 373 |
|
---|
[725] | 374 | <p>
|
---|
[276] | 375 | _languageoption_
|
---|
| 376 |
|
---|
| 377 | <p>
|
---|
[591] | 378 | _encodingoption_
|
---|
| 379 |
|
---|
| 380 | <p>
|
---|
[276] | 381 | _formatoption_
|
---|
[876] | 382 | <br>_iconblankbar_
|
---|
[128] | 383 | }
|
---|
[148] | 384 |
|
---|
| 385 | #######################################################################
|
---|
| 386 | # https
|
---|
| 387 | #######################################################################
|
---|
| 388 |
|
---|
| 389 | _httpiconhpref_ {_httpimg_/h\_pref.gif}
|
---|
[548] | 390 | _httpiconhpref_ [l=mi] {_httpimg_/mh\_pref.gif}
|
---|
[148] | 391 | _widthhpref_ {200}
|
---|
[548] | 392 | _widthhpref_ [l=mi] {220}
|
---|
[148] | 393 | _heighthpref_ {57}
|
---|
| 394 |
|
---|
| 395 |
|
---|
| 396 | #######################################################################
|
---|
| 397 | # icons
|
---|
| 398 | #######################################################################
|
---|
| 399 |
|
---|
| 400 | _iconthispage_ {<img src="_httpiconhpref_" alt="_textpreferences_" width="_widthhpref_" height="_heighthpref_">}
|
---|
[548] | 401 | _iconthispage_ [l=mi] {<img src="_httpimg_/mh\_pref.gif" alt="" width="220" height="57">}
|
---|
[148] | 402 |
|
---|
| 403 |
|
---|
| 404 |
|
---|
| 405 |
|
---|
[644] | 406 |
|
---|
[666] | 407 |
|
---|
| 408 |
|
---|
[148] | 409 |
|
---|