0.8.383
This commit is contained in:
@@ -759,62 +759,75 @@ function open_curtain (left=null,right=null,overlay=null,close=null){
|
|||||||
let overlay_clear = document.querySelector(".block_overlay")
|
let overlay_clear = document.querySelector(".block_overlay")
|
||||||
overlay_clear.classList.toggle('show')
|
overlay_clear.classList.toggle('show')
|
||||||
overlay_clear.classList.toggle('hidden')
|
overlay_clear.classList.toggle('hidden')
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
curtainMove(curtain,container_curtain,curtain_name,body)
|
||||||
let user_type = getInfoAboutUser()
|
curtain.classList.add("open")
|
||||||
if (user_type === 'mobile' || !window.location.host.includes('profile') || user_type === 'laptop' ) {
|
curtain.classList.remove("close")
|
||||||
curtain.classList.toggle("open")
|
} else {
|
||||||
curtain.classList.toggle("close")
|
curtainMove(curtain,container_curtain,curtain_name,body)
|
||||||
|
|
||||||
newCurtainZIndex()
|
|
||||||
let curtain_check = getOpenCurtain()
|
|
||||||
if (curtain_check.length > 1){
|
|
||||||
let curtain_old = getCurtainWIncreaceZindex(curtain_check,'decreace')['increace']
|
|
||||||
curtain_old.classList.toggle("close")
|
|
||||||
curtain_old.classList.toggle("open")
|
|
||||||
|
|
||||||
}
|
|
||||||
if (curtain_check.length > 0){
|
|
||||||
let overlay = document.querySelector('.block_overlay.show')
|
|
||||||
if (!overlay){
|
|
||||||
let overlay_clear = document.querySelector(".block_overlay")
|
|
||||||
overlay_clear.classList.toggle('show')
|
|
||||||
overlay_clear.classList.toggle('hidden')
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
|
|
||||||
closeOverlay()
|
|
||||||
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!window.location.href.includes('profile')){
|
|
||||||
//
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
let handler_text = curtain.querySelector('.text_f_curtain')
|
|
||||||
if (curtain.classList.contains('open')){
|
|
||||||
handler_text.innerHTML = 'Закрыть'
|
|
||||||
handler_text.style.fontSize = '13px'
|
|
||||||
} else {
|
|
||||||
handler_text.innerHTML = curtain_name
|
|
||||||
handler_text.style.fontSize = '13px'
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!curtain.classList.contains('open')){
|
|
||||||
body.style.overflowY = ''
|
|
||||||
} else {
|
|
||||||
body.style.overflowY = 'hidden'
|
|
||||||
}
|
|
||||||
container_curtain.classList.toggle("close")
|
|
||||||
container_curtain.classList.toggle("open")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function curtainMove (curtain,container_curtain,curtain_name,body){
|
||||||
|
let user_type = getInfoAboutUser()
|
||||||
|
if (user_type === 'mobile' || !window.location.host.includes('profile') || user_type === 'laptop' ) {
|
||||||
|
curtain.classList.toggle("open")
|
||||||
|
curtain.classList.toggle("close")
|
||||||
|
|
||||||
|
// newCurtainZIndex()
|
||||||
|
let curtain_check = getOpenCurtain()
|
||||||
|
if (curtain_check.length > 1){
|
||||||
|
let curtain_old = getCurtainWIncreaceZindex(curtain_check,'decreace')
|
||||||
|
if (curtain_old){
|
||||||
|
if (curtain_old['increace']){
|
||||||
|
curtain_old = curtain_old['increace']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
curtain_old.classList.toggle("close")
|
||||||
|
curtain_old.classList.toggle("open")
|
||||||
|
|
||||||
|
}
|
||||||
|
if (curtain_check.length > 0){
|
||||||
|
let overlay = document.querySelector('.block_overlay.show')
|
||||||
|
if (!overlay){
|
||||||
|
let overlay_clear = document.querySelector(".block_overlay")
|
||||||
|
overlay_clear.classList.toggle('show')
|
||||||
|
overlay_clear.classList.toggle('hidden')
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
|
closeOverlay()
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!window.location.href.includes('profile')){
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
let handler_text = curtain.querySelector('.text_f_curtain')
|
||||||
|
// if (curtain.classList.contains('open')){
|
||||||
|
// handler_text.innerHTML = 'Закрыть'
|
||||||
|
// handler_text.style.fontSize = '13px'
|
||||||
|
// } else {
|
||||||
|
handler_text.innerHTML = curtain_name
|
||||||
|
handler_text.style.fontSize = '13px'
|
||||||
|
// }
|
||||||
|
|
||||||
|
if (!curtain.classList.contains('open')){
|
||||||
|
body.style.overflowY = ''
|
||||||
|
} else {
|
||||||
|
body.style.overflowY = 'hidden'
|
||||||
|
}
|
||||||
|
container_curtain.classList.toggle("close")
|
||||||
|
container_curtain.classList.toggle("open")
|
||||||
|
}
|
||||||
|
|
||||||
function turnOffFirst (el) {
|
function turnOffFirst (el) {
|
||||||
if (el.classList.contains('first')){
|
if (el.classList.contains('first')){
|
||||||
el.classList.remove('first')
|
el.classList.remove('first')
|
||||||
@@ -841,10 +854,28 @@ function newCurtainZIndex (curtain) {
|
|||||||
}
|
}
|
||||||
if (cur_curtain){
|
if (cur_curtain){
|
||||||
cur_curtain.style.zIndex = '101'
|
cur_curtain.style.zIndex = '101'
|
||||||
|
let curtain_f_delete = forloopForCurtains(cur_curtain)
|
||||||
|
if (curtain_f_delete){
|
||||||
|
curtain_f_delete.style.zIndex = '99'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function forloopForCurtains (cur_curtain) {
|
||||||
|
let curtains = document.querySelectorAll('.curtain')
|
||||||
|
let curtain_f_delete = null
|
||||||
|
let i = 0
|
||||||
|
curtains.forEach(function (){
|
||||||
|
let el = curtains[i]
|
||||||
|
if (!el === cur_curtain){
|
||||||
|
curtain_f_delete = el
|
||||||
|
}
|
||||||
|
i++
|
||||||
|
})
|
||||||
|
return curtain_f_delete
|
||||||
|
}
|
||||||
|
|
||||||
function getInfoCurtain (curtain,zIndex,name) {
|
function getInfoCurtain (curtain,zIndex,name) {
|
||||||
let data = {}
|
let data = {}
|
||||||
let curtain_f_w = null
|
let curtain_f_w = null
|
||||||
|
|||||||
Reference in New Issue
Block a user