This commit is contained in:
2023-09-24 16:35:16 +03:00
parent 71e34c6b03
commit a0e8698aa5
6 changed files with 61 additions and 59 deletions

View File

@@ -20,6 +20,10 @@
font-size: 16px;
}
.font-large{
font-size: 24px;
}
.mb-10{
margin-bottom: 10px;
}
@@ -32,10 +36,6 @@
font-weight: 700;
}
.fz-24{
font-size: 24px;
}
.c-txt-b2{
color: #272424;
}

View File

@@ -20,9 +20,9 @@ function filters_func_find_route_main (el,owner_type=null,win_loc_replace=null){
event.preventDefault()
}
document.querySelector(".loader_filters_routes").classList.toggle("show")
let one_sec = setTimeout(function (){
// let form = el.form
// let formData = new FormDat a(form)
// let formData = new FormData(form)
let data_d = {}
let get_url = ""
let list = forloop_func_form(data_d,"get",get_url)
@@ -34,55 +34,55 @@ function filters_func_find_route_main (el,owner_type=null,win_loc_replace=null){
}
$.ajax({
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
url: '/ru/routes/find_routes/',
type: "POST",
// async: true,
cache: false,
processData: false,
contentType: false,
// enctype: 'json',
data: JSON.stringify(data_d),
success: function(data){
document.querySelector(".loader_filters_routes").classList.toggle("show")
$.ajax({
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
url: '/ru/routes/find_routes/',
type: "POST",
// async: true,
cache: false,
processData: false,
contentType: false,
// enctype: 'json',
data: JSON.stringify(data_d),
success: function(data){
document.querySelector(".loader_filters_routes").classList.toggle("show")
document.querySelector(".block-finded-routes").innerHTML = data.html
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 = "<div class=\"not_found_routes show\">\n" +
" <div class=\"text-align-center fw-700 font-large c-txt-b2 m-a w-80 m-t-8p\">\n" +
" Упс... <span class=\"orange-text\">Ничего не найдено</span>, попробуйте\n" +
" изменить параметры поиска или оставьте заявку\n" +
" на перевозку посылки\n" +
" </div>\n" +
" <img class=\"boxes_not_fond_routes left\" src=\"/static/img/boxes_for_not_found_routes/b_1.svg\"\">\n" +
" <img class=\"boxes_not_fond_routes right\" src=\"/static/img/boxes_for_not_found_routes/b_2.svg\"\">\n" +
" </div>"
} else {
document.querySelector(".block-finded-routes").innerHTML = data.html
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 = "<div class=\"not_found_routes show\">\n" +
" <div class=\"text-align-center fw-700 fz-24 c-txt-b2 m-a w-80 m-t-8p\">\n" +
" Упс... <span class=\"orange-text\">Ничего не найдено</span>, попробуйте\n" +
" изменить параметры поиска или оставьте заявку\n" +
" на перевозку посылки\n" +
" </div>\n" +
" <img class=\"boxes_not_fond_routes left\" src=\"/static/img/boxes_for_not_found_routes/b_1.svg\"\">\n" +
" <img class=\"boxes_not_fond_routes right\" src=\"/static/img/boxes_for_not_found_routes/b_2.svg\"\">\n" +
" </div>"
} else {
document.querySelector(".block-finded-routes").innerHTML = data.html
}
// window.location.href = window.location.href + "?" + get_url
// window.location.search = "?" + get_url
history.pushState({'data':data_d,'str_data':get_url}, "state_filters", `?${get_url}`);
// let element = document.createElement("img")
// element.classList.add("loader_filters_routes")
// element.src = "/static/img/svg/loader.svg"
let div = document.createElement("div")
div.classList.add("width-100")
div.classList.add("text-align-center")
div.classList.add("mb-10")
div.innerHTML = "<img src='/static/img/svg/loader.svg' class='loader_filters_routes'/>"
let ins_bef_el = document.querySelector(".block-finded-routes").firstChild
$(div).insertBefore(ins_bef_el)
// window.history.pushState({data:get_url
// },{})
},
errors: function (data){
}
});
},1000)
// window.location.href = window.location.href + "?" + get_url
// window.location.search = "?" + get_url
history.pushState({'data':data_d,'str_data':get_url}, "state_filters", `?${get_url}`);
// let element = document.createElement("img")
// element.classList.add("loader_filters_routes")
// element.src = "/static/img/svg/loader.svg"
let div = document.createElement("div")
div.classList.add("width-100")
div.classList.add("text-align-center")
div.classList.add("mb-10")
div.innerHTML = "<img src='/static/img/svg/loader.svg' class='loader_filters_routes'/>"
let ins_bef_el = document.querySelector(".block-finded-routes").firstChild
$(div).insertBefore(ins_bef_el)
// window.history.pushState({data:get_url
// },{})
},
errors: function (data){
}
});
}
}

View File

@@ -54,7 +54,8 @@ function init_arrival_DT (){
$(place_1).daterangepicker({
"autoapply": true,
"linkedCalendars": false,
"singleDatePicker":true
"singleDatePicker":true,
"timePicker":true
},
function (start, end, label) {
@@ -88,7 +89,8 @@ function init_departure_DT (){
$(place_1).daterangepicker({
"autoapply": true,
"linkedCalendars": false,
"singleDatePicker":true
"singleDatePicker":true,
"timePicker":true
},
function(start, end, label) {
// $('#displayRegervation').text('Registration date is: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD'));

View File

@@ -7,7 +7,7 @@
{% if not routes %}
{# <span style='color: #ff0000;font-weight: 800;font-size: 18px;padding: 10px;'>Нечего не найдено!</span>#}
<div class="not_found_routes show">
<div class="text-align-center fw-700 fz-24 c-txt-b2 m-a w-80 m-t-8p">
<div class="text-align-center fw-700 font-large c-txt-b2 m-a w-80 m-t-8p">
Упс... <span class="orange-text">Ничего не найдено</span>, попробуйте
изменить параметры поиска или оставьте заявку
на перевозку посылки

View File

@@ -9,7 +9,7 @@
{# <script src="{% static "js/serch_town.js" %}"></script>#}
<script src="{% static "js/user_profile.js" %}"></script>
<script src="{% static "js/range_slider_double.js" %}"></script>
<script src='{% static "js/user_profile(boris).js" %}'> </script>
<script src='{% static "js/user_profile_2.js" %}'> </script>
{% include "connect_ws_js.html" %}
<script src="{% static "js/filters_functions_find_route.js" %}"></script>
<script src="{% static "js/dynamic_loading_routes.js" %}"></script>

View File

@@ -13,7 +13,7 @@
<link rel="stylesheet" href="{% static 'css/ion.rangeSlider.min.css' %}">
<script src='{% static "js/user_profile(boris).js" %}'> </script>
<script src='{% static "js/user_profile_2.js" %}'> </script>
{% include "connect_ws_js.html" %}