diff options
Diffstat (limited to 'ishtar_common/static/js')
| -rw-r--r-- | ishtar_common/static/js/ishtar.js | 15 | 
1 files changed, 6 insertions, 9 deletions
| diff --git a/ishtar_common/static/js/ishtar.js b/ishtar_common/static/js/ishtar.js index 2f04775c5..84ce160d3 100644 --- a/ishtar_common/static/js/ishtar.js +++ b/ishtar_common/static/js/ishtar.js @@ -534,7 +534,8 @@ function get_label_from_input(input){  function update_search_field(){ -    var query = ""; +    var query = $("#id_search_vector").val(); +    if (!query) query = "";      var inputs = $('#wizard-form input').map(          function(){              var v = ""; @@ -555,8 +556,10 @@ function update_search_field(){                  v = $(this).val();              }              if (v == "") return; +            var term = get_label_from_input(item_for_label); +            if(!term) return;              if (query) query += " "; -            query += get_label_from_input(item_for_label) + '="' + v + '"'; +            query += term + '="' + v + '"';          }      ).get();      var selects = $('#wizard-form select').each( @@ -573,14 +576,8 @@ function update_search_field(){              });          }      ); - -    var value = $("#id_search_vector").val(); -    if (value){ -        value += " "; -    } -    value += query;      document.getElementById('wizard-form').reset(); -    value = $("#id_search_vector").val(value); +    value = $("#id_search_vector").val(query);  }  var sheet_list = new Array(); | 
