This commit is contained in:
2023-08-08 15:49:25 +03:00
parent 6d27151e6c
commit 34fc82ea19
2 changed files with 10 additions and 8 deletions

View File

@@ -76,16 +76,18 @@ function check_new_messages (window,it){
// enctype: 'json',
data: JSON.stringify(data),
success: function(data){
if (data.msgs_count > 1){
if (data.html){
if (data.msgs_count > 1){
document.querySelector(".container-messages").innerHTML = data.html;
} else {
document.querySelector(".info_profile").innerHTML = data.html;
}
if (window === null){
clearTimeout(check_msg)
}
} else {
document.querySelector(".info_profile").innerHTML = data.html;
//
}
if (window === null){
clearTimeout(check_msg)
}
},
error: function (data){

View File

@@ -41,7 +41,7 @@
{# {% endfor %}#}
{# {% endif %}#}
{# </div>#}
<div class="container-messages" data-user-id="{{ user.id }}" data-cur-receiver="{{ cur_receiver.id }}" data-ticket-id='null'>
<div class="container-messages" data-user-id="{{ user.id }}" data-cur-receiver="{{ cur_receiver.id }}" data-ticket-id='{{ ticket.id }}'>
{% include "blocks/profile/b_messages_container.html" %}
</div>