Merge remote-tracking branch 'origin/main'

This commit is contained in:
SDE
2024-01-31 14:37:49 +03:00

View File

@@ -84,6 +84,7 @@ function select_tab_profile (el,url,owner_type=null) {
selectTabProfileIfHisNotSelected(url)
}
deleteMarkerMessages(el)
checkStatesAfterTransitionToAnotherTabProfile()
},
error: function (data){
console.log(data)
@@ -92,16 +93,37 @@ function select_tab_profile (el,url,owner_type=null) {
});
}
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 checkStatesAfterTransitionToAnotherTabProfile () {
// check which page if profile - do
if (window.location.href.includes('profile')){
// if curtain open we need to close, so we'il see content without curtain
if (document.querySelector(".menu_buttons.curtain.right.open")){
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) {
if (url !== 'new_route_view') {
let el_f_select = document.querySelector(`[data-ajax-url=${url}]`)
@@ -985,7 +1007,7 @@ function show_header_list () {
// } else if (right){
// let right = document.querySelector(".curtain.right")
// open_curtain(null,right,null,'close')
// } else {
// } else {`
// let curtain = getOpenCurtain()
// if (curtain) {
// open_curtain(null, null, null, 'close')