remove since in chat

v1.18.x
barisusakli 8 years ago
parent fe50c8d124
commit 0da9bf2698

@ -79,7 +79,6 @@ define('forum/chats', [
recentChats.init();
Chats.addSinceHandler(ajaxify.data.roomId, ajaxify.data.uid, $('.expanded-chat .chat-content'), $('.expanded-chat [data-since]'));
Chats.addRenameHandler(ajaxify.data.roomId, $('[component="chat/room/name"]'));
Chats.addScrollHandler(ajaxify.data.roomId, ajaxify.data.uid, $('.chat-content'));
};
@ -158,16 +157,6 @@ define('forum/chats', [
});
};
Chats.addSinceHandler = function(roomId, uid, chatContentEl, sinceEl) {
sinceEl.on('click', function() {
var since = $(this).attr('data-since');
sinceEl.removeClass('selected');
$(this).addClass('selected');
Chats.loadChatSince(roomId, uid, chatContentEl, since);
return false;
});
};
Chats.addRenameHandler = function(roomId, inputEl) {
var oldName = inputEl.val();
inputEl.on('blur keypress', function(ev) {
@ -303,23 +292,6 @@ define('forum/chats', [
ajaxify.go('user/' + ajaxify.data.userslug + '/chats/' + roomid);
};
Chats.loadChatSince = function(roomId, uid, chatContentEl, since) {
if (!roomId) {
return;
}
socket.emit('modules.chats.getMessages', {roomId: roomId, uid: uid, since: since, markRead: true}, function(err, messageData) {
if (err) {
return app.alertError(err.message);
}
if (!messageData) {
return;
}
chatContentEl.find('[component="chat/message"]').remove();
messages.appendChatMessage(chatContentEl, messageData);
});
};
Chats.addGlobalEventListeners = function() {
$(window).on('resize', Chats.resizeMainWindow);
$(window).on('mousemove keypress click', function() {

@ -255,7 +255,6 @@ define('chat', [
messagesEl.css('height', module.calculateChatListHeight(chatModal));
});
Chats.addSinceHandler(chatModal.attr('roomId'), data.uid, chatModal.find('.chat-content'), chatModal.find('[data-since]'));
Chats.addRenameHandler(chatModal.attr('roomId'), chatModal.find('[component="chat/room/name"]'));
Chats.addSendHandlers(chatModal.attr('roomId'), chatModal.find('#chat-message-input'), chatModal.find('#chat-message-send-btn'));
@ -263,8 +262,6 @@ define('chat', [
Chats.createTagsInput(chatModal.find('.users-tag-input'), data);
Chats.createAutoComplete(chatModal.find('[component="chat/input"]'));
Chats.loadChatSince(chatModal.attr('roomId'), data.uid, chatModal.find('.chat-content'), 'recent');
Chats.addScrollHandler(chatModal.attr('roomId'), data.uid, chatModal.find('.chat-content'));
checkStatus(chatModal);

Loading…
Cancel
Save