0.0.107
This commit is contained in:
@@ -139,46 +139,50 @@ function check_new_messages (window,only_sender_mode){
|
||||
|
||||
|
||||
function success_check_new_messages (data) {
|
||||
let window = document.querySelector(".container-messages")
|
||||
if (window === null){
|
||||
clearTimeout(check_msg)
|
||||
} else {
|
||||
if (data.html) {
|
||||
if (data_new_messages['ticket_id'] !== 'null') {
|
||||
if (data !== null) {
|
||||
if (data_new_messages['ticket_id'] && data_new_messages['ticket_id'] !== "null") {
|
||||
if (data.msgs_count > 1) {
|
||||
if (document.querySelector(".container-messages")){
|
||||
if (document.querySelector(".container-messages")) {
|
||||
document.querySelector(".container-messages").innerHTML = data.html;
|
||||
}
|
||||
else if (data.tickets_list_html){
|
||||
if (document.querySelector(".block-list-of-users")) {
|
||||
document.querySelector(".block-list-of-users").innerHTML = data.tickets_list_html
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
document.querySelector(".info_profile").innerHTML = data.html;
|
||||
}
|
||||
} else {
|
||||
if (document.querySelector(".container-messages")) {
|
||||
}
|
||||
|
||||
document.querySelector(".container-messages").innerHTML = data.html;
|
||||
else if (data.chat_html) {
|
||||
if (document.querySelector(".container-messages")) {
|
||||
document.querySelector(".container-messages").innerHTML = data.chat_html;
|
||||
}
|
||||
if (data.users_list_html){
|
||||
if (document.querySelector(".block-list-of-users")) {
|
||||
document.querySelector(".block-list-of-users").innerHTML = data.users_list_html;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (data.users_list_html){
|
||||
if (document.querySelector(".block-list-of-users")) {
|
||||
document.querySelector(".block-list-of-users").innerHTML = data.users_list_html;
|
||||
|
||||
|
||||
if (data.required_beep === true){
|
||||
const beep = new Audio('/static/sounds/beep_2.mp3')
|
||||
beep.play()
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
if (data.required_beep === true){
|
||||
const beep = new Audio('/static/sounds/beep_2.mp3')
|
||||
beep.play()
|
||||
|
||||
}
|
||||
if (data.users_list_html){
|
||||
if (document.querySelector(".block-list-of-users")) {
|
||||
document.querySelector(".block-list-of-users").innerHTML = data.users_list_html
|
||||
}
|
||||
}
|
||||
if (data.tickets_list_html){
|
||||
if (document.querySelector(".block-list-of-users")) {
|
||||
document.querySelector(".block-list-of-users").innerHTML = data.tickets_list_html
|
||||
}
|
||||
}
|
||||
|
||||
// let updatedCookie = encodeURIComponent(name_cookie) + "=" + encodeURIComponent('');
|
||||
// let search_cookie = document.cookie.match("(^|[^;]+)\s*" + name_cookie + "\s*=\s*([^;]+)")[0].substring(1)
|
||||
// let search_cookie = getCookieValue('user_alerts')
|
||||
|
||||
Reference in New Issue
Block a user