From 380dc4d77cdd228af540778e523d6351b163a077 Mon Sep 17 00:00:00 2001 From: ArtemB Date: Tue, 29 Aug 2023 15:15:58 +0300 Subject: [PATCH] 0.0.117 select my_routes after send new_route --- static/js/user_profile.js | 5 +++++ templates/blocks/b_user_profile.html | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/static/js/user_profile.js b/static/js/user_profile.js index da4251a..d1d3f30 100644 --- a/static/js/user_profile.js +++ b/static/js/user_profile.js @@ -399,6 +399,11 @@ function sendRoute(el, routeID = null){ // location.href = '/profile' document.querySelector(".info_profile").innerHTML = data.html + let list_div = document.querySelectorAll('.menu_profile div'); + let my_routes = document.getElementById("my_routes_id") + list_div.forEach(el=>{ el.classList.remove('selected'); }); + my_routes.classList.add('selected') + }, error: function (data, exception){ diff --git a/templates/blocks/b_user_profile.html b/templates/blocks/b_user_profile.html index 9752695..6b65c12 100644 --- a/templates/blocks/b_user_profile.html +++ b/templates/blocks/b_user_profile.html @@ -17,7 +17,7 @@ Разместить объявление как перевозчик -
+