diff --git a/apps/search/views.py b/apps/search/views.py index 7e0e3171c..6c70d6539 100644 --- a/apps/search/views.py +++ b/apps/search/views.py @@ -211,7 +211,8 @@ def search(request): for name, field in search_form.fields.items(): refine_query[name] = request.GET.getlist(name) - refine_query = 'a=1&' + flatten(refine_query, encode=False) + refine_query = 'a=1&w=' + str(where) + '&' \ + + flatten(refine_query, encode=False) refine_url = '%s?%s' % (reverse('search'), refine_query) return jingo.render(request, 'results.html', diff --git a/media/js/search.js b/media/js/search.js index 850fe4f31..3bfaf8e1e 100644 --- a/media/js/search.js +++ b/media/js/search.js @@ -34,8 +34,11 @@ $(document).ready(function() { if ($('#search-tabs input[name="author"]').val() == DEFAULT_AUTHOR) { $('input[name="author"]').val(''); } - if ($('#search-tabs input[name="q"]').val() == DEFAULT_QUERY) { - $('#search-tabs input[name="q"]').val(''); + if ($('#kb input[name="q"]').val() == DEFAULT_QUERY) { + $('#kb input[name="q"]').val(''); + } + if ($('#forum input[name="q"]').val() == DEFAULT_QUERY) { + $('#forum input[name="q"]').val(''); } if ($('#search-tabs input[name="tag"]').val() == DEFAULT_TAGS) { $('#search-tabs input[name="tag"]').val('');