From 1301af9d84fc7082f24e57215567f08e7469e062 Mon Sep 17 00:00:00 2001 From: ArtemB Date: Thu, 1 Aug 2024 10:22:44 +0300 Subject: [PATCH 1/7] 1.1.51 upd the local time check of the selected city --- static/js/range_calendar.js | 16 +++++++++++----- static/js/user_profile.js | 7 ++++++- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/static/js/range_calendar.js b/static/js/range_calendar.js index 545714d..4e1612c 100644 --- a/static/js/range_calendar.js +++ b/static/js/range_calendar.js @@ -148,18 +148,24 @@ function init_departure_DT() { if (!place_1) return; let hiddenTime = document.querySelector('.local_city_time').innerText; - let startDate; + let startDate = null; + if(hiddenTime){ + if (window.location.href.includes("/ru/")) { - if (window.location.href.includes("/ru/")) { + startDate = moment(hiddenTime, "D MMMM YYYY г. HH:mm", 'ru'); + } else { - startDate = moment(hiddenTime, "D MMMM YYYY г. HH:mm", 'ru'); + startDate = moment(hiddenTime, "MMMM D, YYYY, h:mm a", 'en'); + } } else { - - startDate = moment(hiddenTime, "MMMM D, YYYY, h:mm a", 'en'); + startDate = moment() } + + + $(place_1).daterangepicker({ "autoapply": true, "linkedCalendars": false, diff --git a/static/js/user_profile.js b/static/js/user_profile.js index 37a5633..e31717f 100644 --- a/static/js/user_profile.js +++ b/static/js/user_profile.js @@ -350,7 +350,12 @@ function selectItemAddrPoint(id, name, ctrl_name, city_DT){ let input_list = document.getElementsByName(ctrl_name + '_list')[0]; let tap_txt_cont = document.querySelector("#id_" + ctrl_name); let local_city_time = document.querySelector(".local_city_time"); - local_city_time.innerHTML = city_DT; + + if(ctrl_name === "from_address_point_txt"){ + local_city_time.innerHTML = city_DT; + } + + tap_txt_cont.value = name; tap_txt_cont.setAttribute('title',name) let tap_cont = document.querySelector("#id_" + ctrl_name.slice(0, -4)); From 3a497d09dfa41640dcdec7ba8e6cb8f68e108204 Mon Sep 17 00:00:00 2001 From: ArtemB Date: Thu, 1 Aug 2024 10:44:18 +0300 Subject: [PATCH 2/7] 1.1.51 upd initialization for init_departure_DT() init_arrival_DT() --- static/js/user_profile.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/static/js/user_profile.js b/static/js/user_profile.js index e31717f..f9e0be9 100644 --- a/static/js/user_profile.js +++ b/static/js/user_profile.js @@ -362,6 +362,7 @@ function selectItemAddrPoint(id, name, ctrl_name, city_DT){ tap_cont.value = id; init_departure_DT() + init_arrival_DT() if (tap_txt_cont.classList.contains('red_text')){ tap_txt_cont.classList.remove('red_text') @@ -815,8 +816,8 @@ function OnSelectionChange(el) { // } sliderInit(); - init_arrival_DT() - init_departure_DT() + // init_arrival_DT() + // init_departure_DT() From 2bc9aa7a1ca0b6b27495f4cc2705d3334b004428 Mon Sep 17 00:00:00 2001 From: ArtemB Date: Thu, 1 Aug 2024 11:04:23 +0300 Subject: [PATCH 3/7] 1.1.53 added a local time reference when editing route --- templates/blocks/profile/b_new_route.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/blocks/profile/b_new_route.html b/templates/blocks/profile/b_new_route.html index 36e5abb..92382ee 100644 --- a/templates/blocks/profile/b_new_route.html +++ b/templates/blocks/profile/b_new_route.html @@ -76,7 +76,7 @@
- +