|
|
|
|
@ -167,7 +167,6 @@ function startChatSession() |
|
|
|
|
|
|
|
|
|
if (item.s == 2) { |
|
|
|
|
// info message
|
|
|
|
|
//$("#chatbox_"+my_user_id+" .chatboxcontent").append('<div class="'+messageLogMe+'"><span class="chatboxinfo">'+item.m+'</span></div>');
|
|
|
|
|
} else { |
|
|
|
|
var chatBubble = createChatBubble(my_user_id, item); |
|
|
|
|
$("#chatbox_"+my_user_id+" .chatboxcontent").append(chatBubble); |
|
|
|
|
@ -310,9 +309,8 @@ function chatHeartbeat() |
|
|
|
|
chatHeartbeatTime = maxChatHeartbeat; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//timer = setTimeout('chatHeartbeat();',chatHeartbeatTime);
|
|
|
|
|
} |
|
|
|
|
}); //ajax
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
@ -424,6 +422,7 @@ function createMyContactsWindow() |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
$("#chatbox_"+user_id+" .chatboxtextarea").focus(); |
|
|
|
|
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -438,14 +437,9 @@ function createMyContactsWindow() |
|
|
|
|
.addClass('chatboxhead') |
|
|
|
|
.append(''); |
|
|
|
|
|
|
|
|
|
/*$('<div>') |
|
|
|
|
.addClass('chatimage') |
|
|
|
|
.append('image?') |
|
|
|
|
.appendTo(chatboxHead);*/ |
|
|
|
|
|
|
|
|
|
$('<div>') |
|
|
|
|
.addClass('chatboxtitle') |
|
|
|
|
.append('My contacts') |
|
|
|
|
.append(chatLang) |
|
|
|
|
.appendTo(chatboxHead); |
|
|
|
|
|
|
|
|
|
var chatboxoptions = $('<div>') |
|
|
|
|
@ -483,13 +477,6 @@ function createMyContactsWindow() |
|
|
|
|
$('<div>').html(data).appendTo(chatboxContent); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
/*$('<textarea>') |
|
|
|
|
.addClass('chatboxtextarea') |
|
|
|
|
.on('keydown', function(e) { |
|
|
|
|
return checkChatBoxInputKey(e.originalEvent, this, user_id); |
|
|
|
|
}) |
|
|
|
|
.appendTo(chatboxInput);*/ |
|
|
|
|
|
|
|
|
|
chatbox |
|
|
|
|
.append(chatboxHead) |
|
|
|
|
.append(chatboxContent) |
|
|
|
|
@ -528,6 +515,7 @@ function createMyContactsWindow() |
|
|
|
|
$("#chatbox_"+user_id+" .chatboxtextarea").focus(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
$("#chatbox_"+user_id).show(); |
|
|
|
|
|
|
|
|
|
$("#chatbox_"+user_id+" .chatboxcontent").scroll(function () { |
|
|
|
|
@ -552,10 +540,11 @@ function createChatBox(user_id, chatboxtitle, minimizeChatBox, online, userImage |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$("#chatbox_"+user_id+" .chatboxtextarea").focus(); |
|
|
|
|
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
user_is_online = return_online_user(user_id, online, userImage); |
|
|
|
|
var user_is_online = return_online_user(user_id, online, userImage); |
|
|
|
|
|
|
|
|
|
var chatbox = $('<div>') |
|
|
|
|
.attr({ |
|
|
|
|
@ -744,7 +733,7 @@ function getMoreItems(userId, scrollType) |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}); //ajax
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
@ -766,6 +755,7 @@ function return_online_user(user_id, status, userImage) |
|
|
|
|
new_div.html(offline_button); |
|
|
|
|
} |
|
|
|
|
div_wrapper.append(new_div); |
|
|
|
|
|
|
|
|
|
return div_wrapper.html(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -876,7 +866,8 @@ function checkChatBoxInputKey(event, chatboxtextarea, user_id) |
|
|
|
|
|
|
|
|
|
intervals[messageId] = setInterval(checkMessageStatus, chatHeartbeatTime, messageId); |
|
|
|
|
} else { |
|
|
|
|
$("#chatbox_" + user_id + " .chatboxcontent").append('<i class="fa fa-exclamation-triangle" aria-hidden="true"></i><br />'); |
|
|
|
|
$("#chatbox_" + user_id + " .chatboxcontent"). |
|
|
|
|
append('<i class="fa fa-exclamation-triangle" aria-hidden="true"></i><br />'); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|