Merge branch 'master' of https://github.com/LQDJudge/online-judge
This commit is contained in:
commit
5e21332911
3 changed files with 10 additions and 80 deletions
|
@ -47,7 +47,6 @@
|
|||
function remove_day_if_today() {
|
||||
$('.message_date').each(function() {
|
||||
sent_date = $(this).html()
|
||||
console.log(sent_date);
|
||||
if (sent_date === "{{today}}") {
|
||||
$(this).hide();
|
||||
}
|
||||
|
@ -124,12 +123,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 +197,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 +261,4 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock body %}
|
||||
{% endblock body %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue