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" %}