This commit is contained in:
2023-08-02 15:45:04 +03:00
parent f9b90c2a2a
commit a2b48fcfcb
5 changed files with 64 additions and 11 deletions

View File

@@ -260,7 +260,7 @@
.block-chat{
width: 67%;
height: 100%;
height: 63vh;
border-radius: 10px;
border: 1px solid #E6E6E6;
background: #ffffff;
@@ -272,13 +272,13 @@
.block-list-of-users{
width: 30%;
margin-left: 20px;
height: 100%;
height: 63vh;
border-radius: 10px;
border: 1px solid #E6E6E6;
background: #ffffff;
box-shadow: -1px 4px 10px 0 rgba(198, 199, 203, 0.20), 0 -1px 10px 0 rgba(198, 199, 203, 0.20);
float: right;
overflow-y: auto;
}
.container-header-chat{
@@ -324,7 +324,7 @@
.container-messages{
height: 74%;
width: 100%;
min-height: 376px;
/*min-height: 376px;*/
overflow-y: auto;
}
@@ -571,4 +571,12 @@
.data_send_message.right{
text-align: right;
}
/*right curtain messenger*/
.block_tickets_in_work{
padding-top: 10px;
border-top: 1px solid #E6E6E6;
width: 100%;
}

View File

@@ -142,8 +142,46 @@ function createTicket (el) {
});
}
function selectedUserMessenger (el){
el.classList.toggle("select")
var selected_users = []
function selectedUserMessenger (el,ticket_id){
selected_users.push(el)
let i = 0
selected_users.map(function (){
if (selected_users[i] === el){
el.classList.toggle("select")
}
else {
if (selected_users[i].classList.contains("select")){
selected_users[i].classList.remove("select")
}
}
i++
})
let data = {
'ticket_id': ticket_id
}
$.ajax({
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
url: '/ru/messages/support_show_chat_by_ticket/',
type: "POST",
// async: true,
cache: false,
processData: false,
contentType: false,
// enctype: 'json',
data: JSON.stringify(data),
success: function(data){
document.querySelector(".info_profile").innerHTML = data.html;
},
error: function (data){
document.querySelector(".info_profile").innerHTML = data.responseJSON.html;
}
});
}
function sendMessage(id_ticket,sender,reciever,text){