Changeset 4763
- Timestamp:
- 2003-06-23T14:34:35+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/macros/pref.dm
r4199 r4763 43 43 for (i = 0; i < document.links.length; i++) 44 44 savedhrefs[i] = document.links[i].href; 45 46 // only add form search option if mgpp (ct arg) and javascript47 _If_("_cgiargct_" eq "1",var opt=new Option\("_textformsearch_"\, "1"\); document.PrefForm.qt.options[1]=opt;,//)_If_("_cgiargqt_" eq "1",opt.selected=1;)48 45 49 46 s = "_cgiargcc_"; … … 85 82 for (i = 0; i < document.links.length; i++) 86 83 savedhrefs[i] = document.links[i].href; 87 // only add form search option if mgpp (ct arg) and javascript 88 _If_("_cgiargct_" eq "1",var opt=new Option\("_textformsearch_"\, "1"\); document.PrefForm.qt.options[1]=opt;,//)_If_("_cgiargqt_" eq "1",opt.selected=1;) 89 \} 84 85 \} 86 90 87 } 91 88 92 89 _getargsfunction_ { 93 90 function getargs () \{ 94 return argk + args + argm + argo + argrd + arghd + argb + argq b + argfqn_If_(_collectionoption_,_ccsargs_)_If_(_htmloptions_,_htmlargs_);91 return argk + args + argm + argo + argrd + arghd + argb + argqf + argqb + argfqn_If_(_collectionoption_,_ccsargs_)_If_(_htmloptions_,_htmlargs_); 95 92 \} 96 93 } … … 142 139 argo = ""; 143 140 argb = ""; 141 argqf = ""; 144 142 arghd = ""; 145 143 argqb = ""; … … 198 196 if (value != _cgiargb_) argb = "&b=" + value; 199 197 else argb = ""; 198 updatehrefs(); 199 \} 200 function updateqf (value) \{ 201 if (value != _cgiargqf_) argqf = "&qf=" + value; 202 else argqf = ""; 200 203 updatehrefs(); 201 204 \} … … 245 248 \} 246 249 247 function updateqt () \{ 248 value = document.PrefForm.qt.options[document.PrefForm.qt.selectedIndex].value; 249 location.href = location.href + "&qt=" + value + getargs(); 250 function updateqt (value) \{ 251 if (value != _cgiargqt_) location.href = location.href + "&qt=" + value + getargs(); 250 252 \} 251 253 } … … 344 346 } 345 347 348 _formmodeoption_{ 349 <td valign=baseline>_textformtype_</td> 350 <td><input type=radio name=qf value=0 onClick="updateqf(0);" 351 _If_(_cgiargf_,, checked)>_textsimple_<br> 352 <input type=radio name=qf value=1 onClick="updateqf(1);" 353 _If_(_cgiargqf_, checked)>_textadvanced_</td> 354 } 355 356 _formnumfieldoption_ {<td></td><td>_textwith_ 357 <select name="fqn" onChange="updatefqn();"> 358 <option value="2"_If_("_cgiargfqn_" eq "2", selected)>2 359 <option value="4"_If_("_cgiargfqn_" eq "4", selected)>4 360 <option value="6"_If_("_cgiargfqn_" eq "6", selected)>6 361 <option value="8"_If_("_cgiargfqn_" eq "8", selected)>8 362 </select>_textfields_</td> 363 } 346 364 347 365 _searchhistoryop_ { … … 428 446 _If_(_collectionoption_,_collectionprefs_) 429 447 _presentationprefs_ 430 _If_("_cgiargct_" eq "1",_mgppsearchprefs_,_mgsearchprefs_) 431 448 _searchprefs_ 432 449 </blockquote> 433 450 </form> 434 451 } 435 452 436 #search prefs for mg collections437 _ mgsearchprefs_ {453 #search prefs 454 _searchprefs_ { 438 455 <center><table border=0 cellpadding=0 cellspacing=0 width=_pagewidth_><tr> 439 456 <td><h3>_textsearchprefs_</h3></td> … … 442 459 443 460 <table> 444 <tr>_boxsizeoption_</tr> 461 _querytypedependantoptions_ 445 462 446 463 <tr>_caseoption_</tr> 447 464 448 465 <tr>_stemoption_</tr> 449 450 <tr>_modeoption_</tr>451 466 452 467 <tr>_searchhistoryop_</tr> … … 462 477 _iconblankbar_ 463 478 <blockquote> 479 } 480 481 _querytypedependantoptions_ { 482 _If_("_cgiargct_" eq "0", _plainqueryoptions_,_mgppqueryoptions_) 483 } 484 485 _mgppqueryoptions_{ 486 _If_("_cgiargqto_" eq "1", _plainqueryoptions_) 487 _If_("_cgiargqto_" eq "2", _formqueryoptions_) 488 _If_("_cgiargqto_" eq "3", _dualqueryoptions_) 489 } 490 491 #query options for mg colls and mgpp colls with only plain searching 492 _plainqueryoptions_ { 493 <tr>_modeoption_</tr> 494 495 <tr>_boxsizeoption_</tr> 496 } 497 498 #query options for mgpp colls with only form searching 499 _formqueryoptions_ { 500 <tr>_formmodeoption_</tr> 501 <tr>_formnumfieldoption_</tr> 502 } 503 504 #query options for mgpp colls with both types of search available 505 _dualqueryoptions_ { 506 <tr><td colspan=2><input type=radio name=qt value=0 onClick="updateqt(0);" _If_(_cgiargqt_,, checked)>Plain search</td></tr> 507 <tr><td></td><td><table>_plainqueryoptions_</table></td></tr> 508 <tr><td colspan=2><input type=radio name=qt value=1 onClick="updateqt(1);" _If_(_cgiargqt_,checked)>Form search</td></tr> 509 <tr><td></td><td><table>_formqueryoptions_</table></td></tr> 464 510 } 465 511 … … 486 532 } 487 533 488 #######################################################489 ## new stuff for prefs for form vs text search - for mgpp collections490 _mgppsearchprefs_ {491 <h3>_textsearchprefs_</h3>492 <table>493 <tr>_searchtypeop_</tr>494 495 _If_(_cgiargqt_,_formsearchoptions_,_textsearchoptions_)496 497 <tr>_caseoption_</tr>498 499 <tr>_stemoption_</tr>500 501 <tr>_searchhistoryop_</tr>502 503 <tr><td colspan=2>_textprefop_</td></tr></table>504 <input type=submit value="Update settings"><!--non-javascript users only-->505 </blockquote>506 _iconblankbar_507 <blockquote>508 }509 510 511 _searchtypeop_ {512 <td>_texttypesearch_</td>513 <td><select name="qt" onChange="updateqt();">514 <option value="0"_If_("_cgiargqt_" eq "0", selected)>_texttextsearch_515 <!-- textformsearch option done in initialize function -->516 </select></td>517 }518 519 _formsearchoptions_ {520 <tr>_formmodeoption_</tr>521 }522 523 _textsearchoptions_ {524 <tr>_boxsizeoption_</tr>525 <tr>_modeoption_</tr>526 }527 528 _formmodeoption_{529 <td valign=baseline>_textformtype_</td>530 <td><input type=radio name=b value=0 onClick="updateb(0);"531 _If_(_cgiargb_,, checked)>_textsimple_<br>532 <input type=radio name=b value=1 onClick="updateb(1);"533 _If_(_cgiargb_, checked)>_textadvanced_<br>534 _formnumoption_</td>535 }536 537 _formnumoption_ {_textwith_538 <select name="fqn" onChange="updatefqn();">539 <option value="2"_If_("_cgiargfqn_" eq "2", selected)>2540 <option value="4"_If_("_cgiargfqn_" eq "4", selected)>4541 <option value="6"_If_("_cgiargfqn_" eq "6", selected)>6542 <option value="8"_If_("_cgiargfqn_" eq "8", selected)>8543 </select>_textfields_</td>544 }545 546 534 547 535 #######################################################################
Note:
See TracChangeset
for help on using the changeset viewer.