Fix minor issues in chat
This commit is contained in:
parent
231687e081
commit
a9e7a58e95
2 changed files with 8 additions and 78 deletions
|
@ -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 %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue