0.8.34 fix route_search

This commit is contained in:
SDE
2023-12-05 12:47:23 +03:00
parent 624653f581
commit 6e758cf62e
2 changed files with 9 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
timeout_range_slider = null
function filters_func_find_route_main (el,owner_type=null,win_loc_replace=null,weight=null){
function filters_func_find_route_main (el, owner_type=null, win_loc_replace=null, weight=null){
console.log("asd")
@@ -11,9 +11,9 @@ function filters_func_find_route_main (el,owner_type=null,win_loc_replace=null,w
let list = forloop_func_form(data_d,"get",get_url)
data_d = list[0]
get_url = list[1]
// if (owner_type !== null) {
// data_d['owner_type'] = owner_type
// }
if (owner_type !== null) {
data_d['owner_type'] = owner_type
}
// get_url = get_url + `owner_type=${owner_type}`
window.location.href = `${win_loc_replace}?${get_url}`
@@ -31,10 +31,10 @@ function filters_func_find_route_main (el,owner_type=null,win_loc_replace=null,w
let list = forloop_func_form(data_d,"get",get_url)
data_d = list[0]
get_url = list[1]
// if (owner_type !== null) {
// data_d['owner_type'] = owner_type
// get_url = get_url + `owner_type=${owner_type}`
// }
if (owner_type !== null) {
data_d['owner_type'] = owner_type
// get_url = get_url + `owner_type=${owner_type}`
}
if (weight){

View File

@@ -101,7 +101,7 @@
<div class="cont-el-form-search-carrier el_form_find_route">
<label style="opacity: 0">test</label>
{% if show_filter_and_results %}
<button class="btn_find_routes" onclick="filters_func_find_route_main(this)" data-owner_type='{{ owner_type }}'>{% translate "Найти" %}</button>
<button class="btn_find_routes" onclick="filters_func_find_route_main(this,'{{ owner_type }}')" data-owner_type='{{ owner_type }}'>{% translate "Найти" %}</button>
{% else %}
<button class="btn_find_routes" onclick="filters_func_find_route_main(this,'{{ owner_type }}','{% url "route_search_results_View" %}')" data-owner_type='{{ owner_type }}'>{% translate "Найти" %}</button>
{% endif %}