зеркало из https://github.com/mozilla/kitsune.git
Fix refine missing where param and search query default value check in JS
This commit is contained in:
Родитель
c91e37052b
Коммит
045a998521
|
@ -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',
|
||||
|
|
|
@ -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('');
|
||||
|
|
Загрузка…
Ссылка в новой задаче