diff --git a/static/css/styles(boris).css b/static/css/styles(boris).css
index 211675f..3bc6528 100644
--- a/static/css/styles(boris).css
+++ b/static/css/styles(boris).css
@@ -1837,4 +1837,76 @@
margin-bottom: 30px;
}
+.cont_header_btn_profile{
+ position: relative;
+}
+.menu_profile_btn{
+ display: none;
+ position: absolute;
+ right: 100px;
+ z-index: 220;
+}
+
+.menu_profile_btn.show{
+ display: block;
+ background: #FFF;
+ padding: 10px;
+ width: 230px;
+ position: absolute;
+ right: 0;
+ top: 60px;
+ border-radius: 10px;
+ font-size: 14px;
+ font-weight: 600;
+ text-align: center;
+}
+
+.button_profile_header{
+ height: 50px;
+ width: 150px;
+ background: #FF613A;
+ color: #FFF;
+ /* Heading 5 */
+ font-size: 18px;
+ font-style: normal;
+ font-weight: 600;
+ text-decoration: none;
+ line-height: 26px;
+ border-radius: 10px;
+ text-align: center;
+
+ box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12);
+}
+
+.btn_menu_profile:first-of-type{
+ margin-top: 20px;
+}
+
+.btn_menu_profile:last-child{
+ width: 100%;
+}
+
+.btn_menu_profile{
+ border-radius: 10px;
+ background: #FFF;
+ box-shadow: -1px 4px 10px 0 rgba(198, 199, 203, 0.20), 0 -1px 10px 0 rgba(198, 199, 203, 0.20);
+ width: 93%;
+ padding: 4%;
+ margin-bottom: 20px;
+ display: block;
+ color: #27242499;
+ font-weight: 600;
+ cursor: pointer;
+}
+
+.separator_menu_profile{
+ margin: 10px 0 10px 0;
+ border:1px solid #E6E6E6;
+ width: 98%;
+}
+
+.subscribe_type_txt{
+ color: #000;
+ font-size: 14px;
+}
\ No newline at end of file
diff --git a/static/js/datarangepicker.js b/static/js/datarangepicker.js
index 5eafc1a..6ee1c59 100644
--- a/static/js/datarangepicker.js
+++ b/static/js/datarangepicker.js
@@ -26,7 +26,7 @@
this.maxSpan = !1,
this.autoApply = 1,
this.singleDatePicker = !1,
- this.showDropdowns = !1,
+ this.showDropdowns = 1,
this.minYear = t().subtract(100, "year").format("YYYY"),
this.maxYear = t().add(100, "year").format("YYYY"),
this.showWeekNumbers = !1,
diff --git a/static/js/filters_functions_find_route.js b/static/js/filters_functions_find_route.js
index ccb699a..ea24c59 100644
--- a/static/js/filters_functions_find_route.js
+++ b/static/js/filters_functions_find_route.js
@@ -1,5 +1,9 @@
-function filters_func_find_route_main (el,owner_type=null,win_loc_replace=null){
+let timeout_range_slider = null
+
+function filters_func_find_route_main (el,owner_type=null,win_loc_replace=null,weight=null){
+ document.querySelector(".loader_filters_routes").classList.toggle("show")
console.log("asd")
+
if (win_loc_replace){
event.preventDefault()
let data_d = {}
@@ -33,56 +37,72 @@ function filters_func_find_route_main (el,owner_type=null,win_loc_replace=null){
get_url = get_url + `owner_type=${owner_type}`
}
+ if (weight){
- $.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 (timeout_range_slider) {
+ clearTimeout(timeout_range_slider)
}
- // 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){
+ timeout_range_slider = setTimeout(
+ function () {
+ ajax_for_filter(data_d, get_url)
+ }
+ ,3000)
+ } else {
+ ajax_for_filter(data_d, get_url)
}
- });
-
}
+}
+
+function ajax_for_filter (data_d,get_url){
+ $.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(".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
+ // },{})
+ // clearTimeout(t)
+ },
+ errors: function (data){
+ // clearTimeout(t)
+ }
+ });
+ return null
}
\ No newline at end of file
diff --git a/static/js/range_calendar.js b/static/js/range_calendar.js
index 5c52100..e2c892e 100644
--- a/static/js/range_calendar.js
+++ b/static/js/range_calendar.js
@@ -61,7 +61,7 @@ function init_arrival_DT (){
function (start, end, label) {
// $('#displayRegervation').text('Registration date is: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD'));
- $('#id_arrival_DT').val(start.format('DD.MM.YYYY'))
+ $('#id_arrival_DT').val(start.format('DD.MM.YYYY HH:mm'))
});
$(`${place_1.id} .drp-calendar.right`).hide();
@@ -98,7 +98,7 @@ function init_departure_DT (){
// $('#displayRegervation').text('Registration date is: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD'));
// $('#regervation')[0].dataset['departure_DT'] = start.format('YYYY-MM-DD');
// $('#regervation')[0].dataset['arrival_DT'] = end.format('YYYY-MM-DD');
- $('#id_departure_DT').val(start.format('DD.MM.YYYY'))
+ $('#id_departure_DT').val(start.format('DD.MM.YYYY HH:mm'))
});
diff --git a/static/js/user_profile_2.js b/static/js/user_profile_2.js
index 6305c68..cec5655 100644
--- a/static/js/user_profile_2.js
+++ b/static/js/user_profile_2.js
@@ -460,4 +460,12 @@ function send_subscribe (id){
}
});
+}
+
+
+function show_header_list () {
+ let el = document.querySelector(".menu_profile_btn")
+ if (el) {
+ el.classList.toggle("show")
+ }
}
\ No newline at end of file
diff --git a/templates/blocks/b_header.html b/templates/blocks/b_header.html
index e7cdde5..c6f366b 100644
--- a/templates/blocks/b_header.html
+++ b/templates/blocks/b_header.html
@@ -37,21 +37,30 @@
{% if user.is_authenticated %}
+ {# boris changed #}
+