Commit b6afe55f authored by Kento HASEGAWA's avatar Kento HASEGAWA
Browse files

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

parent 8b045708
Loading
Loading
Loading
Loading
+2 −7
Changes for static/css/adc2019.css: 2 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -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;
}
+1 −1
Changes for static/js/adc2019.js: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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;
+6 −5
Changes for templates/part_problem_status.html: 6 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -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>