Changeset 4765
- Timestamp:
- 2003-06-23T14:37:37+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/macros/query.dm
r4175 r4765 20 20 _advformlist_ {} 21 21 _regformlist_ {} 22 _fqfselection_ {}22 #_fqfselection_ {} 23 23 24 24 … … 65 65 ####################################################################### 66 66 67 _pagescriptextra_ {_If_("_cgiarg ct_" eq "1" && "_cgiargqt_" eq "1",_formpagescriptextra_,_dummypagescriptextra_)67 _pagescriptextra_ {_If_("_cgiargqt_" eq "1" or "_cgiargqto_" eq "2",_formpagescriptextra_,_dummypagescriptextra_) 68 68 _If_("_cgiarghd_" ne "0",_historypagescriptextra_) } 69 69 … … 83 83 var args=""; 84 84 args = "&fqa=0&fqv="+argfqv+"&fqf="+argfqf; 85 _If_(_cgiarg b_,args += "&fqk="+argfqk+"&fqs="+argfqs+"&fqc="+argfqc;)85 _If_(_cgiargqf_,args += "&fqk="+argfqk+"&fqs="+argfqs+"&fqc="+argfqc;) 86 86 87 87 return args; … … 125 125 \} 126 126 else \{ 127 if ("_cgiarg b_" == "1") \{ // advanced query127 if ("_cgiargqf_" == "1") \{ // advanced query 128 128 document.QueryForm.q.value += " "+value; 129 129 updateq(); … … 142 142 143 143 stdarg = ""; 144 _If_(_cgiargh_,_getharg_)145 144 _If_(_gselection_,_getgarg_) 146 145 _If_(_cgiargj_,_getjarg_) … … 149 148 if (value != "_cgiargt_") stdarg += "&t="+value; 150 149 151 stdarg += "&r=1&hs=1"; 150 stdarg += "&r=1&hs=1"; // &h=idx 152 151 return stdarg; 153 152 \} … … 155 154 } 156 155 156 #h will always be the same now 157 157 #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 #} 162 162 163 163 _getgarg_{ … … 185 185 if (document.QueryForm.fqf != null) \{initfqf();\} 186 186 initfqv(); 187 if ( "_cgiarg b_" == "1") \{187 if ( "_cgiargqf_" == "1") \{ 188 188 initfqs(); 189 189 initfqk(); … … 207 207 \} 208 208 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 2210 if (document.QueryForm.fqf[0].options[v].value !="") v++;211 209 for (i=fqf.length;i<document.QueryForm.fqf.length;i++) \{ 212 210 var z=i; … … 214 212 z = z-(document.QueryForm.fqf[i].options.length-1); 215 213 \} 216 if (z>=v)z++; // skip over the void value217 218 214 document.QueryForm.fqf[i].options[z].selected = true; 219 215 … … 474 470 #_httpquery_ has a=q&e=compressedargs 475 471 #if adv form, need to set k=0 and s=0 476 _advformargs_{_If_(_cgiarg b_,&k=0&s=0)}472 _advformargs_{_If_(_cgiargqf_,&k=0&s=0)} 477 473 478 474 _searchfunctions_ { … … 490 486 clearfqv(); 491 487 492 if ("_cgiarg b_" == "1") \{488 if ("_cgiargqf_" == "1") \{ 493 489 clearfqk(); 494 490 clearfqs(); … … 544 540 } 545 541 546 _selectqueryform_{_If_(_cgiargqt_,_fieldqueryform_,_queryform_)} 542 _selectqueryform_{_If_("_cgiargqt_" eq "1",_fieldqueryform_,_selectqueryform2_)} 543 _selectqueryform2_{_If_("_cgiargqto_" eq "2", _fieldqueryform_, _queryform_)} 547 544 548 545 _queryform_ { 549 <!-- query form (\_query: queryform\_) -->546 <!-- query form (\_query:plainqueryform\_) --> 550 547 <form name=QueryForm method=get action="_gwcgi_"> 551 552 548 <input type=hidden name="a" value="q"> 553 549 <input type=hidden name="r" value="1"> … … 560 556 } 561 557 562 _queryformcontent_{_basicqueryform_} 563 564 _basicqueryform_ {<table><tr><td> 558 _queryformcontent_{<table><tr><td> 565 559 <nobr>_textselect_</nobr> 566 560 </td></tr> … … 609 603 <!-- field query form (\_query:fieldqueryform\_) --> 610 604 <form name=QueryForm method=get action="_gwcgi_"> 605 611 606 <table><tr><td> 612 607 <nobr> … … 614 609 </nobr> 615 610 </td></tr> 616 _If_(_cgiarg b_,_advancedforms_,_simpleforms_)611 _If_(_cgiargqf_,_advancedforms_,_simpleforms_) 617 612 </table> 618 _If_(_cgiarg b_,<center>_iconblankbar_</center><br>613 _If_(_cgiargqf_,<center>_iconblankbar_</center><br> 619 614 <center>_advancedformextra_</center>) 620 615 </form> … … 678 673 </select>} 679 674 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_)} 682 679 683 680 _ZZ_{_textallfields_} … … 697 694 _querytypeselection_ { 698 695 <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_) 701 698 </select> 702 699 } … … 704 701 _formquerytypeselection_ { 705 702 <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_) 708 705 </select> 709 706 }
Note:
See TracChangeset
for help on using the changeset viewer.