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