Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -84,6 +84,7 @@ function select_tab_profile (el,url,owner_type=null) {
|
|||||||
selectTabProfileIfHisNotSelected(url)
|
selectTabProfileIfHisNotSelected(url)
|
||||||
}
|
}
|
||||||
deleteMarkerMessages(el)
|
deleteMarkerMessages(el)
|
||||||
|
checkStatesAfterTransitionToAnotherTabProfile()
|
||||||
},
|
},
|
||||||
error: function (data){
|
error: function (data){
|
||||||
console.log(data)
|
console.log(data)
|
||||||
@@ -92,16 +93,37 @@ function select_tab_profile (el,url,owner_type=null) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteMarkerMessages (el) {
|
function checkStatesAfterTransitionToAnotherTabProfile () {
|
||||||
let marker = document.querySelectorAll(".icon_unread_messages")
|
// check which page if profile - do
|
||||||
if (marker.length > 0){
|
if (window.location.href.includes('profile')){
|
||||||
marker[0].classList.remove("showed")
|
// if curtain open we need to close, so we'il see content without curtain
|
||||||
if (marker[1]){
|
if (document.querySelector(".menu_buttons.curtain.right.open")){
|
||||||
marker[1].classList.remove("showed")
|
open_curtain_w_btn_profile()
|
||||||
|
}
|
||||||
|
// if overlay open we need to close, so we'il see content without overlay
|
||||||
|
if (document.querySelector('.block_overlay.show')){
|
||||||
|
setStandartSettingsToBlockOverlay()
|
||||||
|
}
|
||||||
|
// if page === chat - do or if page === support
|
||||||
|
if (window.location.href.includes("page/chat/") || window.location.href.includes("page/support/")){
|
||||||
|
// if curtain with contacts or curtain with clients close we need to open it,
|
||||||
|
// but if user === not admin, and user in page support we didn't need to do anything
|
||||||
|
if (document.querySelector(".menu_buttons.curtain.left.close")){
|
||||||
|
open_curtain_w_contacts()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function deleteMarkerMessages (el) {
|
||||||
|
let marker = document.querySelectorAll(".icon_unread_messages")
|
||||||
|
if (marker.length > 0) {
|
||||||
|
marker[0].classList.remove("showed")
|
||||||
|
if (marker[1]) {
|
||||||
|
marker[1].classList.remove("showed")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
function selectTabProfileIfHisNotSelected (url) {
|
function selectTabProfileIfHisNotSelected (url) {
|
||||||
if (url !== 'new_route_view') {
|
if (url !== 'new_route_view') {
|
||||||
let el_f_select = document.querySelector(`[data-ajax-url=${url}]`)
|
let el_f_select = document.querySelector(`[data-ajax-url=${url}]`)
|
||||||
@@ -985,7 +1007,7 @@ function show_header_list () {
|
|||||||
// } else if (right){
|
// } else if (right){
|
||||||
// let right = document.querySelector(".curtain.right")
|
// let right = document.querySelector(".curtain.right")
|
||||||
// open_curtain(null,right,null,'close')
|
// open_curtain(null,right,null,'close')
|
||||||
// } else {
|
// } else {`
|
||||||
// let curtain = getOpenCurtain()
|
// let curtain = getOpenCurtain()
|
||||||
// if (curtain) {
|
// if (curtain) {
|
||||||
// open_curtain(null, null, null, 'close')
|
// open_curtain(null, null, null, 'close')
|
||||||
|
|||||||
Reference in New Issue
Block a user