Skip to content

Commit

Permalink
Merge branch 'master' of github.com:juice-ryang/online-judge
Browse files Browse the repository at this point in the history
  • Loading branch information
minhoryang committed Mar 24, 2016
2 parents fbbbc4c + cab7695 commit d9163b2
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 21 deletions.
52 changes: 34 additions & 18 deletions OnlineJudgeServer/templates/result.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,18 @@
</div>
</script>
<script id="if_finished" type="text/html">
<div class="card card-inverse card-primary text-xs-center">
<div class="card-block">
<h4 class="card-title">
<b>Judging Done</b>
</h4>
<blockquote class="card-blockquote">
{{ problem }} from {{ problemset }}
</blockquote>
<a href="/{{ problemset }}">
<div class="card card-inverse card-primary text-xs-center">
<div class="card-block">
<h4 class="card-title">
<b>Judging Done</b>
</h4>
<blockquote class="card-blockquote">
{{ problem }} from {{ problemset }}
</blockquote>
</div>
</div>
</div>
</a>
</script>
<script id="if_fail" type="text/html">
<div class="card card-inverse card-danger text-xs-center">
Expand Down Expand Up @@ -84,16 +86,18 @@ <h4 class="card-title">
</tbody>
</table>
<!-- TODO PULL THIS OUT! -->
<div class="card card-inverse card-warning text-xs-center">
<div class="card-block">
<h4 class="card-title">
<b>Judging Done</b>
</h4>
<blockquote class="card-blockquote">
{{ problem }} from {{ problemset }}
</blockquote>
<a href="/{{ problemset }}/{{ problem }}">
<div class="card card-inverse card-warning text-xs-center">
<div class="card-block">
<h4 class="card-title">
<b>Judging Done</b>
</h4>
<blockquote class="card-blockquote">
{{ problem }} from {{ problemset }}
</blockquote>
</div>
</div>
</div>
</a>
</script>
{% endblock %}

Expand Down Expand Up @@ -123,6 +127,7 @@ <h4 class="card-title">
message = $($('#if_pass').html());
$('idx', message).replaceWith(idx);
$('#' + idx).replaceWith(message);
scroll_to_bottom();
};

function fail_testcase(idx, expected, output) {
Expand All @@ -141,13 +146,24 @@ <h4 class="card-title">
diffContainer: ".diff"
});
$('#testcase').append(detail);
scroll_to_bottom();
};

function finished(){
message = $($('#if_finished').html());
$('#testcase').append(message);
scroll_to_bottom();
};

function scroll_to_bottom(){
$("body").animate(
{
scrollTop: $(document).height()-$(window).height()
},
"fast"
);
}

var __now_idx = -1;
function conditions(msg){
console.log(msg);
Expand Down
9 changes: 6 additions & 3 deletions problems/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@

def __search__():
from glob import glob
from os.path import isdir, isfile

for s in glob('problems/*'):
if not isdir(s) or isfile(s+'/.jrojignore'):
continue
s = s.split('/')[-1]
# QUICK FIX
if s == '__init__.py' or s == '__pycache__' or s == 'real':
if s == '__pycache__':
continue
psetlist.append(s)
pdict[s] = list()
for p in glob('problems/'+s+'/*'):
for p in glob('problems/' + s + '/*'):
pdict[s].append(p.split('/')[-1])
pdict[s].sort()
psetlist.sort()
Expand Down

0 comments on commit d9163b2

Please sign in to comment.