Skip to content

Commit

Permalink
And get rid of the browserhack
Browse files Browse the repository at this point in the history
  • Loading branch information
vmcj committed Aug 27, 2023
1 parent f014071 commit 3dc4296
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 35 deletions.
76 changes: 43 additions & 33 deletions webapp/public/style_jury.css
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,45 @@ table.submissions-table {
color: white;
}

.table-full-clickable-cell {
border-collapse: separate; /* Because we need to set display:table for <a> we need to override this again */
border-spacing: 0px 0px;
}

.table-full-clickable-cell tbody tr td:not(.testcase-results) a:not(.btn-sm), .table-full-clickable-cell tbody tr td:not(.testcase-results) a:hover:not(.btn-sm) {
display: table;
}

.table-full-clickable-cell tbody td:not(.testcase-results) a {
width: 100%;
height: 100%;
padding: 1px .25rem;
display: block; /* This is needed to make cells with .showlink fully clickable */
}

.table-full-clickable-cell tbody td:not(.testcase-results) a.btn-sm {
padding: 0.25rem 0.5rem 0.25rem 0.5rem;
}

table.table-full-clickable-cell thead.thead-light tr th.table-button-head-right {
padding-left: 0;
}

table.table-full-clickable-cell thead.thead-light tr th.table-button-head-left {
padding-right: 0.5rem;
}

table.table-full-clickable-cell tr .table-button-head-right-right{
padding-left: 0.5rem;
}

.table-full-clickable-cell tbody td:not(.testcase-results) {
padding: 0;
}


/*
.table-full-clickable-cell tbody td:not(.testcase-results) {
padding: 0;
height: 0;
Expand All @@ -208,7 +247,7 @@ table.submissions-table {
height: 100%;
padding: 1px .25rem;
display: block; /* This is needed to make cells with .showlink fully clickable */
}
/*}
.table-full-clickable-cell tbody td:not(.testcase-results) a.btn-sm {
padding: 0.25rem 0.5rem 0.25rem 0.5rem;
Expand All @@ -228,41 +267,12 @@ table.table-full-clickable-cell tr .table-button-head-right-right{
@-moz-document url-prefix() {
.table-full-clickable-cell {
/*border-collapse: separate;
border-spacing: 0px 0px;
clear: both;
margin: 0;
max-width: none;
box-sizing: border-box;*/
}

.table-full-clickable-cell tbody td:not(.testcase-results) {
height: 100%;
/*margin: 0;
box-sizing: content-box;*/
border-collapse: separate; /* Because we need to set display:table for <a> we need to override this again */
/*border-spacing: 0px 0px;
}
.table-full-clickable-cell tbody tr td:not(.testcase-results) a:not(.btn-sm), .table-full-clickable-cell tbody tr td:not(.testcase-results) a:hover:not(.btn-sm) {
height: 100%;
width: 100%;
margin: 0;
/* inline-table -> Might work */
/* list-item -> Might work */
/* none -> changes a lot, but nothing is shown */
/* table -> all padding is lost */
/* table-caption -> height is lost (same as inline-table?)*/
/* table-footer-group -> width+height is lost */
display: table;
/*border: 1px solid transparent;
border-left: .25rem solid transparent;
border-right: .25rem solid transparent;*/
/*padding: 0;*/ /* On submissions page we can't use the padding, but in /contests it does work? */
}

.table-full-clickable-cell tbody td:not(.testcase-results) a {
background-color: limegreen;
}
.table-full-clickable-cell tbody td:not(.testcase-results) {
background-color: lightblue;
}
}
*/
3 changes: 1 addition & 2 deletions webapp/templates/jury/partials/submission_list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
{% endif %}
</div>

<table class="data-table table table-hover table-full-clickable-cell table{% if showExternalResult and showExternalTestcases %}-3{% endif %}-striped table-sm submissions-table dataTable">
<table class="data-table table table-hover table{% if showExternalResult and showExternalTestcases %}-3{% endif %}-striped table-sm submissions-table table-full-clickable-cell">
<thead class="thead-light">
<tr>
{% if showExternalResult and showExternalTestcases %}
Expand Down Expand Up @@ -282,7 +282,6 @@

</tbody>
</table>
</div></div></div></div>
<table class="data-table table table-hover table{% if showExternalResult and showExternalTestcases %}-3{% endif %}-striped table-sm submissions-table">
<thead class="thead-light">
<tr>
Expand Down

0 comments on commit 3dc4296

Please sign in to comment.