This commit is contained in:
2023-11-07 14:18:25 +03:00
parent e1a6fdd21f
commit a19017351b
5 changed files with 78 additions and 30 deletions

View File

@@ -441,7 +441,7 @@
} }
.menu_buttons.left.close{ .menu_buttons.left.close{
left: -320px; left: -338px;
transition: 200ms; transition: 200ms;
position: absolute; position: absolute;
width: 320px; width: 320px;
@@ -459,8 +459,9 @@
left: 0; left: 0;
transition: 200ms; transition: 200ms;
position: fixed; position: fixed;
float: unset;
padding-top: 10px; padding-top: 10px;
width: 320px;
} }
.handler_menu.left.close{ .handler_menu.left.close{
background: #FF613A; background: #FF613A;
@@ -500,8 +501,8 @@
padding: 7px 18px 7px 18px; padding: 7px 18px 7px 18px;
} }
.menu_buttons.left .handler_menu{ .menu_buttons.left .handler_menu{
transform: rotate(270deg); transform: rotate(90deg);
left: 312px; left: -48px;
width: 91px; width: 91px;
height: 18px; height: 18px;
display: block; display: block;
@@ -540,6 +541,10 @@
display: block; display: block;
} }
.block_overlay.show{
display: block;
}
.text_f_curtain{ .text_f_curtain{
display: inline-block; display: inline-block;
} }
@@ -561,11 +566,11 @@
height: 100vh; height: 100vh;
width: 100vw; width: 100vw;
/*background: rgba(39, 53, 62, 0.7);*/ /*background: rgba(39, 53, 62, 0.7);*/
backdrop-filter: blur(15px); backdrop-filter: blur(6px);
z-index: 100; z-index: 100;
position: fixed; position: absolute;
top: 86px; top: -55px;
left: -19px; right: 0;
} }
#customer>a, #mover>a{ #customer>a, #mover>a{
left: 5%; left: 5%;

View File

