Changeset 1950
- Timestamp:
- 2001-02-13T10:20:19+13:00 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/macros/pref.dm
r1946 r1950 43 43 s = "_cgiargcc_"; 44 44 a = s.split (","); 45 for (i = 0; i < a.length ;i++) \{45 for (i = 0; i < a.length ;i++) \{ 46 46 for (j = 0; j < document.PrefForm.cc.length; j++) \{ 47 47 if (a[i] == document.PrefForm.elements["cc"][j].value) \{ … … 61 61 if (savedccs[collection] == 1) savedccs[collection] = 0; 62 62 else savedccs[collection] = 1; 63 63 64 64 var i; 65 65 argcc = ""; 66 66 var changed = 0; 67 68 67 for (i in savedccs) 69 if (savedccs[i] == 1) \{70 71 72 \}68 if (savedccs[i] == 1) \{ 69 argcc += "&cc=" + i; 70 changed = 1; 71 \} 73 72 if (changed == 1) argcc += "&r=1"; 74 75 73 updatehrefs(); 76 74 \} … … 86 84 _getargsfunction_ { 87 85 function getargs () \{ 88 return argk + args + argm + argo + arg hd + argrd + argb + argqb + argfqn_If_(_collectionoption_,_ccsargs_)_If_(_htmloptions_,_htmlargs_);86 return argk + args + argm + argo + argrd + arghd + argb + argqb + argfqn_If_(_collectionoption_,_ccsargs_)_If_(_htmloptions_,_htmlargs_); 89 87 \} 90 88 } … … 137 135 _arghloff_ {arghl = "&hl=0";} 138 136 139 _arghdblank_ {arghd = "";}140 _arghdon_ {arghd = "&hd=1";}141 _arghdoff_{arghd = "&hd=0";}142 143 _argrdblank_ {argrd = "";}144 _argrdon_ {argrd = "&rd=1";}145 _argrdoff_{argrd = "&rd=0";}146 147 137 _pagescriptextra_ { 148 138 // preferences scripts generated from \_preferences:pagescriptextra\_ … … 153 143 args = ""; 154 144 argm = ""; 145 argrd = ""; 155 146 argo = ""; 156 147 argb = ""; 157 148 arghd = ""; 158 argrd = "";159 149 argqb = ""; 160 150 argfqn = ""; … … 187 177 \} 188 178 179 function updaterd () \{ 180 if (document.PrefForm.rd.checked) 181 _If_("_cgiargrd_" eq "1",argrd="";,argrd="&rd=1";) 182 else 183 _If_("_cgiargrd_" ne "1",argrd="";,argrd="&rd=0";) 184 updatehrefs(); 185 \} 186 189 187 function updateo () \{ 190 188 value = document.PrefForm.o.options[document.PrefForm.o.selectedIndex].value; … … 194 192 \} 195 193 194 function updatefqn () \{ 195 value = document.PrefForm.fqn.options[document.PrefForm.fqn.selectedIndex].value; 196 if (value != _cgiargfqn_) argfqn = "&fqn=" + value; 197 else argfqn = ""; 198 updatehrefs(); 199 \} 200 196 201 function updateb (value) \{ 197 202 if (value != _cgiargb_) argb = "&b=" + value; … … 200 205 \} 201 206 202 203 207 function updatehd() \{ 204 arghd=""; 205 if (document.PrefForm.hd[0].checked) \{ 206 if ("_cgiarghd_" != "0") arghd = "&hd=0"; 207 \} 208 else \{ 209 value = document.PrefForm.hdn[document.PrefForm.hdn.selectedIndex].value; 210 if (_cgiarghd_ != value) arghd = "&hd="+value; 211 \} 208 arghd=""; 209 if (document.PrefForm.hd[0].checked) \{ 210 if ("_cgiarghd_" != "0") arghd = "&hd=0"; 211 \} 212 else \{ 213 value = document.PrefForm.hdn[document.PrefForm.hdn.selectedIndex].value; 214 if (_cgiarghd_ != value) arghd = "&hd="+value; 215 \} 216 updatehrefs(); 217 \} 212 218 213 219 function updateqb(value) \{ 214 if (value != _cgiargqb_) argqb = "&qb=" + value; 215 else argqb = ""; 216 \} 217 218 function updaterd () \{ 219 if (document.PrefForm.rd.checked) 220 _If_("_cgiargrd_" eq "1",_argrdblank_,_argrdon_) 221 else 222 _If_("_cgiargrd_" ne "1",_argrdblank_,_argrdoff_) 220 if (value != _cgiargqb_) argqb = "&qb=" + value; 221 else argqb = ""; 223 222 updatehrefs(); 224 223 \} … … 237 236 value = document.PrefForm.w.options[document.PrefForm.w.selectedIndex].value; 238 237 location.href = location.href + "&nl=0&nw=" + value + getargs(); 239 240 241 242 243 244 \} 245 246 } 238 \} 239 240 function updateqt () \{ 241 value = document.PrefForm.qt.options[document.PrefForm.qt.selectedIndex].value; 242 location.href = location.href + "&qt=" + value + getargs(); 243 \} 244 } 245 247 246 248 247 ####################################################################### … … 283 282 } 284 283 285 #search pref options286 _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 304 284 _fcoption_ { 305 285 <input type=checkbox name=fc onClick="updatefc();"_If_("_cgiargfc_" eq "1", checked)> … … 312 292 } 313 293 294 #search pref options 295 _boxsizeoption_{ 296 <td valign=baseline>_textqueryboxsize_</td> 297 <td><input type=radio name=qb value=0 onClick="updateqb(0);" 298 _If_(_cgiargqb_,, checked)>_textregbox_<br> 299 <input type=radio name=qb value=1 onClick="updateqb(1);" 300 _If_(_cgiargqb_, checked)>_textbigbox_</td> 301 } 302 303 _caseoption_ { 304 <td valign=baseline>_textcasediffs_</td> 305 <td><input type=radio name=k value=1 onClick="updatek(1);" 306 _If_(_cgiargk_, checked)>_textignorecase_<br> 307 <input type=radio name=k value=0 onClick="updatek(0);" 308 _If_(_cgiargk_,, checked)>_textmatchcase_</td> 309 } 310 311 _caseoption_ [l=ar] {} 314 312 _caseoption_ [l=zh] {} 315 313 316 314 _stemoption_ { 317 <input type=radio name=s value=1 onClick="updates(1);" 315 <td valign=baseline>_textwordends_</td> 316 <td><input type=radio name=s value=1 onClick="updates(1);" 318 317 _If_(_cgiargs_, checked)>_textstem_<br> 319 318 <input type=radio name=s value=0 onClick="updates(0);" … … 322 321 323 322 _stemoption_ [l=zh] {} 323 324 325 _modeoption_ { 326 <td valign=baseline>_textquerymode_</td> 327 <td><input type=radio name=b value=0 onClick="updateb(0);" 328 _If_(_cgiargb_,, checked)>_textsimplemode_<br> 329 <input type=radio name=b value=1 onClick="updateb(1);" 330 _If_(_cgiargb_, checked)>_textadvancedmode_</td> 331 } 332 333 334 _searchhistoryop_ { 335 <td valign=baseline>_textsearchhistory_</td> 336 <td><input type=radio name="hd" value=0 onClick="updatehd();" 337 _If_("_cgiarghd_" eq "0", checked)>_textnohistorydisplay_<br> 338 <input type=radio name="hd" value=1 onClick="updatehd();" 339 _If_("_cgiarghd_" eq "0",, checked)>_texthistorydisplay_</td> 340 } 341 342 _relateddocop_ { 343 <td colspan=2><nobr><input type=checkbox name="rd" onClick="updaterd();" _If_("_cgiargrd_" eq "1", checked)> 344 Display related documents</nobr></td> 345 } 346 347 _historynumrecords_{<select name="hdn" onChange="updatehd();"> 348 <option value="5"_If_("_cgiarghd_" eq "5", selected)>5 349 <option value="10"_If_("_cgiarghd_" eq "10", selected)>10 350 <option value="15"_If_("_cgiarghd_" eq "15", selected)>15 351 <option value="20"_If_("_cgiarghd_" eq "20", selected)>20 352 </select>} 324 353 325 354 _maxdocoption_ { … … 340 369 } 341 370 342 modeoption_ {343 <td valign=baseline>_textquerymode_</td>344 <td><input type=radio name=b value=0 onClick="updateb(0);"345 _If_(_cgiargb_,, checked)>_textsimplemode_<br>346 <input type=radio name=b value=1 onClick="updateb(1);"347 _If_(_cgiargb_, checked)>_textadvancedmode_</td>348 }349 350 351 _searchhistoryop_ {352 <td valign=baseline>_textsearchhistory_</td>353 <td><input type=radio name="hd" value=0 onClick="updatehd();"354 _If_("_cgiarghd_" eq "0", checked)>_textnohistorydisplay_<br>355 <input type=radio name="hd" value=1 onClick="updatehd();"356 _If_("_cgiarghd_" eq "0",, checked)>_texthistorydisplay_</td>357 }358 359 _historynumrecords_{<select name="hdn" onChange="updatehd();">360 <option value="5"_If_("_cgiarghd_" eq "5", selected)>5361 <option value="10"_If_("_cgiarghd_" eq "10", selected)>10362 <option value="15"_If_("_cgiarghd_" eq "15", selected)>15363 <option value="20"_If_("_cgiarghd_" eq "20", selected)>20364 </select>}365 366 _relateddocop_ {367 <input type=checkbox name="rd" onClick="updaterd();"368 _If_("_cgiargrd_" eq "1", checked)>_textrelateddocdisplay_369 }370 371 371 _extlinkoption_ { 372 372 <td>_textextlink_</td> 373 < <td><select name="el" onChange="updateel();"> 374 373 <td><select name="el" onChange="updateel();"> 375 374 <option value="prompt"_If_("_cgiargel_" eq "prompt", selected)> 376 375 _textlinkinterm_ … … 382 381 _intlinkoption_ { 383 382 <td>_textintlink_</td> 384 < <td><select name="il" onChange="updateil();">383 <td><select name="il" onChange="updateil();"> 385 384 <option value="l"_If_("_cgiargil_" eq "l", selected)> 386 385 _textdigitlib_ … … 390 389 } 391 390 391 # set from within pageaction 392 392 _languageoption_ {} 393 394 393 _encodingoption_ {} 395 394 396 395 _formatoption_ { 397 396 <td>_textformat_</td> 398 397 <td><select name="v" onChange="updatev();"> 399 398 <option value="0"_If_("_cgiargv_" eq "0", selected)>_textgraphical_ 400 399 <option value="1"_If_("_cgiargv_" eq "1", selected)>_texttextual_ … … 406 405 _navigationbar_ 407 406 </center> 407 408 408 <blockquote> 409 409 … … 414 414 _If_(_collectionoption_,_collectionprefs_) 415 415 _presentationprefs_ 416 _ searchprefs_416 _If_("_cgiargct_" eq "1",_mgppsearchprefs_,_mgsearchprefs_) 417 417 418 418 </blockquote> … … 420 420 } 421 421 422 _searchprefs_ { 422 #search prefs for mg collections 423 _mgsearchprefs_ { 423 424 <h3>_textsearchprefs_</h3> 424 < p>425 _caseoption_ 426 427 < p>428 _stemoption_ 429 430 <p> 431 _modeoption_ 432 433 < p>434 _searchhistoryop_ 435 436 <p> 437 _relateddocop_ 438 439 < p>440 _ textprefop_441 <b r>_iconblankbar_425 <table> 426 <tr>_boxsizeoption_</tr> 427 428 <tr>_caseoption_</tr> 429 430 <tr>_stemoption_</tr> 431 432 <tr>_modeoption_</tr> 433 434 <tr>_searchhistoryop_</tr> 435 436 <tr>_relateddocop_</tr> 437 438 <tr><td colspan=2>_textprefop_</td></tr> 439 </table> 440 </blockquote> 441 _iconblankbar_ 442 <blockquote> 442 443 } 443 444 … … 445 446 <h3>_textcollectionprefs_</h3> 446 447 _collectionoption_ 447 <br>_iconblankbar_ 448 </blockquote> 449 _iconblankbar_ 450 <blockquote> 448 451 } 449 452 450 453 _presentationprefs_ { 451 454 <h3>_textpresentationprefs_</h3> 452 _htmloptions_ 453 454 <p> 455 _languageoption_ 456 457 <p> 458 _encodingoption_ 459 460 <p> 461 _formatoption_ 462 <br>_iconblankbar_ 463 } 455 <table>_htmloptions_ 456 457 _If_(_languageoption_,<tr><td>_textlanguage_</td><td>_languageoption_</td></tr>) 458 459 _If_(_encodingoption_,<tr><td>_textencoding_</td><td>_encodingoption_</td></tr>) 460 461 <tr>_formatoption_</tr></table> 462 </blockquote> 463 _iconblankbar_ 464 <blockquote> 465 } 466 467 ####################################################### 468 ## new stuff for prefs for form vs text search - for mgpp collections 469 _mgppsearchprefs_ { 470 <h3>_textsearchprefs_</h3> 471 <table> 472 <tr>_searchtypeop_</tr> 473 474 _If_(_cgiargqt_,_formsearchoptions_,_textsearchoptions_) 475 476 <tr>_caseoption_</tr> 477 478 <tr>_stemoption_</tr> 479 480 <tr>_searchhistoryop_</tr> 481 482 <tr><td colspan=2>_textprefop_</td></tr></table> 483 </blockquote> 484 _iconblankbar_ 485 <blockquote> 486 } 487 488 489 _searchtypeop_ { 490 <td>_texttypesearch_</td> 491 <td><select name="qt" onChange="updateqt();"> 492 <option value="0"_If_("_cgiargqt_" eq "0", selected)>_texttextsearch_ 493 <option value="1"_If_("_cgiargqt_" eq "1", selected)>_textformsearch_ 494 </select></td> 495 } 496 497 _formsearchoptions_ { 498 <tr>_formmodeoption_</tr> 499 } 500 501 _textsearchoptions_ { 502 <tr>_boxsizeoption_</tr> 503 <tr>_modeoption_</tr> 504 } 505 506 _formmodeoption_{ 507 <td valign=baseline>_textformtype_</td> 508 <td><input type=radio name=b value=0 onClick="updateb(0);" 509 _If_(_cgiargb_,, checked)>_textsimple_<br> 510 <input type=radio name=b value=1 onClick="updateb(1);" 511 _If_(_cgiargb_, checked)>_textadvanced_<br> 512 _formnumoption_</td> 513 } 514 515 _formnumoption_ {_textwith_ 516 <select name="fqn" onChange="updatefqn();"> 517 <option value="2"_If_("_cgiargfqn_" eq "2", selected)>2 518 <option value="4"_If_("_cgiargfqn_" eq "4", selected)>4 519 <option value="6"_If_("_cgiargfqn_" eq "6", selected)>6 520 <option value="8"_If_("_cgiargfqn_" eq "8", selected)>8 521 </select>_textfields_</td> 522 } 523 464 524 465 525 ####################################################################### … … 468 528 469 529 _iconthispage_ {<img src="_httpiconhpref_" alt="_textpreferences_" width="_widthhpref_" height="_heighthpref_">} 470 471 472 473 474 475 476 477 478 479
Note:
See TracChangeset
for help on using the changeset viewer.