Changeset 1946


Ignore:
Timestamp:
2001-02-12T11:58:23+13:00 (23 years ago)
Author:
jmt14
Message:

* empty log message *

Location:
trunk/gsdl/macros
Files:
2 edited

Legend:

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

    r1931 r1946  
    669669Subcollections to include:
    670670<br>}
     671_textrelateddocdisplay_ {display related documents}
    671672_textfcoption_ { Include navigation bar at top of document pages}
    672673_texthloption_ { Highlight search terms within document text}
  • trunk/gsdl/macros/pref.dm

    r1930 r1946  
    4343  s = "_cgiargcc_";
    4444  a = s.split (",");
    45   for (i = 0; i < a.length ;i++) \{
     45 for (i = 0; i < a.length ;i++) \{
    4646    for (j = 0; j < document.PrefForm.cc.length; j++) \{
    4747      if (a[i] == document.PrefForm.elements["cc"][j].value) \{
     
    6161  if (savedccs[collection] == 1) savedccs[collection] = 0;
    6262  else savedccs[collection] = 1;
    63        
     63       
    6464  var i;
    6565  argcc = "";
    6666  var changed = 0;
     67
    6768  for (i in savedccs)
    68     if (savedccs[i] == 1) \{
    69        argcc += "&cc=" + i;
    70        changed = 1;
    71     \}
     69  if (savedccs[i] == 1) \{
     70    argcc += "&cc=" + i;
     71        changed = 1;
     72   \}   
    7273  if (changed == 1) argcc += "&r=1";
     74   
    7375  updatehrefs();
    7476\}
     
    8486_getargsfunction_ {
    8587function getargs () \{
    86   return argk + args + argm + argo + arghd + argb + argqb + argfqn_If_(_collectionoption_,_ccsargs_)_If_(_htmloptions_,_htmlargs_);
     88  return argk + args + argm + argo + arghd + argrd + argb + argqb + argfqn_If_(_collectionoption_,_ccsargs_)_If_(_htmloptions_,_htmlargs_);
    8789\}
    8890}
     
    134136_arghlon_ {arghl = "&hl=1";}
    135137_arghloff_ {arghl = "&hl=0";}
     138
     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";}
    136146
    137147_pagescriptextra_ {
     
    146156argb = "";
    147157arghd = "";
     158argrd = "";
    148159argqb = "";
    149160argfqn = "";
     
    183194\}
    184195
    185 function updatefqn () \{
    186   value = document.PrefForm.fqn.options[document.PrefForm.fqn.selectedIndex].value;
    187   if (value != _cgiargfqn_) argfqn = "&fqn=" + value;
    188   else argfqn = "";
    189   updatehrefs();
    190 \}
    191 
    192196function updateb (value) \{
    193197  if (value != _cgiargb_) argb = "&b=" + value;
     
    196200\}
    197201
     202
    198203function updatehd() \{
    199   arghd="";
    200   if (document.PrefForm.hd[0].checked) \{
    201      if ("_cgiarghd_" != "0") arghd = "&hd=0";
    202   \}
    203   else \{
    204      value = document.PrefForm.hdn[document.PrefForm.hdn.selectedIndex].value;
    205      if (_cgiarghd_ != value) arghd = "&hd="+value;
    206   \}
    207   updatehrefs();
    208 \}
     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   \}
    209212
    210213function updateqb(value) \{
    211   if (value != _cgiargqb_) argqb = "&qb=" + value;
    212   else argqb = "";
     214   if (value != _cgiargqb_) argqb = "&qb=" + value;
     215   else argqb = "";
     216\}
     217
     218function updaterd () \{
     219  if (document.PrefForm.rd.checked)
     220    _If_("_cgiargrd_" eq "1",_argrdblank_,_argrdon_)
     221  else
     222    _If_("_cgiargrd_" ne "1",_argrdblank_,_argrdoff_)
    213223  updatehrefs();
    214224\}
     
    227237  value = document.PrefForm.w.options[document.PrefForm.w.selectedIndex].value;
    228238  location.href = location.href + "&nl=0&nw=" + value + getargs();
    229 \}
    230 
    231 function updateqt () \{
    232   value = document.PrefForm.qt.options[document.PrefForm.qt.selectedIndex].value;
    233   location.href = location.href + "&qt=" + value + getargs();
    234 \}
    235 }
    236 
     239 \}
     240 
     241 function updateqt () \{
     242   value = document.PrefForm.qt.options[document.PrefForm.qt.selectedIndex].value;
     243   location.href = location.href + "&qt=" + value + getargs();
     244\}
     245
     246}
    237247
    238248#######################################################################
     
    273283}
    274284
     285#search pref options
     286 _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
    275304_fcoption_ {
    276305<input type=checkbox name=fc onClick="updatefc();"_If_("_cgiargfc_" eq "1", checked)>
     
    283312}
    284313
    285 #search pref options
    286 _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] {}
    303314_caseoption_ [l=zh] {}
    304315
    305316_stemoption_ {
    306 <td valign=baseline>_textwordends_</td>
    307 <td><input type=radio name=s value=1 onClick="updates(1);"
     317<input type=radio name=s value=1 onClick="updates(1);"
    308318  _If_(_cgiargs_, checked)>_textstem_<br>
    309319<input type=radio name=s value=0 onClick="updates(0);"
     
    312322
    313323_stemoption_ [l=zh] {}
    314 
    315 
    316 _modeoption_ {
    317 <td valign=baseline>_textquerymode_</td>
    318 <td><input type=radio name=b value=0 onClick="updateb(0);"
    319         _If_(_cgiargb_,, checked)>_textsimplemode_<br>
    320 <input type=radio name=b value=1 onClick="updateb(1);"
    321         _If_(_cgiargb_, checked)>_textadvancedmode_</td>
    322 }
    323 
    324 
    325 _searchhistoryop_ {
    326 <td valign=baseline>_textsearchhistory_</td>
    327 <td><input type=radio name="hd" value=0 onClick="updatehd();"
    328                 _If_("_cgiarghd_" eq "0", checked)>_textnohistorydisplay_<br>
    329 <input type=radio name="hd" value=1 onClick="updatehd();"
    330         _If_("_cgiarghd_" eq "0",, checked)>_texthistorydisplay_</td>   
    331 }
    332 
    333 _historynumrecords_{<select name="hdn" onChange="updatehd();">
    334     <option value="5"_If_("_cgiarghd_" eq "5", selected)>5
    335     <option value="10"_If_("_cgiarghd_" eq "10", selected)>10
    336     <option value="15"_If_("_cgiarghd_" eq "15", selected)>15
    337     <option value="20"_If_("_cgiarghd_" eq "20", selected)>20
    338 </select>}
    339324
    340325_maxdocoption_ {
     
    355340}
    356341
     342modeoption_ {
     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)>5
     361     <option value="10"_If_("_cgiarghd_" eq "10", selected)>10
     362     <option value="15"_If_("_cgiarghd_" eq "15", selected)>15
     363     <option value="20"_If_("_cgiarghd_" eq "20", selected)>20
     364 </select>}
     365 
     366_relateddocop_ {
     367<input type=checkbox name="rd" onClick="updaterd();"
     368                _If_("_cgiargrd_" eq "1", checked)>_textrelateddocdisplay_
     369}
     370
    357371_extlinkoption_ {
    358372<td>_textextlink_</td>
    359 <td><select name="el" onChange="updateel();">
     373< <td><select name="el" onChange="updateel();">
     374
    360375  <option value="prompt"_If_("_cgiargel_" eq "prompt", selected)>
    361376     _textlinkinterm_
     
    367382_intlinkoption_ {
    368383<td>_textintlink_</td>
    369 <td><select name="il" onChange="updateil();">
     384< <td><select name="il" onChange="updateil();">
    370385  <option value="l"_If_("_cgiargil_" eq "l", selected)>
    371386     _textdigitlib_
     
    375390}
    376391
    377 # set from within pageaction
    378392_languageoption_ {}
     393
    379394_encodingoption_ {}
    380395
    381396_formatoption_ {
    382397<td>_textformat_</td>
    383 <td><select name="v" onChange="updatev();">
     398 <td><select name="v" onChange="updatev();">
    384399  <option value="0"_If_("_cgiargv_" eq "0", selected)>_textgraphical_
    385400  <option value="1"_If_("_cgiargv_" eq "1", selected)>_texttextual_
     
    391406_navigationbar_
    392407</center>
    393 
    394408<blockquote>
    395409
     
    400414_If_(_collectionoption_,_collectionprefs_)
    401415_presentationprefs_
    402 _If_("_cgiargct_" eq "1",_mgppsearchprefs_,_mgsearchprefs_)
     416_searchprefs_
    403417
    404418</blockquote>
     
    406420}
    407421
    408 #search prefs for mg collections
    409 _mgsearchprefs_ {
     422_searchprefs_ {
    410423<h3>_textsearchprefs_</h3>
    411 <table>
    412 <tr>_boxsizeoption_</tr>
    413 
    414 <tr>_caseoption_</tr>
    415 
    416 <tr>_stemoption_</tr>
    417 
    418 <tr>_modeoption_</tr>
    419 
    420 <tr>_searchhistoryop_</tr>
    421 
    422 <tr><td colspan=2>_textprefop_</td></tr>
    423 </table>
    424 </blockquote>
    425 _iconblankbar_
    426 <blockquote>
     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<br>_iconblankbar_
    427442}
    428443
     
    430445<h3>_textcollectionprefs_</h3>
    431446_collectionoption_
    432 </blockquote>
    433 _iconblankbar_
    434 <blockquote>
     447<br>_iconblankbar_
    435448}
    436449
    437450_presentationprefs_ {
    438451<h3>_textpresentationprefs_</h3>
    439 <table>_htmloptions_
    440 
    441 _If_(_languageoption_,<tr><td>_textlanguage_</td><td>_languageoption_</td></tr>)
    442 
    443 _If_(_encodingoption_,<tr><td>_textencoding_</td><td>_encodingoption_</td></tr>)
    444 
    445 <tr>_formatoption_</tr></table>
    446 </blockquote>
    447 _iconblankbar_
    448 <blockquote>
    449 }
    450 
    451 #######################################################
    452 ## new stuff for prefs for form vs text search - for mgpp collections
    453 _mgppsearchprefs_ {
    454 <h3>_textsearchprefs_</h3>
    455 <table>
    456 <tr>_searchtypeop_</tr>
    457 
    458 _If_(_cgiargqt_,_formsearchoptions_,_textsearchoptions_)
    459 
    460 <tr>_caseoption_</tr>
    461 
    462 <tr>_stemoption_</tr>
    463 
    464 <tr>_searchhistoryop_</tr>
    465 
    466 <tr><td colspan=2>_textprefop_</td></tr></table>
    467 </blockquote>
    468 _iconblankbar_
    469 <blockquote>
    470 }
    471 
    472 
    473 _searchtypeop_ {
    474 <td>_texttypesearch_</td>
    475 <td><select name="qt" onChange="updateqt();">
    476   <option value="0"_If_("_cgiargqt_" eq "0", selected)>_texttextsearch_
    477   <option value="1"_If_("_cgiargqt_" eq "1", selected)>_textformsearch_
    478 </select></td>
    479 }
    480 
    481 _formsearchoptions_ {
    482 <tr>_formmodeoption_</tr>
    483 }
    484 
    485 _textsearchoptions_ {
    486 <tr>_boxsizeoption_</tr>
    487 <tr>_modeoption_</tr>
    488 }
    489 
    490 _formmodeoption_{
    491 <td valign=baseline>_textformtype_</td>
    492 <td><input type=radio name=b value=0 onClick="updateb(0);"
    493         _If_(_cgiargb_,, checked)>_textsimple_<br>
    494 <input type=radio name=b value=1 onClick="updateb(1);"
    495         _If_(_cgiargb_, checked)>_textadvanced_<br>
    496 _formnumoption_</td>
    497 }
    498 
    499 _formnumoption_ {_textwith_
    500 <select name="fqn" onChange="updatefqn();">
    501   <option value="2"_If_("_cgiargfqn_" eq "2", selected)>2 
    502   <option value="4"_If_("_cgiargfqn_" eq "4", selected)>4
    503   <option value="6"_If_("_cgiargfqn_" eq "6", selected)>6
    504   <option value="8"_If_("_cgiargfqn_" eq "8", selected)>8
    505 </select>_textfields_</td>
    506 }
    507 
     452_htmloptions_
     453
     454<p>
     455_languageoption_
     456
     457<p>
     458_encodingoption_
     459
     460<p>
     461_formatoption_
     462<br>_iconblankbar_
     463}
    508464
    509465#######################################################################
     
    512468
    513469_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.