Ignore:
Timestamp:
2002-06-21T14:36:12+12:00 (22 years ago)
Author:
kjdon
Message:

modified mgpp form search field list - all fields and textonly are at the front
with a blank element separating them from all the real metadata fields

File:
1 edited

Legend:

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

    r2768 r3157  
    200200   for (i=0; i<fqf.length; i++) \{
    201201       for (j=0;j<document.QueryForm.fqf[i].options.length;j++) \{
    202        if (fqf[i] == document.QueryForm.fqf[i].options[j].value) \{
     202       if (fqf[i] != "" && fqf[i]== document.QueryForm.fqf[i].options[j].value) \{
    203203          document.QueryForm.fqf[i].options[j].selected = true;
    204204          break;   
     
    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++;
    209211      for (i=fqf.length;i<document.QueryForm.fqf.length;i++) \{
    210212      var z=i;
    211       if (i >= document.QueryForm.fqf[i].options.length)
    212          z = z-document.QueryForm.fqf[i].options.length;
    213 
     213      while (z >= document.QueryForm.fqf[i].options.length-1) \{
     214         z = z-(document.QueryForm.fqf[i].options.length-1);
     215      \}
     216      if (z>=v)z++; // skip over the void value
     217     
    214218      document.QueryForm.fqf[i].options[z].selected = true;
    215219     
Note: See TracChangeset for help on using the changeset viewer.