Changeset 12764


Ignore:
Timestamp:
2006-09-15T16:42:18+12:00 (18 years ago)
Author:
kjdon
Message:

changed preferences page, in particular search type and query box and num fields stuff

Location:
trunk/gsdl/macros
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/macros/english.dm

    r12759 r12764  
    406406_textpreferences_ {Preferences}
    407407_textcasediffs_ {Case differences:}
    408 _textignorecase_ { ignore case differences}
    409 _textmatchcase_ { upper/lower case must match}
     408_textignorecase_ {ignore case differences}
     409_textmatchcase_ {upper/lower case must match}
    410410_textwordends_ {Word endings:}
    411 _textstem_ { ignore word endings}
    412 _textnostem_ { whole word must match}
     411_textstem_ {ignore word endings}
     412_textnostem_ {whole word must match}
    413413_textprefop_ {Return up to _maxdocoption_ hits with _hitsperpageoption_ hits per page.}
    414414_textextlink_ {Access to external Web pages:}
     
    419419_textall_ {all}
    420420_textquerymode_ {Query mode:}
    421 _textsimplemode_ { simple query mode}
    422 _textadvancedmode_ { advanced query mode (allows boolean searching using !, &, |, and parentheses)}
     421_textsimplemode_ {simple query mode}
     422_textadvancedmode_ {advanced query mode (allows boolean searching using !, &, |, and parentheses)}
    423423_textlinkinterm_ {through intermediate page}
    424424_textlinkdirect_ {go directly there}
     
    431431<br>}
    432432
     433_textsearchtype_ {Search type:}
     434_textformsearchtype_ {form with _formnumfieldoption_ fields}
     435_textplainsearchtype_ {plain with _boxsizeoption_ query box}
     436_textregularbox_ {regular}
     437_textlargebox_ {large}
     438
    433439_textrelateddocdisplay_ {display related documents}
    434440_textsearchhistory_ {Search history:}
    435 _textnohistory_ { No search history}
    436 _texthistorydisplay_ { display _historynumrecords_ search history records}
    437 _textnohistorydisplay_ { do not display search history}
    438 
    439 #_texttypesearch_ {Type of search:}
    440 #_texttextsearch_ {text search}
    441 _textformsearch_ {Form search:}
    442 _textplainsearch_ {Plain search:}
    443 _textqueryboxsize_ {Query box size:}
    444 _textregbox_ { regular query box}
    445 _textbigbox_ { large query box}
    446 _textformtype_ {Form type:}
    447 _textsimple_ { simple}
    448 _textadvanced_ { advanced}
    449 
    450 # used in "with 4 fields" in the form search box
    451 _textwith_ {with}
    452 _textfields_ {fields}
     441_textnohistory_ {No search history}
     442_texthistorydisplay_ {display _historynumrecords_ search history records}
     443_textnohistorydisplay_ {do not display search history}
    453444
    454445
  • trunk/gsdl/macros/pref.dm

    r11155 r12764  
    8484_getargsfunction_ {
    8585function getargs () \{
    86   return argk + args + argm + argo + argrd + arghd + argb + argqf + argqb + argfqn_If_(_collectionoption_,_ccsargs_)_If_(_htmloptions_,_htmlargs_);
     86  return argk + args + argm + argo + argrd + arghd + argb + argqf + argqb + argfqn + argqt_If_(_collectionoption_,_ccsargs_)_If_(_htmloptions_,_htmlargs_);
    8787\}
    8888}
     
    138138argqb = "";
    139139argfqn = "";
     140argqt= "";
    140141
    141142_If_(_collectionoption_,_ccsfunctions_,_standardfunctions_)
     
    181182\}
    182183
     184function updateqt (value) \{
     185     alert ("updateqt");
     186  if (value != _cgiargqt_) argqt = "&qt=" + value;
     187  else argqt = "";
     188 alert ("argqt = "+argqt);
     189  updatehrefs();
     190\}
     191
    183192function updatefqn () \{
    184193  value = document.PrefForm.fqn.options[document.PrefForm.fqn.selectedIndex].value;
     
    191200  if (value != _cgiargb_) argb = "&b=" + value;
    192201  else argb = "";
    193   updatehrefs();
    194 \}
    195 function updateqf (value) \{
    196   if (value != _cgiargqf_) argqf = "&qf=" + value;
    197   else argqf = "";
    198202  updatehrefs();
    199203\}
     
    211215\}
    212216
    213 function updateqb(value) \{
    214   if (value != _cgiargqb_) argqb = "&qb=" + value;
     217
     218function updateqb() \{
     219
     220   value = document.PrefForm.qb.options[document.PrefForm.qb.selectedIndex].value;
     221   if (value != _cgiargqb_) argqb = "&qb=" + value;
    215222  else argqb = "";
    216   updatehrefs();
     223   updatehrefs();
    217224\}
    218225
     
    246253\}
    247254
    248 function updateqt (value) \{
    249   if (value != _cgiargqt_) \{
    250     href = location.href;
    251     while (href.match(/&cc=[\\w]+/)) href = href.replace(/&cc=[\\w]+/, "");
    252     location.href = href + "&qt=" + value + getargs();
    253   \}   
    254 \}
    255255}
    256256
     
    310310
    311311#search pref options
     312
     313
     314# search type option
     315_searchtypeoptionplain_ {
     316<td valign=baseline>_textsearchtype_</td>
     317<td>_textplainsearchtype_</td>
     318}
     319_searchtypeoptionform_ {
     320<td valign=baseline>_textsearchtype_</td>
     321<td>_textformsearchtype_</td>
     322}
     323_searchtypeoptionboth_ {
     324<td valign=baseline>_textsearchtype_</td>
     325<td><input type=radio name=qt value=0 onClick="updateqt(0);"
     326        _If_(_cgiargqt_,, checked)>_textplainsearchtype_<br>
     327<input type=radio name=qt value=1 onClick="updateqt(1);"
     328        _If_(_cgiargqt_, checked)>_textformsearchtype_</td>
     329}
     330
    312331_boxsizeoption_{
    313 <td valign=baseline>_textqueryboxsize_</td>
    314 <td><input type=radio name=qb value=0 onClick="updateqb(0);"
    315         _If_(_cgiargqb_,, checked)>_textregbox_<br>
    316 <input type=radio name=qb value=1 onClick="updateqb(1);"
    317         _If_(_cgiargqb_, checked)>_textbigbox_</td>
     332<select name="qb" onChange="updateqb();">
     333  <option value="0"_If_("_cgiargqb_" eq "0", selected)>_textregularbox_
     334  <option value="1"_If_("_cgiargqb_" eq "1", selected)>_textlargebox_
     335</select>
     336}
     337
     338_formnumfieldoption_ {
     339<select name="fqn" onChange="updatefqn();">
     340  <option value="2"_If_("_cgiargfqn_" eq "2", selected)>2 
     341  <option value="4"_If_("_cgiargfqn_" eq "4", selected)>4
     342  <option value="6"_If_("_cgiargfqn_" eq "6", selected)>6
     343  <option value="8"_If_("_cgiargfqn_" eq "8", selected)>8
     344</select>
     345}
     346
     347_modeoption_ {
     348<td valign=baseline>_textquerymode_</td>
     349<td><input type=radio name=b value=0 onClick="updateb(0);"
     350        _If_(_cgiargb_,, checked)>_textsimplemode_<br>
     351<input type=radio name=b value=1 onClick="updateb(1);"
     352        _If_(_cgiargb_, checked)>_textadvancedmode_</td>
    318353}
    319354
     
    339374_stemoption_ [l=zh] {}
    340375
    341 
    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 _formmodeoption_{
    351 <td valign=baseline>_textformtype_</td>
    352 <td><input type=radio name=qf value=0 onClick="updateqf(0);"
    353         _If_(_cgiargf_,, checked)>_textsimple_<br>
    354 <input type=radio name=qf value=1 onClick="updateqf(1);"
    355         _If_(_cgiargqf_, checked)>_textadvanced_</td>
    356 }
    357 
    358 _formnumfieldoption_ {<td></td><td>_textwith_
    359 <select name="fqn" onChange="updatefqn();">
    360   <option value="2"_If_("_cgiargfqn_" eq "2", selected)>2 
    361   <option value="4"_If_("_cgiargfqn_" eq "4", selected)>4
    362   <option value="6"_If_("_cgiargfqn_" eq "6", selected)>6
    363   <option value="8"_If_("_cgiargfqn_" eq "8", selected)>8
    364 </select>_textfields_</td>
    365 }
    366376
    367377_searchhistoryop_ {
     
    452462#search prefs
    453463_searchprefs_ {
    454 <center><table border=0 cellpadding=0 cellspacing=0 width=_pagewidth_><tr>
     464<table border=0 cellpadding=0 cellspacing=0 width=_pagewidth_><tr>
    455465<td><h3>_textsearchprefs_</h3></td>
    456466<td align=right><input type=submit name="bp" value="_textsetprefs_"></td>
    457 </tr></table></center>
     467</tr></table>
    458468
    459469<table>
    460 _querytypedependantoptions_
     470<tr>_querytypedependantoptions_</tr>
     471
     472<tr>_modeoption_</tr>
    461473
    462474<tr>_caseoption_</tr>
     
    479491
    480492_querytypedependantoptions_ {
    481 _If_("_cgiargct_" eq "0", _plainqueryoptions_,_mgppqueryoptions_)
    482 }
    483 
    484 _mgppqueryoptions_{
    485   _If_("_cgiargqto_" eq "1", _plainqueryoptions_)
    486   _If_("_cgiargqto_" eq "2", _formqueryoptions_)
    487   _If_("_cgiargqto_" eq "3", _dualqueryoptions_)
    488 }
    489 
    490 #query options for mg colls and mgpp colls with only plain searching
    491 _plainqueryoptions_ {
    492 <tr>_modeoption_</tr>
    493 
    494 <tr>_boxsizeoption_</tr>
    495 }
    496 
    497 #query options for mgpp colls with only form searching
    498 _formqueryoptions_ {
    499 <noscript><tr><td colspan=2><b>_query:textnojsformwarning_</b></td></tr></noscript>
    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)>_textplainsearch_</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)>_textformsearch_</td></tr>
    509 <tr><td></td><td><table>_formqueryoptions_</table></td></tr>
    510 }
     493_If_("_cgiargct_" eq "0",_searchtypeoptionplain_,_mgppqueryoptions_)
     494}
     495_mgppqueryoptions_ {
     496_If_("_cgiargqto_" eq "1", _searchtypeoptionplain_)
     497_If_("_cgiargqto_" eq "2", _searchtypeoptionform_)
     498_If_("_cgiargqto_" eq "3", _searchtypeoptionboth_)
     499}
     500
     501# should this go somewhere??
     502#<noscript><tr><td colspan=2><b>_query:textnojsformwarning_</b></td></tr></noscript>
    511503
    512504_collectionprefs_ {
Note: See TracChangeset for help on using the changeset viewer.