Fix status page update
This commit is contained in:
parent
83192b540e
commit
69e3303f61
1 changed files with 17 additions and 9 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue