0.0.183 media 360px v.3.1
This commit is contained in:
@@ -51,21 +51,7 @@ window.addEventListener('scroll', () => {
|
||||
// Действия при изменении URL
|
||||
|
||||
|
||||
// function changeImgLang(el) {
|
||||
//
|
||||
// let img = document.getElementById('dropbtn_lang')
|
||||
//
|
||||
// if (el.innerText === 'RU'){
|
||||
// img.style.background = "url('/static/img/png/ru.png') no-repeat left center;"
|
||||
// }
|
||||
// else if(el.innerText === 'EN'){
|
||||
// img.style.background = "url('/static/img/png/en.png')"
|
||||
// img.style.backgroundRepeat = "no-repeat"
|
||||
// img.style.backgroundPosition = "left center"
|
||||
//
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -15,12 +15,22 @@ function writeMessage(el){
|
||||
document.querySelector(".info_profile").innerHTML = data.html;
|
||||
|
||||
let list_div = document.querySelectorAll('.menu_profile div');
|
||||
let ru_lang = document.getElementById('ru_lang');
|
||||
let en_lang = document.getElementById('en_lang');
|
||||
ru_lang.pathname = "/ru/profile/page/chat/";
|
||||
en_lang.pathname = "/en/profile/page/chat/";
|
||||
list_div.forEach(el=>{ el.classList.remove('selected'); });
|
||||
el.classList.add('selected')
|
||||
let body = document.querySelector("body")
|
||||
body.style.overflow = "hidden"
|
||||
//updating the url without reloading
|
||||
window.history.pushState(null, null, '/ru/profile/page/chat/')
|
||||
if (window.location.href.indexOf("/ru/") > -1) {
|
||||
window.history.pushState(null, null, '/ru/profile/page/chat/')
|
||||
|
||||
} else if(window.location.href.indexOf("/en/") > -1){
|
||||
window.history.pushState(null, null, '/en/profile/page/chat/')
|
||||
}
|
||||
|
||||
middleWareJS()
|
||||
|
||||
},
|
||||
@@ -33,6 +43,7 @@ function writeMessage(el){
|
||||
|
||||
|
||||
function technicalSupport(el){
|
||||
console.log(el)
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: '/user_account/support_tickets/',
|
||||
@@ -50,11 +61,20 @@ function technicalSupport(el){
|
||||
document.querySelector(".info_profile").innerHTML = data.html;
|
||||
|
||||
let list_div = document.querySelectorAll('.menu_profile div');
|
||||
let ru_lang = document.getElementById('ru_lang');
|
||||
let en_lang = document.getElementById('en_lang');
|
||||
ru_lang.pathname = "/ru/profile/page/support/";
|
||||
en_lang.pathname = "/en/profile/page/support/";
|
||||
list_div.forEach(el=>{ el.classList.remove('selected'); });
|
||||
el.classList.add('selected')
|
||||
|
||||
//updating the url without reloading
|
||||
window.history.pushState(null, null, '/ru/profile/page/support/')
|
||||
if (window.location.href.indexOf("/ru/") > -1) {
|
||||
window.history.pushState(null, null, '/ru/profile/page/support/')
|
||||
|
||||
} else if(window.location.href.indexOf("/en/") > -1){
|
||||
window.history.pushState(null, null, '/en/profile/page/support/')
|
||||
}
|
||||
middleWareJS()
|
||||
|
||||
},
|
||||
@@ -82,13 +102,21 @@ function mySubscription(el){
|
||||
|
||||
// location.href = '/profile'
|
||||
// document.querySelector(".info_profile").innerHTML = data.html;
|
||||
|
||||
let ru_lang = document.getElementById('ru_lang');
|
||||
let en_lang = document.getElementById('en_lang');
|
||||
ru_lang.pathname = "/ru/profile/page/my_subscribe/";
|
||||
en_lang.pathname = "/en/profile/page/my_subscribe/";
|
||||
let list_div = document.querySelectorAll('.menu_profile div');
|
||||
list_div.forEach(el=>{ el.classList.remove('selected'); });
|
||||
el.classList.add('selected')
|
||||
|
||||
//updating the url without reloading
|
||||
window.history.pushState(null, null, '/ru/profile/page/my_subscribe/')
|
||||
if (window.location.href.indexOf("/ru/") > -1) {
|
||||
window.history.pushState(null, null, '/ru/profile/page/my_subscribe/')
|
||||
|
||||
} else if(window.location.href.indexOf("/en/") > -1){
|
||||
window.history.pushState(null, null, '/en/profile/page/my_subscribe/')
|
||||
}
|
||||
middleWareJS()
|
||||
|
||||
},
|
||||
@@ -114,13 +142,21 @@ function myProfile(el){
|
||||
|
||||
// location.href = '/profile'
|
||||
document.querySelector(".info_profile").innerHTML = data.html;
|
||||
|
||||
let ru_lang = document.getElementById('ru_lang');
|
||||
let en_lang = document.getElementById('en_lang');
|
||||
ru_lang.pathname = "/ru/profile/page/change_profile/";
|
||||
en_lang.pathname = "/en/profile/page/change_profile/";
|
||||
let list_div = document.querySelectorAll('.menu_profile div');
|
||||
list_div.forEach(el=>{ el.classList.remove('selected'); });
|
||||
el.classList.add('selected')
|
||||
|
||||
//updating the url without reloading
|
||||
window.history.pushState(null, null, '/ru/profile/page/change_profile/')
|
||||
if (window.location.href.indexOf("/ru/") > -1) {
|
||||
window.history.pushState(null, null, '/ru/profile/page/change_profile/')
|
||||
|
||||
} else if(window.location.href.indexOf("/en/") > -1){
|
||||
window.history.pushState(null, null, '/en/profile/page/change_profile/')
|
||||
}
|
||||
middleWareJS()
|
||||
|
||||
},
|
||||
@@ -608,14 +644,22 @@ function createRoute(el, owner_type){
|
||||
document.querySelector(".info_profile").innerHTML = data.html
|
||||
|
||||
let list_div = document.querySelectorAll('.menu_profile div');
|
||||
let ru_lang = document.getElementById('ru_lang');
|
||||
let en_lang = document.getElementById('en_lang');
|
||||
|
||||
list_div.forEach(el=>{ el.classList.remove('selected'); });
|
||||
el.classList.add('selected')
|
||||
|
||||
//updating the url without reloading
|
||||
if(el.id == 'customer'){
|
||||
// updating the url without reload
|
||||
|
||||
if(el.id === 'customer'){
|
||||
window.history.pushState(null, null, '/ru/profile/page/create_route_for_customer/')
|
||||
ru_lang.pathname = "/ru/profile/page/create_route_for_customer/";
|
||||
en_lang.pathname = "/en/profile/page/create_route_for_customer/";
|
||||
} else {
|
||||
window.history.pushState(null, null, '/ru/profile/page/create_route_for_mover/')
|
||||
ru_lang.pathname = "/ru/profile/page/create_route_for_mover/";
|
||||
en_lang.pathname = "/en/profile/page/create_route_for_mover/";
|
||||
}
|
||||
middleWareJS()
|
||||
|
||||
@@ -657,13 +701,26 @@ function getRoute(el){
|
||||
|
||||
|
||||
// location.href = '/profile'
|
||||
|
||||
document.querySelector(".info_profile").innerHTML = data.html;
|
||||
|
||||
let ru_lang = document.getElementById('ru_lang');
|
||||
let en_lang = document.getElementById('en_lang');
|
||||
ru_lang.pathname = "/ru/profile/page/my_routes/";
|
||||
en_lang.pathname = "/en/profile/page/my_routes/";
|
||||
|
||||
let list_div = document.querySelectorAll('.menu_profile div');
|
||||
list_div.forEach(el=>{ el.classList.remove('selected'); });
|
||||
el.classList.add('selected')
|
||||
|
||||
window.history.pushState(null, null, '/ru/profile/page/my_routes/')
|
||||
if (window.location.href.indexOf("/ru/") > -1) {
|
||||
window.history.pushState(null, null, '/ru/profile/page/my_routes/')
|
||||
|
||||
} else if(window.location.href.indexOf("/en/") > -1){
|
||||
window.history.pushState(null, null, '/en/profile/page/my_routes/')
|
||||
}
|
||||
|
||||
|
||||
|
||||
middleWareJS()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user