Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -1695,10 +1695,14 @@
|
|||||||
}
|
}
|
||||||
@media (max-width: 699px){
|
@media (max-width: 699px){
|
||||||
.block-chat.support {
|
.block-chat.support {
|
||||||
height: calc(100vh - 190px);
|
/*height: calc(100vh - 190px);*/
|
||||||
|
/*1. 100svh 2. 45px - header 3. name_ticket 4. just padding */
|
||||||
|
height: calc(100svh - 45px - 40px - 50px);
|
||||||
}
|
}
|
||||||
.block-chat{
|
.block-chat{
|
||||||
height: calc(88vh - 50px);
|
/*height: calc(88vh - 50px);*/
|
||||||
|
/*1. 100svh 2. 45px - header 3. just padding */
|
||||||
|
height: calc(100svh - 45px - 50px);
|
||||||
}
|
}
|
||||||
.block_overlay.show{
|
.block_overlay.show{
|
||||||
display: block;
|
display: block;
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ window.onload = function (){
|
|||||||
middleWareJS()
|
middleWareJS()
|
||||||
openOrCloseCurtainSupportChat()
|
openOrCloseCurtainSupportChat()
|
||||||
openOverlayOrClose()
|
openOverlayOrClose()
|
||||||
|
goToChatIfChat()
|
||||||
// let body = document.querySelector("body")
|
// let body = document.querySelector("body")
|
||||||
// const viewPortH = body.getBoundingClientRect().height;
|
// const viewPortH = body.getBoundingClientRect().height;
|
||||||
// const windowH = window.innerHeight;
|
// const windowH = window.innerHeight;
|
||||||
@@ -43,6 +44,20 @@ window.onload = function (){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
function goToChatIfChat () {
|
||||||
|
if (document.querySelector('.block-chat')){
|
||||||
|
let scroll_el = document.querySelector('.block-chat')
|
||||||
|
if (document.querySelector(".name_ticket")){
|
||||||
|
scroll_el = document.querySelector(".name_ticket")
|
||||||
|
}
|
||||||
|
let top = scroll_el.offsetTop
|
||||||
|
window.scrollTo({top:top})
|
||||||
|
}
|
||||||
|
document.addEventListener('focusout', function(e,scroll_el) {
|
||||||
|
window.scrollTo(scroll_el, 0)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function middleWareJS(){
|
function middleWareJS(){
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ function select_tab_profile (el,url,owner_type=null) {
|
|||||||
}
|
}
|
||||||
deleteMarkerMessages(el)
|
deleteMarkerMessages(el)
|
||||||
checkStatesAfterTransitionToAnotherTabProfile()
|
checkStatesAfterTransitionToAnotherTabProfile()
|
||||||
|
goToChatIfChat()
|
||||||
},
|
},
|
||||||
error: function (data){
|
error: function (data){
|
||||||
console.log(data)
|
console.log(data)
|
||||||
@@ -555,7 +556,7 @@ function selectedUserMessenger (ticket_id=null,user_id=null,el){
|
|||||||
// let left_curtain = document.querySelector('.curtain.left')
|
// let left_curtain = document.querySelector('.curtain.left')
|
||||||
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()
|
||||||
|
goToChatIfChat()
|
||||||
// document.querySelector(".tab_user_messanger.select").scrollIntoView({behavior: "smooth",block:'center',inline: 'start'});
|
// document.querySelector(".tab_user_messanger.select").scrollIntoView({behavior: "smooth",block:'center',inline: 'start'});
|
||||||
|
|
||||||
if (document.querySelector(".menu_buttons.curtain.left.open")){
|
if (document.querySelector(".menu_buttons.curtain.left.open")){
|
||||||
@@ -598,6 +599,9 @@ function selectedUserMessenger (ticket_id=null,user_id=null,el){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function checkStateAfterChooseContact () {
|
function checkStateAfterChooseContact () {
|
||||||
if (document.querySelector('.menu_buttons.curtain.left.open')){
|
if (document.querySelector('.menu_buttons.curtain.left.open')){
|
||||||
open_curtain_w_contacts()
|
open_curtain_w_contacts()
|
||||||
|
|||||||
@@ -85,7 +85,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="footer-chat{% if not new_msg_allow %} hide{% endif %}">
|
<div class="footer-chat{% if not new_msg_allow %} hide{% endif %}">
|
||||||
|
|
||||||
<div class="left-part-block-enter-message">
|
<div class="left-part-block-enter-message">
|
||||||
<input class="enter-message-inp" onfocus="check_new_messages_timeout()" onkeypress="sendMessageEnter(event,{{ ticket.id }},{{ user.id }},{{ cur_receiver.id }})" placeholder="{{ p_send_msg }}">
|
<input class="enter-message-inp" onfocus="check_new_messages_timeout()" onkeypress="sendMessageEnter(event,{{ ticket.id }},{{ user.id }},{{ cur_receiver.id }})" placeholder="{{ p_send_msg }}">
|
||||||
|
|||||||
Reference in New Issue
Block a user