Commit b6afe55f authored by Kento HASEGAWA's avatar Kento HASEGAWA

Don't show the solution viewer when a solution is invalid

parent 8b045708
......@@ -60,8 +60,8 @@ body{
display: inline-block;
}
#solution-list-container tr.solution-detail-row,
#solution-list-container tr.solution-detail-row td{
#solution-list-container tr.solution-detail-row.valid-solution,
#solution-list-container tr.solution-detail-row.valid-solution td{
cursor: pointer;
}
......@@ -90,8 +90,3 @@ body{
height: calc(100vh - 55px);
overflow-y: scroll;
}
#content-right #solution-list-container table>tbody>tr,
#content-right #solution-list-container table>tbody>tr>td{
cursor: pointer;
}
......@@ -34,7 +34,7 @@ class StatusView {
_this.fire('refresh');
});
_this.container.find('.solution-detail-row td').click((e) => {
_this.container.find('.solution-detail-row.valid-solution td').click((e) => {
var solution_id = $(e.target).parent("tr").data("solution-id");
var problem_name = $(e.target).parent("tr").data("problem");
var viewer_url = "/view/solution#" + problem_name + "/" + solution_id;
......
......@@ -22,11 +22,12 @@
</thead>
<tbody>
{% for k, v in problem.get_solutions().items() %}
{% if k == problem.best_solution %}
<tr class="solution-detail-row submit-solution" data-solution-id="{{k}}" data-problem="{{problem.name}}">
{% else %}
<tr class="solution-detail-row" data-solution-id="{{k}}" data-problem="{{problem.name}}">
{% endif %}
{% set tr_class = '' %}
{% set tr_class = tr_class + ' submit-solution' if k == problem.best_solution else '' %}
{% set tr_class = tr_class + ' valid-solution' if v.is_valid_solution() else '' %}
{#% else %#}
<tr class="solution-detail-row {{tr_class}}" data-solution-id="{{k}}" data-problem="{{problem.name}}">
{#% endif %#}
<td>{{v.timestamp_str}}</td>
<td>{{v.worker}}</td>
<td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment