Changeset 1950


Ignore:
Timestamp:
2001-02-13T10:20:19+13:00 (23 years ago)
Author:
sjboddie
Message:

* empty log message *

File:
1 edited

Legend:

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

    r1946 r1950  
    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 
    6867  for (i in savedccs)
    69   if (savedccs[i] == 1) \{
    70     argcc += "&cc=" + i;
    71         changed = 1;
    72    \}   
     68    if (savedccs[i] == 1) \{
     69       argcc += "&cc=" + i;
     70       changed = 1;
     71    \}
    7372  if (changed == 1) argcc += "&r=1";
    74    
    7573  updatehrefs();
    7674\}
     
    8684_getargsfunction_ {
    8785function getargs () \{
    88   return argk + args + argm + argo + arghd + 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_);
    8987\}
    9088}
     
    137135_arghloff_ {arghl = "&hl=0";}
    138136
    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 
    147137_pagescriptextra_ {
    148138// preferences scripts generated from \_preferences:pagescriptextra\_
     
    153143args = "";     
    154144argm = "";
     145argrd = "";
    155146argo = "";
    156147argb = "";
    157148arghd = "";
    158 argrd = "";
    159149argqb = "";
    160150argfqn = "";
     
    187177\}
    188178
     179function 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
    189187function updateo () \{
    190188  value = document.PrefForm.o.options[document.PrefForm.o.selectedIndex].value;
     
    194192\}
    195193
     194function 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
    196201function updateb (value) \{
    197202  if (value != _cgiargb_) argb = "&b=" + value;
     
    200205\}
    201206
    202 
    203207function 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\}
    212218
    213219function 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 = "";
    223222  updatehrefs();
    224223\}
     
    237236  value = document.PrefForm.w.options[document.PrefForm.w.selectedIndex].value;
    238237  location.href = location.href + "&nl=0&nw=" + value + getargs();
    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 }
     238\}
     239
     240function updateqt () \{
     241  value = document.PrefForm.qt.options[document.PrefForm.qt.selectedIndex].value;
     242  location.href = location.href + "&qt=" + value + getargs();
     243\}
     244}
     245
    247246
    248247#######################################################################
     
    283282}
    284283
    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 
    304284_fcoption_ {
    305285<input type=checkbox name=fc onClick="updatefc();"_If_("_cgiargfc_" eq "1", checked)>
     
    312292}
    313293
     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] {}
    314312_caseoption_ [l=zh] {}
    315313
    316314_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);"
    318317  _If_(_cgiargs_, checked)>_textstem_<br>
    319318<input type=radio name=s value=0 onClick="updates(0);"
     
    322321
    323322_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)>
     344Display 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>}
    324353
    325354_maxdocoption_ {
     
    340369}
    341370
    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)>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 
    371371_extlinkoption_ {
    372372<td>_textextlink_</td>
    373 < <td><select name="el" onChange="updateel();">
    374 
     373<td><select name="el" onChange="updateel();">
    375374  <option value="prompt"_If_("_cgiargel_" eq "prompt", selected)>
    376375     _textlinkinterm_
     
    382381_intlinkoption_ {
    383382<td>_textintlink_</td>
    384 < <td><select name="il" onChange="updateil();">
     383<td><select name="il" onChange="updateil();">
    385384  <option value="l"_If_("_cgiargil_" eq "l", selected)>
    386385     _textdigitlib_
     
    390389}
    391390
     391# set from within pageaction
    392392_languageoption_ {}
    393 
    394393_encodingoption_ {}
    395394
    396395_formatoption_ {
    397396<td>_textformat_</td>
    398  <td><select name="v" onChange="updatev();">
     397<td><select name="v" onChange="updatev();">
    399398  <option value="0"_If_("_cgiargv_" eq "0", selected)>_textgraphical_
    400399  <option value="1"_If_("_cgiargv_" eq "1", selected)>_texttextual_
     
    406405_navigationbar_
    407406</center>
     407
    408408<blockquote>
    409409
     
    414414_If_(_collectionoption_,_collectionprefs_)
    415415_presentationprefs_
    416 _searchprefs_
     416_If_("_cgiargct_" eq "1",_mgppsearchprefs_,_mgsearchprefs_)
    417417
    418418</blockquote>
     
    420420}
    421421
    422 _searchprefs_ {
     422#search prefs for mg collections
     423_mgsearchprefs_ {
    423424<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 <br>_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>
    442443}
    443444
     
    445446<h3>_textcollectionprefs_</h3>
    446447_collectionoption_
    447 <br>_iconblankbar_
     448</blockquote>
     449_iconblankbar_
     450<blockquote>
    448451}
    449452
    450453_presentationprefs_ {
    451454<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
    464524
    465525#######################################################################
     
    468528
    469529_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.