mirror of
https://github.com/Xevion/trivia.git
synced 2026-01-31 02:26:15 -06:00
fixed scrolling and table column padding/spacing
This commit is contained in:
@@ -14,11 +14,11 @@ let REFRESH_TIMEOUT;
|
|||||||
function ScrollOnce(autoscroll) {
|
function ScrollOnce(autoscroll) {
|
||||||
// If autoscroll has been disabled in between timer, this if statement will prevent it from executing.
|
// If autoscroll has been disabled in between timer, this if statement will prevent it from executing.
|
||||||
if (AUTOSCROLL)
|
if (AUTOSCROLL)
|
||||||
$(".team-row:first").appendTo("tbody")
|
$(".ui-row:first").appendTo("tbody")
|
||||||
|
|
||||||
// Restart autoscroll as needed.
|
// Restart autoscroll as needed.
|
||||||
if (autoscroll && AUTOSCROLL) {
|
if (autoscroll && AUTOSCROLL) {
|
||||||
setTimeout(function () {
|
SCROLL_TIMEOUT = setTimeout(function () {
|
||||||
ScrollOnce(true)
|
ScrollOnce(true)
|
||||||
}, SCROLL_INTERVAL)
|
}, SCROLL_INTERVAL)
|
||||||
}
|
}
|
||||||
@@ -30,9 +30,13 @@ function ToggleAutoscroll() {
|
|||||||
if (AUTOSCROLL) {
|
if (AUTOSCROLL) {
|
||||||
$(".js-scroll-row-start").hide();
|
$(".js-scroll-row-start").hide();
|
||||||
$(".js-scroll-row-stop").show();
|
$(".js-scroll-row-stop").show();
|
||||||
|
|
||||||
|
ScrollOnce(true);
|
||||||
} else {
|
} else {
|
||||||
$(".js-scroll-row-start").show();
|
$(".js-scroll-row-start").show();
|
||||||
$(".js-scroll-row-stop").hide();
|
$(".js-scroll-row-stop").hide();
|
||||||
|
|
||||||
|
clearTimeout(SCROLL_TIMEOUT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ tr[data-row-index="0"] td { border-top: 0.25em solid #000; }
|
|||||||
.center { text-align: center; }
|
.center { text-align: center; }
|
||||||
.pointer { cursor: pointer; }
|
.pointer { cursor: pointer; }
|
||||||
.right { text-align: right; }
|
.right { text-align: right; }
|
||||||
|
.rank-pad { padding-left: 0.3em; padding-right: 0.2em;}
|
||||||
.small-no-wrap { white-space: nowrap; width: 1%; }
|
.small-no-wrap { white-space: nowrap; width: 1%; }
|
||||||
|
|
||||||
.callout { border: 1px solid transparent; margin-bottom: 0.5em; padding: 0.5em; }
|
.callout { border: 1px solid transparent; margin-bottom: 0.5em; padding: 0.5em; }
|
||||||
|
|||||||
@@ -34,11 +34,11 @@
|
|||||||
<table class="table table-hover table-striped">
|
<table class="table table-hover table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Rank</th>
|
<th class="small-no-wrap rank-pad">Rank</th>
|
||||||
<th>ID</th>
|
<th class="small-no-wrap">ID</th>
|
||||||
<th>Team Name</th>
|
<th>Team Name</th>
|
||||||
{% for i in range(scoreCount) %}
|
{% for i in range(scoreCount) %}
|
||||||
<th>{{ i + 1 }}</th>
|
<th class="small-no-wrap">{{ i + 1 }}</th>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|||||||
Reference in New Issue
Block a user