Show place number on race result
All checks were successful
Build Formula10 Docker Image / build-docker (push) Successful in 14s
All checks were successful
Build Formula10 Docker Image / build-docker (push) Successful in 14s
This commit is contained in:
@ -25,13 +25,11 @@ import formula10.controller.error_controller
|
||||
# TODO
|
||||
# General
|
||||
|
||||
# - Show place when entering race result (would require updating the drag'n'drop code...)
|
||||
# - Don't write full 2024 date, just 24 or leave out completely, to make column smaller
|
||||
|
||||
# Statistics
|
||||
# - Rename "Statistics" to "Leaderboard"
|
||||
# - Auto calculate points
|
||||
# - Order user table by points + display points somewhere
|
||||
# - Display points somewhere in race table?
|
||||
# - Highlight currently correct values for some season guesses (e.g. current most dnfs)
|
||||
# - Generate static diagram using chart.js + templating the js (funny yikes)
|
||||
|
||||
|
@ -41,13 +41,15 @@ function handleDrop(e) {
|
||||
// Don't do anything if dropping the same column we're dragging.
|
||||
if (dragSrcEl != this) {
|
||||
// Set the source column's HTML to the HTML of the column we dropped on.
|
||||
//alert(this.outerHTML);
|
||||
//dragSrcEl.innerHTML = this.innerHTML;
|
||||
//this.innerHTML = e.dataTransfer.getData('text/html');
|
||||
// alert(this.outerHTML);
|
||||
// dragSrcEl.innerHTML = this.innerHTML;
|
||||
// this.innerHTML = e.dataTransfer.getData('text/html');
|
||||
|
||||
this.parentNode.removeChild(dragSrcEl);
|
||||
let dropHTML = e.dataTransfer.getData('text/html');
|
||||
this.insertAdjacentHTML('beforebegin', dropHTML);
|
||||
let dropElem = this.previousSibling;
|
||||
|
||||
addDnDHandlers(dropElem);
|
||||
}
|
||||
|
||||
|
@ -52,13 +52,19 @@
|
||||
</h5>
|
||||
|
||||
<form action="/result-enter/{{ model.active_result_race_name_or_current_race_name_sanitized() }}" method="post">
|
||||
<ul id="columns" class="list-group list-group-flush">
|
||||
<ul class="list-group list-group-flush d-inline-block">
|
||||
{% for driver in model.all_drivers_or_active_result_standing_drivers() %}
|
||||
<li class="list-group-item p-1"><span id="place_number" class="fw-bold">P{{ "%02d" % loop.index }}</span>: </li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<ul id="columns" class="list-group list-group-flush d-inline-block float-end">
|
||||
|
||||
{% for driver in model.all_drivers_or_active_result_standing_drivers() %}
|
||||
<li class="list-group-item column p-1" draggable="true">
|
||||
{{ driver.name }}
|
||||
|
||||
<div class="d-inline-block float-end">
|
||||
<div class="d-inline-block float-end" style="margin-left: 30px;">
|
||||
{# Driver DNFed at first #}
|
||||
<div class="form-check form-check-reverse d-inline-block">
|
||||
<input type="checkbox" class="form-check-input" value="{{ driver.name }}"
|
||||
|
Reference in New Issue
Block a user