Changeset 4765


Ignore:
Timestamp:
2003-06-23T14:37:37+12:00 (21 years ago)
Author:
kjdon
Message:

changed the textsome, textall macros - took the test on cgiargb out of the text macros, so the text only has text in it, like textsome {some}. Note: have to change all the other languages to reflect this. qf now used for form search type instead of b. mgpp now only has one index, so removed the hselection stuff from the search form

File:
1 edited

Legend:

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

    r4175 r4765  
    2020_advformlist_ {}
    2121_regformlist_ {}
    22 _fqfselection_ {}
     22#_fqfselection_ {}
    2323
    2424
     
    6565#######################################################################
    6666
    67 _pagescriptextra_ {_If_("_cgiargct_" eq "1" && "_cgiargqt_" eq "1",_formpagescriptextra_,_dummypagescriptextra_)
     67_pagescriptextra_ {_If_("_cgiargqt_" eq "1" or "_cgiargqto_" eq "2",_formpagescriptextra_,_dummypagescriptextra_)
    6868_If_("_cgiarghd_" ne "0",_historypagescriptextra_) }
    6969
     
    8383  var args="";
    8484  args = "&fqa=0&fqv="+argfqv+"&fqf="+argfqf;
    85   _If_(_cgiargb_,args += "&fqk="+argfqk+"&fqs="+argfqs+"&fqc="+argfqc;)
     85  _If_(_cgiargqf_,args += "&fqk="+argfqk+"&fqs="+argfqs+"&fqc="+argfqc;)
    8686
    8787  return args;
     
    125125  \}
    126126  else \{
    127      if ("_cgiargb_" == "1") \{ // advanced query
     127     if ("_cgiargqf_" == "1") \{ // advanced query
    128128        document.QueryForm.q.value += " "+value;
    129129    updateq();
     
    142142   
    143143    stdarg = "";
    144     _If_(_cgiargh_,_getharg_)
    145144    _If_(_gselection_,_getgarg_)   
    146145    _If_(_cgiargj_,_getjarg_)
     
    149148    if (value != "_cgiargt_") stdarg += "&t="+value;
    150149
    151     stdarg += "&r=1&hs=1";    
     150    stdarg += "&r=1&hs=1"; // &h=idx    
    152151    return stdarg;
    153152  \}
     
    155154}
    156155
     156#h will always be the same now
    157157#some macros to go with getstdargs()
    158 _getharg_{
    159     value = document.QueryForm.h.options[document.QueryForm.h.selectedIndex].value;
    160     if (value != "_cgiargh_") stdarg += "&h="+value;
    161 }
     158#_getharg_{
     159#    value = document.QueryForm.h.options[document.QueryForm.h.selectedIndex].value;
     160#    if (value != "_cgiargh_") stdarg += "&h="+value;
     161#}
    162162
    163163_getgarg_{
     
    185185   if (document.QueryForm.fqf != null) \{initfqf();\}
    186186   initfqv();
    187    if ( "_cgiargb_" == "1") \{
     187   if ( "_cgiargqf_" == "1") \{
    188188      initfqs();       
    189189      initfqk();
     
    207207   \}
    208208   if (fqf.length < document.QueryForm.fqf.length) \{ // initialize remaining ones
    209       var v=1; // the option with a null value is either at place 1 or 2
    210       if (document.QueryForm.fqf[0].options[v].value !="") v++;
    211209      for (i=fqf.length;i<document.QueryForm.fqf.length;i++) \{
    212210      var z=i;
     
    214212         z = z-(document.QueryForm.fqf[i].options.length-1);
    215213      \}
    216       if (z>=v)z++; // skip over the void value
    217      
    218214      document.QueryForm.fqf[i].options[z].selected = true;
    219215     
     
    474470#_httpquery_ has a=q&e=compressedargs
    475471#if adv form, need to set k=0 and s=0
    476 _advformargs_{_If_(_cgiargb_,&k=0&s=0)}
     472_advformargs_{_If_(_cgiargqf_,&k=0&s=0)}
    477473
    478474_searchfunctions_ {
     
    490486   clearfqv();
    491487
    492    if ("_cgiargb_" == "1") \{
     488   if ("_cgiargqf_" == "1") \{
    493489      clearfqk();
    494490      clearfqs();
     
    544540}
    545541
    546 _selectqueryform_{_If_(_cgiargqt_,_fieldqueryform_,_queryform_)}
     542_selectqueryform_{_If_("_cgiargqt_" eq "1",_fieldqueryform_,_selectqueryform2_)}
     543_selectqueryform2_{_If_("_cgiargqto_" eq "2", _fieldqueryform_, _queryform_)}
    547544
    548545_queryform_ {
    549 <!-- query form (\_query:queryform\_) -->
     546<!-- query form (\_query:plainqueryform\_) -->
    550547<form name=QueryForm method=get action="_gwcgi_">
    551 
    552548<input type=hidden name="a" value="q">
    553549<input type=hidden name="r" value="1">
     
    560556}
    561557
    562 _queryformcontent_{_basicqueryform_}
    563 
    564 _basicqueryform_ {<table><tr><td>
     558_queryformcontent_{<table><tr><td>
    565559<nobr>_textselect_</nobr>
    566560</td></tr>
     
    609603<!-- field query form (\_query:fieldqueryform\_) -->
    610604<form name=QueryForm method=get action="_gwcgi_">
     605
    611606<table><tr><td>
    612607<nobr>
     
    614609</nobr>
    615610</td></tr>
    616 _If_(_cgiargb_,_advancedforms_,_simpleforms_)
     611_If_(_cgiargqf_,_advancedforms_,_simpleforms_)
    617612</table>
    618 _If_(_cgiargb_,<center>_iconblankbar_</center><br>
     613_If_(_cgiargqf_,<center>_iconblankbar_</center><br>
    619614<center>_advancedformextra_</center>)
    620615</form>
     
    678673</select>}
    679674
    680 _textselect_ {_If_(_cgiargb_,_textadvancedsearch_,_textsimplesearch_)}
    681 _textformselect_ {_If_(_cgiargb_,_textformadvancedsearch_,_textformsimplesearch_)}
     675_textselect_ {_If_(_cgiargct_, _textmgppselect_, _textmgselect_)}
     676_textmgselect_ {_If_(_cgiargb_,_textadvancedsearch_,_textsimplesearch_)}
     677_textmgppselect_ { _If_(_cgiargb_,_textadvancedsearchmgpp_, _textsimplesearchmgpp_)}
     678_textformselect_ {_If_(_cgiargqf_,_textformadvancedsearch_,_textformsimplesearch_)}
    682679
    683680_ZZ_{_textallfields_}
     
    697694_querytypeselection_ {
    698695<select name="t">
    699 <option value="1"_If_(_cgiargt_, selected)>_textsome_
    700 <option value="0"_If_(_cgiargt_,, selected)>_textall_
     696<option value="1"_If_(_cgiargt_, selected)>_If_(_cgiargb_,_textranked_,_textsome_)
     697<option value="0"_If_(_cgiargt_,, selected)>_If_(_cgiargb_,_textboolean_,_textall_)
    701698</select>
    702699}
     
    704701_formquerytypeselection_ {
    705702<select name="t">
    706 <option value="1"_If_(_cgiargt_, selected)>_textformsome_
    707 <option value="0"_If_(_cgiargt_,, selected)>_textformall_
     703<option value="1"_If_(_cgiargt_, selected)>_If_(_cgiargqf_,_textranked_,_textsome_)
     704<option value="0"_If_(_cgiargt_,, selected)>_If_(_cgiargqf_,_textnatural_,_textall_)
    708705</select>
    709706}
Note: See TracChangeset for help on using the changeset viewer.