Changeset 11991


Ignore:
Timestamp:
2006-06-30T16:35:22+12:00 (18 years ago)
Author:
mdewsnip
Message:

Lots more work on the new advanced search page... nearly there.

File:
1 edited

Legend:

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

    r11983 r11991  
    111111
    112112# We use a very simple pagebanner: just the collection icon, no javalinks etc
    113 _pagebanner_ {<span style="font-size: 26px; float: right; padding-top: 10px;">Historic Campus Architecture Project</span><a href="_gwcgi_?a=p&p=home"><img src="_httpcollection_/images/logo.jpg"></a>}
     113_pagebanner_ {<span style="font-size: 24px; float: right; padding-top: 10px;">Historic Campus Architecture Project</span><a href="_gwcgi_?a=p&p=home"><img src="_httpcollection_/images/logo.jpg"></a>}
    114114
    115115_pagetitle_ {The Council of Independent Colleges: Historic Campus Architecture Project}
     
    891891
    892892_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>}
     893_cicaqptypeofplace_ {<select name='aqp' disabled='true'><option value='0'>contains</option><option value='1' selected='true'>is</option></select>}
    894894
    895895_cicaqvdefault_ {<input name='aqv' type='text' style='width: 450px'/>}
    896896_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
     898_cicaqline_ {
     899<tr>
     900  <td colspan="3">
     901    <center>
     902      <nobr>
     903        <select name="aqi" onChange="changedAQI();">
     904      <option value="">Keyword</option>
     905      <option value="PL">Type of place</option>
     906      <option value="IN">Institution</option>
     907      <option value="AR">Designer</option>
     908    </select>
     909    <input type="hidden" name="aqib" value="">
     910
     911    <span id="aqp_1_">
     912      _cicaqpdefault_
     913    </span>
     914
     915    <span id="aqv_1_">
     916      _cicaqvdefault_
     917    </span>
     918
     919    <select name="aqc">
     920      <option value="and">and</option>
     921      <option value="or">or</option>
     922    </select>
     923      </nobr>
     924    </center>
     925  </td>
     926</tr>
     927}
    897928
    898929_advancedformsnew_ {
     
    904935<input type="hidden" name="m" value="-1">
    905936
    906 <tr>
    907   <td colspan="3">
    908     <center>
    909       <nobr>
    910         <select name="aqi" onChange="changedAQI();">
    911           <option value="ZZ">Keyword</option>
    912       <option value="PL">Type of place</option>
    913       <option value="IN">Institution</option>
    914       <option value="AR">Designer</option>
    915         </select>
    916 
    917     <span id="aqp">
    918       _cicaqpdefault_
    919     </span>
    920 
    921         <span id="aqv">
    922       _cicaqvdefault_
    923         </span>
    924 
    925     <select name="aqc">
    926       <option value="and">and</option>
    927       <option value="or">or</option>
    928     </select>
    929       </nobr>
    930     </center>
    931   </td>
    932 </tr>
     937_cicaqline_(0)
     938_cicaqline_(1)
     939_cicaqline_(2)
    933940
    934941<tr>
     
    12141221function initializeadvancedsearch()
    12151222\{
     1223   changedAQI();
    12161224\}
    12171225
    12181226function changedAQI()
    12191227\{
    1220    if (document.QueryForm.aqi.value == "PL") \{
    1221       document.getElementById('aqp').innerHTML = "_cicaqptypeofplace_";
    1222       document.getElementById('aqv').innerHTML = "_cicaqvtypeofplace_";
     1228   for (var i = 0; i < document.QueryForm.aqi.length; i++) \{
     1229      if (document.QueryForm.aqi[i].value != document.QueryForm.aqib[i].value) \{
     1230         alert("Changed " + i + ": " + document.QueryForm.aqi[i].value);
     1231         if (document.QueryForm.aqi[i].value == "PL") \{
     1232            document.getElementById("aqp" + i).innerHTML = "_cicaqptypeofplace_";
     1233        document.getElementById("aqv" + i).innerHTML = "_cicaqvtypeofplace_";
     1234     \}
     1235     else \{
     1236            document.getElementById("aqp" + i).innerHTML = "_cicaqpdefault_";
     1237        document.getElementById("aqv" + i).innerHTML = "_cicaqvdefault_";
     1238     \}
     1239
     1240     document.QueryForm.aqib[i].value = document.QueryForm.aqi[i].value;
     1241      \}
    12231242   \}
    1224    else \{
    1225       document.getElementById('aqp').innerHTML = "_cicaqpdefault_";
    1226       document.getElementById('aqv').innerHTML = "_cicaqvdefault_";
    1227    \}
     1243
     1244   prepareadvancedsearch();
    12281245\}
    12291246
     
    12321249   document.QueryForm.q.value = "";
    12331250
    1234    if (document.QueryForm.aqv.value != "") \{
    1235       addQueryTerm(document.QueryForm.q, "[" + document.QueryForm.aqv.value + "]:" + document.QueryForm.aqi.value);
     1251   for (var i = 0; i < document.QueryForm.aqi.length; i++) \{
     1252      alert(i + ": " + document.QueryForm.aqi[i].value + "," + document.QueryForm.aqv[i].value);
     1253      if (document.QueryForm.aqv[i].value != "") \{
     1254         addQueryTerm(document.QueryForm.q, "[" + document.QueryForm.aqv[i].value + "]:" + document.QueryForm.aqi[i].value);
     1255     alert(document.QueryForm.aqi[i].value + " -- " + document.QueryForm.q.value);
     1256      \}
    12361257   \}
    12371258
     
    12421263   addIndexValue(document.QueryForm.q, document.QueryForm.deq, "DE");
    12431264   addIndexValue(document.QueryForm.q, document.QueryForm.stq, "ST");
    1244 
    1245    alert(document.QueryForm.q.value);
    12461265\}
    12471266
Note: See TracChangeset for help on using the changeset viewer.