0.0.204
This commit is contained in:
@@ -2,7 +2,7 @@ function filters_func_find_route_main (el){
|
|||||||
if (el !== document.querySelector(".range_slider_form_filters")){
|
if (el !== document.querySelector(".range_slider_form_filters")){
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
}
|
}
|
||||||
// document.querySelector(".loader_filters_routes").classList.toggle("show")
|
document.querySelector(".loader_filters_routes").classList.toggle("show")
|
||||||
let one_sec = setTimeout(function (){
|
let one_sec = setTimeout(function (){
|
||||||
// let form = el.form
|
// let form = el.form
|
||||||
// let formData = new FormDat a(form)
|
// let formData = new FormDat a(form)
|
||||||
@@ -22,7 +22,7 @@ function filters_func_find_route_main (el){
|
|||||||
// enctype: 'json',
|
// enctype: 'json',
|
||||||
data: JSON.stringify(data_d),
|
data: JSON.stringify(data_d),
|
||||||
success: function(data){
|
success: function(data){
|
||||||
// document.querySelector(".loader_filters_routes").classList.toggle("show")
|
document.querySelector(".loader_filters_routes").classList.toggle("show")
|
||||||
document.querySelector(".block-finded-routes").innerHTML = data.html
|
document.querySelector(".block-finded-routes").innerHTML = data.html
|
||||||
if (data.html === "\n\n\n\n\n"){
|
if (data.html === "\n\n\n\n\n"){
|
||||||
document.querySelector(".block-finded-routes").innerHTML = "<span style='color: #ff0000;font-weight: 800;font-size: 18px;padding: 10px;'>Нечего не найдено!</span>"
|
document.querySelector(".block-finded-routes").innerHTML = "<span style='color: #ff0000;font-weight: 800;font-size: 18px;padding: 10px;'>Нечего не найдено!</span>"
|
||||||
@@ -32,6 +32,7 @@ function filters_func_find_route_main (el){
|
|||||||
// window.location.href = window.location.href + "?" + get_url
|
// window.location.href = window.location.href + "?" + get_url
|
||||||
// window.location.search = "?" + get_url
|
// window.location.search = "?" + get_url
|
||||||
history.pushState({'data':data_d,'str_data':get_url}, "state_filters", `?${get_url}`);
|
history.pushState({'data':data_d,'str_data':get_url}, "state_filters", `?${get_url}`);
|
||||||
|
document.querySelector(".block-finded-routes")
|
||||||
// window.history.pushState({data:get_url
|
// window.history.pushState({data:get_url
|
||||||
// },{})
|
// },{})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -103,18 +103,18 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="cont-el-form-search-carrier">
|
<div class="cont-el-form-search-carrier">
|
||||||
<label for="id_departure_DT">Дата отправки</label>
|
<label for="id_departure_DT">Дата отправки</label>
|
||||||
<input class="el_form_find_route" name="departure_DT" id="id_departure_DT" type="date" {% if form.fields.departure_DT.required %} {% endif %} {% %}>
|
<input class="el_form_find_route" name="departure_DT" id="id_departure_DT" type="date" {% if form.fields.departure_DT.required %} {% endif %} {% if form.initial.departure_DT %} value="{{ form.initial.departure_DT }}"{% endif %} >
|
||||||
</div>
|
</div>
|
||||||
<div class="cont-el-form-search-carrier">
|
<div class="cont-el-form-search-carrier">
|
||||||
<label for="id_arrival_DT">Дата прибытия</label>
|
<label for="id_arrival_DT">Дата прибытия</label>
|
||||||
<input class="el_form_find_route" name="arrival_DT" id="id_arrival_DT" type="date" {% if form.fields.arrival_DT.required %} {% endif %}>
|
<input class="el_form_find_route" name="arrival_DT" id="id_arrival_DT" type="date" {% if form.initial.arrival_DT %} {% endif %} {% if form.initial.arrival_DT %} value="{{ form.initial.arrival_DT }}"{% endif %}>
|
||||||
</div>
|
</div>
|
||||||
<div class="cont-el-form-search-carrier last">
|
<div class="cont-el-form-search-carrier last">
|
||||||
<label>test</label>
|
<label>test</label>
|
||||||
<select class="el_form_find_route" name="cargo_type" id="id_cargo_type" {% if form.fields.cargo_type.required %} {% endif %}>
|
<select class="el_form_find_route" name="cargo_type" id="id_cargo_type" {% if form.fields.cargo_type.required %} {% endif %}>
|
||||||
<option value="" selected="selected">--не имеет значения--</option>
|
<option value="" selected="selected">--не имеет значения--</option>
|
||||||
{% for item in form.fields.cargo_type.choices %}
|
{% for item in form.fields.cargo_type.choices %}
|
||||||
<option value="{{ item.0 }}">{{ item.1 }}</option>
|
<option value="{{ item.0 }}" {% if form.initial.cargo_type == item.0 %} selected{% endif %}>{{ item.1 }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
@@ -177,7 +177,7 @@
|
|||||||
<select onchange="filters_func_find_route_main(this)" class="select_form_filters_find_route el_form_find_route" name="from_place">
|
<select onchange="filters_func_find_route_main(this)" class="select_form_filters_find_route el_form_find_route" name="from_place">
|
||||||
<option value="" selected="selected">--не имеет значения--</option>
|
<option value="" selected="selected">--не имеет значения--</option>
|
||||||
{% for item in form.fields.from_place.choices %}
|
{% for item in form.fields.from_place.choices %}
|
||||||
<option value="{{ item.0 }}">{{ item.1 }}</option>
|
<option value="{{ item.0 }}" {% if form.initial.from_place == item.0 %} selected{% endif %}>{{ item.1 }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
@@ -189,7 +189,7 @@
|
|||||||
<select onchange="filters_func_find_route_main(this)" class="select_form_filters_find_route el_form_find_route" name="to_place">
|
<select onchange="filters_func_find_route_main(this)" class="select_form_filters_find_route el_form_find_route" name="to_place">
|
||||||
<option value="" selected="selected">--не имеет значения--</option>
|
<option value="" selected="selected">--не имеет значения--</option>
|
||||||
{% for item in form.fields.to_place.choices %}
|
{% for item in form.fields.to_place.choices %}
|
||||||
<option value="{{ item.0 }}">{{ item.1 }}</option>
|
<option value="{{ item.0 }}" {% if form.initial.to_place == item.0 %} selected{% endif %}>{{ item.1 }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@@ -208,13 +208,13 @@
|
|||||||
<div class="methods_transportation_form_filters">
|
<div class="methods_transportation_form_filters">
|
||||||
<div class="title_el_methods_transportation">Сортировать по:</div>
|
<div class="title_el_methods_transportation">Сортировать по:</div>
|
||||||
<select onchange="filters_func_find_route_main(this)" name="sort" class="select_form_filters_find_route el_form_find_route">
|
<select onchange="filters_func_find_route_main(this)" name="sort" class="select_form_filters_find_route el_form_find_route">
|
||||||
<option value="last">По последним</option>
|
<option value="last" {% if form.initial.sort == item.0 %} selected{% endif %}>По последним</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="block-finded-routes">
|
<div class="block-finded-routes">
|
||||||
{# <img class="loader_filters_routes" src="{% static "img/svg/loader.svg" %}">#}
|
<img class="loader_filters_routes" src="{% static "img/svg/loader.svg" %}">
|
||||||
<div class="page_routes_1">
|
<div class="page_routes_1">
|
||||||
{% include "blocks/b_search_routes.html" %}
|
{% include "blocks/b_search_routes.html" %}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user