Changeset 11983


Ignore:
Timestamp:
2006-06-30T14:29:24+12:00 (18 years ago)
Author:
mdewsnip
Message:

More of the new advanced search page.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cic-hcap/macros/extra.dm

    r11982 r11983  
    890890}
    891891
     892_cicaqpdefault_ {<select name='aqp'><option value='0'>contains</option><option value='1'>is</option></select>}
     893_cicaqptypeofplace_ {<select name='aqp' disabled><option value='0'>contains</option><option value='1' selected>is</option></select>}
     894
     895_cicaqvdefault_ {<input name='aqv' type='text' style='width: 450px'/>}
     896_cicaqvtypeofplace_ {<select name='aqv' style='width: 450px'><option value='Individual building'>Individual building</option><option value='Landscape site'>Landscape site</option><option value='Campus arrangement'>Campus arrangement</option><option value='Building group'>Building group</option></select>}
     897
    892898_advancedformsnew_ {
    893899<input type="hidden" name="a" value="q">
     
    902908    <center>
    903909      <nobr>
    904         <select name="aqi" onChange="prepareadvancedsearch();">
     910        <select name="aqi" onChange="changedAQI();">
    905911          <option value="ZZ">Keyword</option>
    906912      <option value="PL">Type of place</option>
     
    909915        </select>
    910916
    911         <select name="aqp">
    912           <option value="0">contains</option>
    913       <option value="1">is</option>
    914         </select>
    915 
    916         <span id="agv">
    917           <input name="aqv" type="text" style="width: 450px"/>
     917    <span id="aqp">
     918      _cicaqpdefault_
     919    </span>
     920
     921        <span id="aqv">
     922      _cicaqvdefault_
    918923        </span>
     924
     925    <select name="aqc">
     926      <option value="and">and</option>
     927      <option value="or">or</option>
     928    </select>
    919929      </nobr>
    920930    </center>
     
    12061216\}
    12071217
     1218function changedAQI()
     1219\{
     1220   if (document.QueryForm.aqi.value == "PL") \{
     1221      document.getElementById('aqp').innerHTML = "_cicaqptypeofplace_";
     1222      document.getElementById('aqv').innerHTML = "_cicaqvtypeofplace_";
     1223   \}
     1224   else \{
     1225      document.getElementById('aqp').innerHTML = "_cicaqpdefault_";
     1226      document.getElementById('aqv').innerHTML = "_cicaqvdefault_";
     1227   \}
     1228\}
     1229
    12081230function prepareadvancedsearch()
    12091231\{
    12101232   document.QueryForm.q.value = "";
     1233
     1234   if (document.QueryForm.aqv.value != "") \{
     1235      addQueryTerm(document.QueryForm.q, "[" + document.QueryForm.aqv.value + "]:" + document.QueryForm.aqi.value);
     1236   \}
    12111237
    12121238   addIndexValue(document.QueryForm.q, document.QueryForm.fuq, "FU");
     
    12251251   for (var i = 0; i < select_reference.options.length; i++) \{
    12261252      if (select_reference.options[i].selected) \{
    1227          index_value += ((index_value != "") ? " | " : "");
     1253         index_value += ((index_value != "") ? " & " : "");
    12281254     index_value += '["' + select_reference.options[i].value + '"]:' + index_code;
    12291255      \}
    12301256   \}
    1231 
     1257   addQueryTerm(query_field_reference, index_value);
     1258\}
     1259
     1260function addQueryTerm(query_field_reference, index_value)
     1261\{
    12321262   if (index_value != "") \{
    12331263      query_field_reference.value += ((query_field_reference.value != "") ? " & " : "");
Note: See TracChangeset for help on using the changeset viewer.