Fix minor issues in chat

This commit is contained in:
Luong Doan 2021-06-19 06:09:16 +00:00
parent 231687e081
commit a9e7a58e95
2 changed files with 8 additions and 78 deletions

View file

@ -124,12 +124,14 @@
body: body,
};
$('#chat-input').val('');
$.post("{{ url('post_chat_message') }}", message)
.fail(function(res) {
console.log('Fail to send message');
})
.done(function(res, status) {
$('#chat-input').val('').focus();
$('#chat-input').focus();
})
}
});
@ -196,6 +198,10 @@
})
})
setInterval(function() {
$('#refresh-button').click();
}, 5 * 60 * 1000);
$('#chat-box').scrollTop($('#chat-box')[0].scrollHeight);
remove_day_if_today();
load_dynamic_update({{last_msg}});
@ -256,4 +262,4 @@
</div>
</div>
{% endblock body %}
{% endblock body %}