From a0e8698aa557979a80fac686feef3e37b4488eeb Mon Sep 17 00:00:00 2001 From: borissedw Date: Sun, 24 Sep 2023 16:35:16 +0300 Subject: [PATCH] 0.0.269 --- static/css/styles(boris).css | 8 +- static/js/filters_functions_find_route.js | 100 ++++++++++---------- static/js/range_calendar.js | 6 +- templates/blocks/b_finded_routes.html | 2 +- templates/pages/p_results_find_route.html | 2 +- templates/pages/profile/p_user_profile.html | 2 +- 6 files changed, 61 insertions(+), 59 deletions(-) diff --git a/static/css/styles(boris).css b/static/css/styles(boris).css index 22f4795..211675f 100644 --- a/static/css/styles(boris).css +++ b/static/css/styles(boris).css @@ -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; } diff --git a/static/js/filters_functions_find_route.js b/static/js/filters_functions_find_route.js index b0da044..ccb699a 100644 --- a/static/js/filters_functions_find_route.js +++ b/static/js/filters_functions_find_route.js @@ -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 = "Нечего не найдено!" + document.querySelector(".block-finded-routes").innerHTML = "
\n" + + "
\n" + + " Упс... Ничего не найдено, попробуйте\n" + + " изменить параметры поиска или оставьте заявку\n" + + " на перевозку посылки\n" + + "
\n" + + " \n" + + " \n" + + "
" + + } else { document.querySelector(".block-finded-routes").innerHTML = data.html - if (data.html === "\n\n\n\n\n"){ - // document.querySelector(".block-finded-routes").innerHTML = "Нечего не найдено!" - document.querySelector(".block-finded-routes").innerHTML = "
\n" + - "
\n" + - " Упс... Ничего не найдено, попробуйте\n" + - " изменить параметры поиска или оставьте заявку\n" + - " на перевозку посылки\n" + - "
\n" + - " \n" + - " \n" + - "
" - - } 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 = "" - 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 = "" + let ins_bef_el = document.querySelector(".block-finded-routes").firstChild + $(div).insertBefore(ins_bef_el) + // window.history.pushState({data:get_url + // },{}) + }, + errors: function (data){ + + } + }); + } } \ No newline at end of file diff --git a/static/js/range_calendar.js b/static/js/range_calendar.js index 988ab2f..734db07 100644 --- a/static/js/range_calendar.js +++ b/static/js/range_calendar.js @@ -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')); diff --git a/templates/blocks/b_finded_routes.html b/templates/blocks/b_finded_routes.html index e921435..83afaf8 100644 --- a/templates/blocks/b_finded_routes.html +++ b/templates/blocks/b_finded_routes.html @@ -7,7 +7,7 @@ {% if not routes %} {# Нечего не найдено!#}
-
+
Упс... Ничего не найдено, попробуйте изменить параметры поиска или оставьте заявку на перевозку посылки diff --git a/templates/pages/p_results_find_route.html b/templates/pages/p_results_find_route.html index eb19267..be16229 100644 --- a/templates/pages/p_results_find_route.html +++ b/templates/pages/p_results_find_route.html @@ -9,7 +9,7 @@ {# #} - + {% include "connect_ws_js.html" %} diff --git a/templates/pages/profile/p_user_profile.html b/templates/pages/profile/p_user_profile.html index 379730c..b68ce2d 100644 --- a/templates/pages/profile/p_user_profile.html +++ b/templates/pages/profile/p_user_profile.html @@ -13,7 +13,7 @@ - + {% include "connect_ws_js.html" %}