From 34fc82ea1923923d6e59db3cb457e5a5759f883b Mon Sep 17 00:00:00 2001 From: borissedw Date: Tue, 8 Aug 2023 15:49:25 +0300 Subject: [PATCH] 0.0.72 --- static/js/check_new_messages.js | 16 +++++++++------- templates/blocks/profile/b_support_chat.html | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/static/js/check_new_messages.js b/static/js/check_new_messages.js index 40ee3c3..ce26ac2 100644 --- a/static/js/check_new_messages.js +++ b/static/js/check_new_messages.js @@ -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){ diff --git a/templates/blocks/profile/b_support_chat.html b/templates/blocks/profile/b_support_chat.html index ad66295..97842f1 100644 --- a/templates/blocks/profile/b_support_chat.html +++ b/templates/blocks/profile/b_support_chat.html @@ -41,7 +41,7 @@ {# {% endfor %}#} {# {% endif %}#} {# #} -
+
{% include "blocks/profile/b_messages_container.html" %}