0.0.42 fix form

This commit is contained in:
SBD
2025-01-16 17:18:12 +03:00
parent b3e8d75539
commit 529b324817
8 changed files with 68 additions and 23 deletions

View File

@@ -17,11 +17,11 @@ function makeMoverOrder(form) {
if (!profile_root) return;
profile_root.innerHTML = res.html
let created_route = document.querySelector(`[data-number-of-route="${created_route_id}"]`);
let created_route = document.querySelector(`.w_route_card[data-route_id="${created_route_id}"]`);
created_route.scrollIntoView({
behavior:"smooth",
block:'start',
inline:'start'
block:'center',
inline:'center'
});
let new_url = window.location.pathname

View File

@@ -17,7 +17,7 @@ function makePosterOrder(form) {
if (!profile_root) return;
profile_root.innerHTML = res.html
let created_route = document.querySelector(`[data-number-of-route="${created_route_id}"]`);
let created_route = document.querySelector(`.w_route_card[data-route_id="${created_route_id}"]`);
created_route.scrollIntoView({
behavior:"smooth",
block:'start',

View File

@@ -0,0 +1,22 @@
function changeRoute(el) {
if (!el) return;
let $parent = el.closest(".w_route_card")
if (!$parent) return;
let data = {
'route_id': $parent.dataset.route_id,
'owner_type': $parent.dataset.owner_type,
}
let request = new api({
url: '/routes/create_or_change_route/',
data: data,
data_type: 'json',
success: (res) => {
}, error: (res) => {
}
});
request.ajaxRequest()
}