diff --git a/templates/problem/submit.html b/templates/problem/submit.html index a10c667..70cdb8e 100644 --- a/templates/problem/submit.html +++ b/templates/problem/submit.html @@ -295,7 +295,7 @@
{{ form.judge }} -
{% endif %} diff --git a/templates/submission/status-testcases.html b/templates/submission/status-testcases.html index 22b350a..0af451a 100644 --- a/templates/submission/status-testcases.html +++ b/templates/submission/status-testcases.html @@ -24,13 +24,29 @@ {% else %}

{{ _('Execution Results') }}

{% endif %} -
+ {% for batch in batches %} +
+ {% if batch.id %} + {{ _('Batch ') }}#{{ loop.index }}: + {% endif %} + {% for case in batch.cases %} + + {% if case.status == 'AC' %} + + {% elif case.status != 'SC' %} + + {% endif %} + + {% endfor %} +
+ {% endfor %} +
+ {% if submission.is_graded and submission.result != 'AB' %} -
{{_('Overall: ')}} {% if request.in_contest_mode and submission.contest_or_none %} {% with contest=submission.contest_or_none %} diff --git a/templates/submission/status.html b/templates/submission/status.html index 137cc23..e5fdade 100644 --- a/templates/submission/status.html +++ b/templates/submission/status.html @@ -35,6 +35,12 @@ font-size: 1.54em; margin-bottom: 1em; } + + .case-icons i { + font-size: large; + font-weight: bolder; + cursor: pointer; + } {% endblock %} {% block content_js_media %} @@ -55,9 +61,24 @@ url: '{{ url('submission_testcases_query') }}', data: {id: '{{ submission.id }}'} }).done(function (data) { + data = $(data); + list.find(".open").each(function() { + var id = $(this).attr("id"); + data.find("#" + id).removeClass("closed").addClass("open"); + data.find("#" + id + "-output").show(); + }); list.empty().html(data).find('.toggle').each(function () { register_toggle($(this)); }); + $(".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); + }); + }); setTimeout(function () { blocked = false; if (request) @@ -70,7 +91,6 @@ if ($(window).scrollTop() + $(window).height() > $(document).height() - 100) $("html, body").animate({scrollTop: $(document).height()}, 0); } - register_toggle($('#source-header')); var receiver = new EventReceiver( "{{ EVENT_DAEMON_LOCATION }}", "{{ EVENT_DAEMON_POLL_LOCATION }}",