Merge remote-tracking branch 'origin/main'

This commit is contained in:
2023-11-18 18:24:30 +03:00
5 changed files with 48 additions and 24 deletions

View File

@@ -538,14 +538,21 @@
position: absolute;
width: 320px;
}
.menu_buttons.filters{
transition: 200ms;
}
.menu_buttons.left.close.filters{
left: -347px;
transition: 200ms;
position: absolute;
width: 320px;
}
.cut_width_f_curtain.left{
top: 44px;
}
.menu_buttons.left.open.filters{
max-height: 91vh;
top: 0;
}
.block_w_paging.routes {
width: 100%;

View File

@@ -2356,12 +2356,12 @@
max-height: 83vh;
left: 0;
padding: 13px;
transition: 200ms;
/* position: fixed; */
float: left;
text-align: left;
position: absolute;
top: 293px;
transition: 0ms;
}
.support .menu_buttons.left.open{

View File

@@ -53,11 +53,3 @@ function open_chat (user_id){
window.location.replace(href)
}
function scroll_ev (event,el){
let curtain = document.querySelector(".menu_buttons.filters")
if (el.scrollY === 300 || el.scrollY > 300){
curtain.style.top = "0"
} else if (el.scrollY < 300) {
curtain.style.top = "293px"
}
}

View File

@@ -24,6 +24,24 @@ function middleWareJS(){
}
function getTypeOfData (data) {
let type = typeof data
return type
}
function getInfoAboutUser (){
let user_type = ''
if (screen.width <= 700){
user_type = 'mobile'
} else if (screen.width > 1024) {
user_type = 'dectop'
} else if (screen.width > 700 && screen.width < 1024) {
user_type = 'laptop'
}
return user_type
}
document.addEventListener('DOMContentLoaded', function() {
let img = document.getElementById('dropbtn_lang')
if (window.location.href.indexOf("ru") > -1){
@@ -55,3 +73,23 @@ window.addEventListener('scroll', () => {
function scroll_ev (event,el){
let curtain = document.querySelector(".menu_buttons.filters")
let user_type = getInfoAboutUser()
let ch = el.scrollY
let top = 293 - ch + 20
if (user_type !== 'mobile'){
if (el.scrollY === 300){
curtain.style.top = `${top}px`
} else if (el.scrollY < 300) {
curtain.style.top = `${top}px`
} else if (el.scrollY > 300){
top = 15
curtain.style.top = `${top}px`
}
if (el.scrollY === 0){
top = 293 - ch
curtain.style.top = `${top}px`
}
}
}

View File

@@ -73,17 +73,7 @@ function select_tab_profile (el,url,owner_type=null) {
});
}
function getInfoAboutUser (){
let user_type = ''
if (screen.width <= 700){
user_type = 'mobile'
} else if (screen.width > 1024) {
user_type = 'dectop'
} else if (screen.width > 700 && screen.width < 1024) {
user_type = 'laptop'
}
return user_type
}
function createTicketShow () {
$.ajax({
@@ -867,10 +857,7 @@ function getOpenCurtain () {
return curtains
}
function getTypeOfData (data) {
let type = typeof data
return type
}
function getCurtainWIncreaceZindex (curtains,decreace) {
let first = getInfoCurtain(curtains[0],'zIndex')