0.0.78 update scrip for menu_user_profile
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
function writeMessage(){
|
||||
function writeMessage(el){
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: '/ru/user_account/chats/',
|
||||
@@ -14,6 +14,9 @@ function writeMessage(){
|
||||
// location.href = '/profile'
|
||||
document.querySelector(".info_profile").innerHTML = data.html;
|
||||
|
||||
let list_div = document.querySelectorAll('.menu_profile div');
|
||||
list_div.forEach(el=>{ el.classList.remove('selected'); });
|
||||
el.classList.add('selected')
|
||||
|
||||
},
|
||||
error: function (data, exception){
|
||||
@@ -24,7 +27,7 @@ function writeMessage(){
|
||||
}
|
||||
|
||||
|
||||
function technicalSupport(){
|
||||
function technicalSupport(el){
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: '/ru/user_account/support_tickets/',
|
||||
@@ -41,6 +44,10 @@ function technicalSupport(){
|
||||
// location.href = '/profile'
|
||||
document.querySelector(".info_profile").innerHTML = data.html;
|
||||
|
||||
let list_div = document.querySelectorAll('.menu_profile div');
|
||||
list_div.forEach(el=>{ el.classList.remove('selected'); });
|
||||
el.classList.add('selected')
|
||||
|
||||
|
||||
},
|
||||
error: function (data, exception){
|
||||
@@ -49,7 +56,7 @@ function technicalSupport(){
|
||||
}
|
||||
});
|
||||
}
|
||||
function mySubscription(){
|
||||
function mySubscription(el){
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: '/ru/user_account/subscribe/',
|
||||
@@ -66,6 +73,10 @@ function mySubscription(){
|
||||
// location.href = '/profile'
|
||||
document.querySelector(".info_profile").innerHTML = data.html;
|
||||
|
||||
let list_div = document.querySelectorAll('.menu_profile div');
|
||||
list_div.forEach(el=>{ el.classList.remove('selected'); });
|
||||
el.classList.add('selected')
|
||||
|
||||
|
||||
},
|
||||
error: function (data, exception){
|
||||
@@ -74,7 +85,7 @@ function mySubscription(){
|
||||
}
|
||||
});
|
||||
}
|
||||
function myProfile(){
|
||||
function myProfile(el){
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: '/ru/user_account/change_profile/',
|
||||
@@ -91,6 +102,10 @@ function myProfile(){
|
||||
// location.href = '/profile'
|
||||
document.querySelector(".info_profile").innerHTML = data.html;
|
||||
|
||||
let list_div = document.querySelectorAll('.menu_profile div');
|
||||
list_div.forEach(el=>{ el.classList.remove('selected'); });
|
||||
el.classList.add('selected')
|
||||
|
||||
|
||||
},
|
||||
error: function (data, exception){
|
||||
@@ -100,18 +115,18 @@ function myProfile(){
|
||||
});
|
||||
}
|
||||
|
||||
function selectMenuItem() {
|
||||
let list_div = document.querySelectorAll('.menu_profile div');
|
||||
|
||||
list_div.forEach(item =>{
|
||||
item.addEventListener('click', (e) =>{
|
||||
list_div.forEach(el=>{ el.classList.remove('selected'); });
|
||||
item.classList.add('selected')
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
// function selectMenuItem() {
|
||||
// let list_div = document.querySelectorAll('.menu_profile div');
|
||||
//
|
||||
// list_div.forEach(item =>{
|
||||
// item.addEventListener('click', (e) =>{
|
||||
// list_div.forEach(el=>{ el.classList.remove('selected'); });
|
||||
// item.classList.add('selected')
|
||||
// })
|
||||
// })
|
||||
//
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
|
||||
@@ -376,7 +391,7 @@ function OnSelectionChange(el) {
|
||||
|
||||
|
||||
|
||||
function createRoute(){
|
||||
function createRoute(el){
|
||||
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
@@ -394,6 +409,10 @@ function createRoute(){
|
||||
// location.href = '/profile'
|
||||
document.querySelector(".info_profile").innerHTML = data.html
|
||||
|
||||
let list_div = document.querySelectorAll('.menu_profile div');
|
||||
list_div.forEach(el=>{ el.classList.remove('selected'); });
|
||||
el.classList.add('selected')
|
||||
|
||||
|
||||
|
||||
//get dynamic value
|
||||
@@ -413,7 +432,7 @@ function createRoute(){
|
||||
});
|
||||
}
|
||||
|
||||
function getRoute(){
|
||||
function getRoute(el){
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: '/ru/routes/get_routes/',
|
||||
@@ -430,6 +449,10 @@ function getRoute(){
|
||||
// location.href = '/profile'
|
||||
document.querySelector(".info_profile").innerHTML = data.html;
|
||||
|
||||
let list_div = document.querySelectorAll('.menu_profile div');
|
||||
list_div.forEach(el=>{ el.classList.remove('selected'); });
|
||||
el.classList.add('selected')
|
||||
|
||||
|
||||
},
|
||||
error: function (data, exception){
|
||||
|
||||
Reference in New Issue
Block a user