@@ -2260,8 +2260,10 @@
.menu_buttons.left.open{ .menu_buttons.left.open{
left: 0; left: 0;
transition: 200ms; transition: 200ms;
position: fixed; /* position: fixed; */
padding-top: 10px; padding-top: 10px;
float: left;
width: 33%;
} }
.handler_menu.left.close{ .handler_menu.left.close{
background: #FF613A; background: #FF613A;

View File

@@ -1101,7 +1101,7 @@ section.login>form>div>div:nth-child(5)>a {
section.profile { section.profile {
padding: 60px 40px 0; padding: 60px 40px 0;
margin-bottom: 120px; margin-bottom: 120px;
width: 60%; width: 70%;
float: left; float: left;
} }

View File

@@ -478,7 +478,14 @@ function selectedUserMessenger (ticket_id=null,user_id=null){
document.querySelector(".info_profile").innerHTML = data.html; document.querySelector(".info_profile").innerHTML = data.html;
document.querySelector(".enter-message-inp").focus() document.querySelector(".enter-message-inp").focus()
document.querySelector(".tab_user_messanger.select").scrollIntoView({behavior: "smooth"}); document.querySelector(".tab_user_messanger.select").scrollIntoView({behavior: "smooth"});
let user_type = getInfoAboutUser()
if (user_type === 'mobile') {
closeCurtain()
} else {
if (!window.location.href.includes('profile')){
closeCurtain()
}
}
}, },
error: function (data){ error: function (data){
@@ -672,7 +679,7 @@ function open_curtain (left=null,right=null,overlay=null,close=null){
if (left){ if (left){
if (left_curtain){ if (left_curtain){
curtain = left_curtain curtain = left_curtain
curtain.style.zIndex = '101' newCurtainZIndex(curtain)
if (right_curtain) { if (right_curtain) {
right_curtain.style.zIndex = '99' right_curtain.style.zIndex = '99'
curtain_name = curtain.dataset['name'] curtain_name = curtain.dataset['name']
@@ -682,7 +689,7 @@ function open_curtain (left=null,right=null,overlay=null,close=null){
} else if (right) { } else if (right) {
if (right_curtain){ if (right_curtain){
curtain = right_curtain curtain = right_curtain
curtain.style.zIndex = '101' newCurtainZIndex(curtain)
if (left_curtain) { if (left_curtain) {
left_curtain.style.zIndex = '99' left_curtain.style.zIndex = '99'
curtain_name = curtain.dataset['name'] curtain_name = curtain.dataset['name']
@@ -696,27 +703,23 @@ function open_curtain (left=null,right=null,overlay=null,close=null){
let body = document.querySelector('body') let body = document.querySelector('body')
if (close){ if (close){
// curtain = getOpenCurtain() // curtain = getOpenCurtain()
let handler_text = curtain.querySelector('.text_f_curtain') let type_curt = getTypeOfData(curtain)
let handler_text = ''
if (type_curt === 'object'){
curtain = curtain[0]
}
handler_text = curtain.querySelector('.text_f_curtain')
handler_text.innerHTML = curtain_name handler_text.innerHTML = curtain_name
curtain.classList.remove("open") curtain.classList.remove("open")
curtain.classList.add("close") curtain.classList.add("close")
let overlay = document.querySelector(".block_overlay") closeOverlay()
overlay.classList.add('hidden')
overlay.classList.remove('show')
} else { } else {
if (overlay){ closeOverlay()
overlay.classList.toggle("hidden")
overlay.classList.toggle("show")
} else {
let overlay = document.querySelector(".block_overlay")
if (overlay){
overlay.classList.toggle("hidden")
overlay.classList.toggle("show")
}
}
curtain.classList.toggle("close") curtain.classList.toggle("close")
curtain.classList.toggle("open") curtain.classList.toggle("open")
newCurtainZIndex()
let handler_text = curtain.querySelector('.text_f_curtain') let handler_text = curtain.querySelector('.text_f_curtain')
if (curtain.classList.contains('open')){ if (curtain.classList.contains('open')){
handler_text.innerHTML = 'Закрыть' handler_text.innerHTML = 'Закрыть'
@@ -735,8 +738,36 @@ function open_curtain (left=null,right=null,overlay=null,close=null){
} }
function closeOverlay () {
let curt = getOpenCurtain()
if (curt.length > 1){
// nothing to do
} else {
let overlay = document.querySelector(".block_overlay")
overlay.classList.toggle('hidden')
overlay.classList.toggle('show')
}
}
function newCurtainZIndex (curtain) {
let cur_curtain = ''
if (curtain){
cur_curtain = curtain
} else {
cur_curtain = getOpenCurtain()[0]
}
if (cur_curtain){
cur_curtain.style.zIndex = '101'
}
}
function getNameCurtain () { function getNameCurtain () {
let curtain = getOpenCurtain() let curtain = getOpenCurtain()
let type_curt = getTypeOfData(curtain)
if (type_curt === 'object'){
curtain = curtain[0]
}
let dataset = curtain.dataset let dataset = curtain.dataset
let name = '' let name = ''
if (dataset){ if (dataset){
@@ -747,12 +778,16 @@ function getNameCurtain () {
function getOpenCurtain () { function getOpenCurtain () {
let curtains = document.querySelectorAll(".curtain") let curtains = document.querySelectorAll(".curtain")
let i = 0
let curtain = '' let curtain = ''
if (curtains.length > 1){
curtain = []
}
let i = 0
curtains.forEach(function (){ curtains.forEach(function (){
let el = curtains[i] let el = curtains[i]
if (el.classList.contains('open')){ if (el.classList.contains('open')){
curtain = el curtain.push(el)
} }
i++ i++
}) })
@@ -762,3 +797,8 @@ function getOpenCurtain () {
} }
return curtain return curtain
} }
function getTypeOfData (data) {
let type = typeof data
return type
}

View File

@@ -57,6 +57,7 @@
<div class="wrapper_main"> <div class="wrapper_main">
{% include 'blocks/b_header.html' %} {% include 'blocks/b_header.html' %}
<div class="block_overlay {% if page_type == 'profile' %}show{% else %}hidden n_profile{% endif %}" onclick="open_curtain()"></div>
<div class="cut_width_f_curtain"> <div class="cut_width_f_curtain">
<div class="menu_buttons curtain right {% if page_type == 'profile' %}open{% else %} close{% endif %}" data-name="Меню"> <div class="menu_buttons curtain right {% if page_type == 'profile' %}open{% else %} close{% endif %}" data-name="Меню">
@@ -70,7 +71,7 @@
</div> </div>
</div> </div>
<div class="wrapper_content"> <div class="wrapper_content">
<div class="block_overlay hidden {% if not page_type == 'profile' %}n_profile{% endif %}" onclick="open_curtain()"></div>
{% block content %} {% block content %}
{% endblock %} {% endblock %}