Fix status page update

This commit is contained in:
cuom1999 2022-08-22 23:34:22 -05:00
parent 83192b540e
commit 69e3303f61

View file

@ -45,6 +45,22 @@
{% endblock %} {% endblock %}
{% block content_js_media %} {% block content_js_media %}
<script type="text/javascript" src="{{ static('event.js') }}"></script> <script type="text/javascript" src="{{ static('event.js') }}"></script>
<script type="text/javascript">
function setup_icons() {
$(".case-icons i").each(function() {
$(this).on("click", function() {
var id = "tr#" + $(this).attr("id").split("-")[1];
$(id).click();
$([document.documentElement, document.body]).animate({
scrollTop: $(id).offset().top - 50
}, 800);
});
});
}
$(function() {
setup_icons();
});
</script>
{% if not submission.is_graded and last_msg %} {% if not submission.is_graded and last_msg %}
<script type="text/javascript">$(function () { <script type="text/javascript">$(function () {
var blocked = false, request = false; var blocked = false, request = false;
@ -70,15 +86,7 @@
list.empty().html(data).find('.toggle').each(function () { list.empty().html(data).find('.toggle').each(function () {
register_toggle($(this)); register_toggle($(this));
}); });
$(".case-icons i").each(function() { setup_icons();
$(this).on("click", function() {
var id = "tr#" + $(this).attr("id").split("-")[1];
$(id).click();
$([document.documentElement, document.body]).animate({
scrollTop: $(id).offset().top - 50
}, 800);
});
});
setTimeout(function () { setTimeout(function () {
blocked = false; blocked = false;
if (request) if (request)