diff --git a/templates/problem/list.html b/templates/problem/list.html index e66ca31..b8268f5 100644 --- a/templates/problem/list.html +++ b/templates/problem/list.html @@ -67,11 +67,24 @@ $category.prop('disabled', !$category.val()); } + function clear_point_interval() { + if ($('#search').val() !== "{{ search_query or '' }}") { + $('#point-start').remove(); + $('#point-end').remove(); + } + } + function clean_submit() { prep_form(); + clear_point_interval(); $form.submit(); } + function form_serialize() { + clear_point_interval(); + return $form.serialize(); + } + $category.select2().css({'visibility': 'visible'}).change(clean_submit); $('#types').select2({multiple: 1, placeholder: '{{ _('Filter by type...') }}'}) .css({'visibility': 'visible'}); @@ -95,7 +108,7 @@ $('input#full_text, input#hide_solved, input#show_types, input#show_editorial, input#have_editorial').click(function () { prep_form(); - ($('