This commit is contained in:
2023-11-12 15:52:39 +03:00
parent 88f679cd41
commit e4849ec659

View File

@@ -482,24 +482,12 @@ function selectedUserMessenger (ticket_id=null,user_id=null){
document.querySelector(".enter-message-inp").focus()
document.querySelector(".tab_user_messanger.select").scrollIntoView({behavior: "smooth",block:'nearest',inline:'nearest'});
// let el = document.querySelector(".tab_user_messanger.select")
// let cont = document.querySelector(".insert_users")
// if (el && cont){
// let el_pos = el.offsetTop
// cont.scrollTop = el_pos
// cont.scrollTo({
// top: el_pos,
// behavior: "smooth"
// });
// }
let user_type = getInfoAboutUser()
if (user_type === 'mobile') {
let curt_f_close = getCurtainWIncreaceZindex(document.querySelectorAll('.curtain'))
if (user_type === 'mobile' || user_type === 'laptop') {
closeCurtain('left')
} else if (!window.location.href.includes('profile')){
closeCurtain()
} else {
if (!window.location.href.includes('profile')){
closeCurtain()
}
}
},
@@ -676,10 +664,18 @@ function show_header_list () {
}
}
function closeCurtain () {
let curtain = getOpenCurtain()
if (curtain){
open_curtain(null,null,null,'close')
function closeCurtain (left,right) {
if (left){
let left = document.querySelector(".curtain.left")
open_curtain(left,null,null,'close')
} else if (right){
let right = document.querySelector(".curtain.right")
open_curtain(null,right,null,'close')
} else {
let curtain = getOpenCurtain()
if (curtain) {
open_curtain(null, null, null, 'close')
}
}
}
@@ -748,7 +744,7 @@ function open_curtain (left=null,right=null,overlay=null,close=null){
} else {
let user_type = getInfoAboutUser()
if (user_type === 'mobile' || !window.location.host.includes('profile')) {
if (user_type === 'mobile' || !window.location.host.includes('profile') || user_type === 'laptop' ) {
curtain.classList.toggle("open")
curtain.classList.toggle("close")
newCurtainZIndex()