mirror of
https://github.com/FAUSheppy/ths-blowerdoor-raven
synced 2025-12-10 00:38:33 +01:00
small improvements
This commit is contained in:
@@ -51,7 +51,7 @@ def load(filename):
|
|||||||
ISO_CAL_KW_LOC = 1
|
ISO_CAL_KW_LOC = 1
|
||||||
kwStartDate = startDateParsed.isocalendar()[ISO_CAL_KW_LOC]
|
kwStartDate = startDateParsed.isocalendar()[ISO_CAL_KW_LOC]
|
||||||
if kw < kwStartDate:
|
if kw < kwStartDate:
|
||||||
blowerdoorDate = "{} KW-{}".format(startDateParsed.year +1, kw)
|
blowerdoorDate = "{} KW-{:02d}".format(startDateParsed.year +1, kw)
|
||||||
else:
|
else:
|
||||||
blowerdoorDate = "{} KW-{}".format(startDateParsed.year, kw)
|
blowerdoorDate = "{} KW-{}".format(startDateParsed.year, kw)
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,15 @@
|
|||||||
<!-- mdb -->
|
<!-- mdb -->
|
||||||
<link href="/static/css/mdb.min.css" rel="stylesheet">
|
<link href="/static/css/mdb.min.css" rel="stylesheet">
|
||||||
<script defer src="/static/js/mdb.min.js"></script>
|
<script defer src="/static/js/mdb.min.js"></script>
|
||||||
|
<script defer src="/static/js/addons/datatables.min.js"></script>
|
||||||
|
|
||||||
<!-- Custom JS/CSS -->
|
<!-- Custom JS/CSS -->
|
||||||
<link href="/static/site.css" rel="stylesheet">
|
<link href="/static/site.css" rel="stylesheet">
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function datesSorter(a, b) {
|
||||||
|
if (new Date(a) < new Date(b)) return 1;
|
||||||
|
if (new Date(a) > new Date(b)) return -1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -11,11 +11,11 @@
|
|||||||
cellspacing="0">
|
cellspacing="0">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="th-sm font-weight-bold">Dokument</th>
|
<th class="th-sm sorting font-weight-bold">Dokument</th>
|
||||||
<th class="th-sm font-weight-bold">Ort</th>
|
<th class="th-sm font-weight-bold">Ort</th>
|
||||||
<th class="th-sm font-weight-bold">Blowerdoor KW</th>
|
<th class="th-sm font-weight-bold">Blowerdoor KW</th>
|
||||||
<th class="th-sm font-weight-bold">Bauherr</th>
|
<th class="th-sm font-weight-bold">Bauherr</th>
|
||||||
<th class="th-sm font-weight-bold">Dokument Erstellungsdatum</th>
|
<th data-sorter="datesSorter" class="th-sm font-weight-bold">Dokument Erstellungsdatum (Jahr/Monat/Tag)</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
<td style="line-height: 45px;">{{ bd.location }}</td>
|
<td style="line-height: 45px;">{{ bd.location }}</td>
|
||||||
<td style="line-height: 45px;">{{ bd.blowerdoorDate }}</td>
|
<td style="line-height: 45px;">{{ bd.blowerdoorDate }}</td>
|
||||||
<td style="line-height: 45px;">{{ bd.customer }}</td>
|
<td style="line-height: 45px;">{{ bd.customer }}</td>
|
||||||
<td style="line-height: 45px;">{{ bd.pdfDate.strftime("%d.%m.%Y") }}</td>
|
<td style="line-height: 45px;">{{ bd.pdfDate.strftime("%Y/%m/%d") }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -33,7 +33,9 @@
|
|||||||
|
|
||||||
<script defer>
|
<script defer>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$('#tableMain').DataTable();
|
$('#tableMain').DataTable({
|
||||||
|
"order" : [[ 3, "desc" ]]
|
||||||
|
});
|
||||||
$('.dataTables_length').addClass('bs-select');
|
$('.dataTables_length').addClass('bs-select');
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user