Adding profiles pictures

Adding gitignore
First try for the kart dashboard
This commit is contained in:
bglacial 2019-04-21 01:02:46 +02:00
parent 97e322b0e9
commit d651d0f6b9
25 changed files with 620 additions and 11 deletions

4
.gitignore vendored
View File

@ -1 +1,3 @@
node_modules node_modules
.idea/*
/js/var_conf.js

26
css/timelaps.css Normal file
View File

@ -0,0 +1,26 @@
.driver_img{
max-width: 107px;
}
.glow {
color: white;
-webkit-animation-name: blink;
-webkit-animation-duration: 1s;
-webkit-animation-iteration-count: infinite;
-moz-animation-name: blink;
-moz-animation-duration: 1s;
-moz-animation-iteration-count: infinite;
-ms-animation-name: blink;
-ms-animation-duration: 1s;
-ms-animation-iteration-count: infinite;
-o-animation-name: blink;
-o-animation-duration: 1s;
-o-animation-iteration-count: infinite;
animation-name: blink;
animation-duration: 1s;
animation-iteration-count: infinite;
}

View File

@ -121,7 +121,7 @@
<i class="fa fa-bars"></i> <i class="fa fa-bars"></i>
</button> </button>
<a id="link_all" href="#" class="btn btn-light btn-icon-split btn-sm"> <a id="link_all" onclick="showKartDashboard(null)" href="#" class="btn btn-light btn-icon-split btn-sm">
<span class="icon text-gray-600"> <span class="icon text-gray-600">
<i class="fas fa-car"></i> <i class="fas fa-car"></i>
</span> </span>

BIN
img/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
img/10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
img/11.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
img/12.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
img/13.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
img/14.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
img/15.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
img/16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
img/17.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
img/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
img/3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
img/4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
img/5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
img/6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
img/7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
img/8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
img/9.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -73,7 +73,7 @@
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href=""> <a class="nav-link" href="" onclick="startRace()">
<i class="fas fa-fw fa-flag-checkered"></i> <i class="fas fa-fw fa-flag-checkered"></i>
<span>Start</span></a> <span>Start</span></a>
</li> </li>
@ -118,7 +118,7 @@
<i class="fa fa-bars"></i> <i class="fa fa-bars"></i>
</button> </button>
<a id="link_all" href="#" class="btn btn-light btn-icon-split btn-sm"> <a id="link_all" onclick="showKartDashboard(null)" href="#" class="btn btn-light btn-icon-split btn-sm">
<span class="icon text-gray-600"> <span class="icon text-gray-600">
<i class="fas fa-car"></i> <i class="fas fa-car"></i>
</span> </span>

562
index_kart.html Normal file
View File

@ -0,0 +1,562 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="nriault">
<title>Timelaps - Dashboard</title>
<!-- Custom fonts for this template-->
<link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
rel="stylesheet">
<!-- Custom styles for this template-->
<link href="css/sb-admin-2.min.css" rel="stylesheet">
<link href="css/timelaps.css" rel="stylesheet">
</head>
<body id="page-top">
<!-- Page Wrapper -->
<div id="wrapper">
<!-- Sidebar -->
<ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar">
<!-- Sidebar - Brand -->
<a class="sidebar-brand d-flex align-items-center justify-content-center" href="index.html">
<div class="sidebar-brand-icon rotate-n-15">
<img src="/img/tondeuse.png" width="90px">
</div>
<div class="sidebar-brand-text mx-3">Timelaps <sup>2</sup></div>
</a>
<!-- Divider -->
<hr class="sidebar-divider my-0">
<!-- Nav Item - Dashboard -->
<li class="nav-item active">
<a class="nav-link" href="index.html">
<i class="fas fa-fw fa-tachometer-alt"></i>
<span>Dashboard</span></a>
</li>
<!-- Divider -->
<hr class="sidebar-divider">
<!-- Heading -->
<div class="sidebar-heading">
Conf
</div>
<li class="nav-item">
<a class="nav-link" href="karts.html">
<i class="fas fa-fw fa-car-alt"></i>
<span>Karts</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="drivers.html">
<i class="fas fa-fw fa-user-astronaut"></i>
<span>Drivers</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="params.html">
<i class="fas fa-fw fa-cog"></i>
<span>Params</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="" onclick="startRace()">
<i class="fas fa-fw fa-flag-checkered"></i>
<span>Start</span></a>
</li>
<!-- Divider -->
<hr class="sidebar-divider">
<!-- Heading -->
<div class="sidebar-heading">
Help
</div>
<!-- Nav Item - Tables -->
<li class="nav-item">
<a class="nav-link" href="index_ori.html">
<i class="fas fa-fw fa-table"></i>
<span>Help</span></a>
</li>
<!-- Divider -->
<hr class="sidebar-divider d-none d-md-block">
<!-- Sidebar Toggler (Sidebar) -->
<div class="text-center d-none d-md-inline">
<button class="rounded-circle border-0" id="sidebarToggle"></button>
</div>
</ul>
<!-- End of Sidebar -->
<!-- Content Wrapper -->
<div id="content-wrapper" class="d-flex flex-column">
<!-- Main Content -->
<div id="content">
<!-- Topbar -->
<nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">
<!-- Sidebar Toggle (Topbar) -->
<button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
<i class="fa fa-bars"></i>
</button>
<a id="link_all" onclick="showKartDashboard(null)" href="#" class="btn btn-light btn-icon-split btn-sm">
<span class="icon text-gray-600">
<i class="fas fa-car"></i>
</span>
<span class="text">All</span>
</a>
&nbsp;
<!-- Topbar Navbar -->
<ul class="navbar-nav ml-auto">
<!-- Nav Item - Alerts -->
<li class="nav-item dropdown no-arrow mx-1">
<a class="nav-link dropdown-toggle" href="#" id="alertsDropdown" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fas fa-bell fa-fw"></i>
<!-- Counter - Alerts -->
<span class="badge badge-danger badge-counter">3+</span>
</a>
<!-- Dropdown - Alerts -->
<div class="dropdown-list dropdown-menu dropdown-menu-right shadow animated--grow-in"
aria-labelledby="alertsDropdown">
<h6 class="dropdown-header">
Alerts Center
</h6>
<a class="dropdown-item d-flex align-items-center" href="#">
<div class="mr-3">
<div class="icon-circle bg-primary">
<i class="fas fa-file-alt text-white"></i>
</div>
</div>
<div>
<div class="small text-gray-500">December 12, 2019</div>
<span class="font-weight-bold">A new monthly report is ready to download!</span>
</div>
</a>
<a class="dropdown-item d-flex align-items-center" href="#">
<div class="mr-3">
<div class="icon-circle bg-success">
<i class="fas fa-donate text-white"></i>
</div>
</div>
<div>
<div class="small text-gray-500">December 7, 2019</div>
$290.29 has been deposited into your account!
</div>
</a>
<a class="dropdown-item d-flex align-items-center" href="#">
<div class="mr-3">
<div class="icon-circle bg-warning">
<i class="fas fa-exclamation-triangle text-white"></i>
</div>
</div>
<div>
<div class="small text-gray-500">December 2, 2019</div>
Spending Alert: We've noticed unusually high spending for your account.
</div>
</a>
<a class="dropdown-item text-center small text-gray-500" href="#">Show All Alerts</a>
</div>
</li>
</ul>
</nav>
<!-- End of Topbar -->
<!-- Begin Page Content -->
<div class="container-fluid">
<!-- Page Heading -->
<div class="d-sm-flex align-items-center justify-content-between mb-4">
<h1 class="h3 mb-0 text-gray-800">Dashboard karting :</h1>
</div>
<div class="alert alert-danger" role="alert">
<strong>Attention!</strong> We need to fuel this relay ! Calculated autonomy is overpass by 18028.9
Min !
</div>
<div class="row">
<div class="col-sm">
<div class="card text-center">
<div class="card-header">
Current driver
</div>
<div class="card-body">
<div class="row">
<div class="col-sm-2">
<a class="card-img-top" href="/?name=chgDriver&amp;kartID=2&amp;driverID=11">
<img class="card-img-top driver_img glow" src="img/11.png"
alt="Card image cap">
</a>
<h5 class="card-title">Pich</h5>
<p class="card-text">Total : 15:30:02<br>
<label for="refTime">Temps de ref. :</label>
</p>
<div class="input-group">
<span class="input-group-btn">
<button type="button" class="btn btn-danger btn-number"
onclick="location.href='/?name=chgRefTime&amp;driverID=11&amp;refTime=61';">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"
viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round"
class="feather feather-minus"><line x1="5" y1="12" x2="19"
y2="12"></line></svg>
</button>
</span>
<input type="text" id="refTime" class="form-control" value="62">
<span class="input-group-btn">
<button type="button" class="btn btn-success btn-number"
onclick="location.href='/?name=chgRefTime&amp;driverID=11&amp;refTime=63';">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"
viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round"
class="feather feather-plus"><line x1="12" y1="5" x2="12"
y2="19"></line><line x1="5" y1="12"
x2="19"
y2="12"></line></svg>
</button>
</span>
</div>
</div>
<div class="col-sm">
<div class="progress"
style="height: 30px; align:center; margin-top: 7px;margin-bottom: 15px;">
<div id="progressBarGas" class="progress-bar progress-bar-striped bg-danger"
role="progressbar" style="width: 12945.642857143%;"
aria-valuenow="12945.642857143" aria-valuemin="0" aria-valuemax="100">
<i
class="fas fa-gas-pump"> 14:03:54</i></div>
</div>
<small id="kartNameHelp" class="form-text text-muted">Last fuel at : 10:02:50
(14:03:54).
</small>
<div class="progress"
style="height: 30px; align:center; margin-top: 10px;margin-bottom: 10px;">
<div id="progressBarRelai" class="progress-bar bg-danger" role="progressbar"
style="width: 40083.074074074%;" aria-valuenow="40083.074074074"
aria-valuemin="0" aria-valuemax="100"><i class="fas fa-stopwatch">18037.4
Minutes</i></div>
</div>
<table class="table table-striped table-sm">
<thead>
<tr>
<th>N° Rel.</th>
<th>Temp</th>
<th>Heure</th>
</tr>
</thead>
<tbody>
<tr>
<td> -2L</td>
<td>41:49</td>
<td>12:11:10</td>
</tr>
<tr>
<td> -1L</td>
<td>42:51</td>
<td>12:12:12</td>
</tr>
<tr>
<td>PIT</td>
<td>43:53</td>
<td>12:13:14</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="card-footer text-muted">
<a href="#" class="btn btn-danger btn-icon-split">
<span class="icon text-white-50">
<i class="fas fa-flag"></i>
</span>
<span class="text">End relay and start pit chrono</span>
</a>&nbsp;
<a href="#" class="btn btn-warning btn-icon-split">
<span class="icon text-white-50">
<i class="fas fa-flag"></i>
</span>
<span class="text">Edit current driver</span>
</a>&nbsp;
<a href="#" class="btn btn-secondary btn-icon-split">
<span class="icon text-white-50">
<i class="fas fa-flag"></i>
</span>
<span class="text">Edit relay</span>
</a>
</div>
</div>
</div>
</div>
<br>
<div class="card text-center">
<div class="card-header">
Next drivers
</div>
<div class="card-body">
<div class="row">
<div class="col-xl-2 col-lg-4 col-md-6">
<div class="card" style="width: auto;">
<a class="card-img-top" href="/?name=chgDriver&amp;kartID=2&amp;driverID=7">
<img class="card-img-top " src="img/7.png" alt="Card image cap">
</a>
<div class="card-body">
<h5 class="card-title">Nico</h5>
<p class="card-text">Total : 03:39:36<br>
Tps de repos : 14:05:26<br>
<label for="refTime">Temps de ref. :</label>
</p>
<div class="input-group">
<span class="input-group-btn">
<button type="button" class="btn btn-danger btn-number"
onclick="location.href='/?name=chgRefTime&amp;driverID=7&amp;refTime=59';">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round" class="feather feather-minus"><line x1="5" y1="12" x2="19"
y2="12"></line></svg>
</button>
</span>
<input type="text" id="refTime" class="form-control" value="60">
<span class="input-group-btn">
<button type="button" class="btn btn-success btn-number"
onclick="location.href='/?name=chgRefTime&amp;driverID=7&amp;refTime=61';">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round" class="feather feather-plus"><line x1="12" y1="5" x2="12"
y2="19"></line><line
x1="5" y1="12" x2="19" y2="12"></line></svg>
</button>
</span>
</div>
<p></p>
</div>
</div>
</div>
<div class="col-xl-2 col-lg-4 col-md-6">
<div class="card" style="width: auto;">
<a class="card-img-top" href="/?name=chgDriver&amp;kartID=2&amp;driverID=9">
<img class="card-img-top " src="img/9.png" alt="Card image cap">
</a>
<div class="card-body">
<h5 class="card-title">Phillipe</h5>
<p class="card-text">Total : 02:45:40<br>
Tps de repos : 14:50:03<br>
<label for="refTime">Temps de ref. :</label>
</p>
<div class="input-group">
<span class="input-group-btn">
<button type="button" class="btn btn-danger btn-number"
onclick="location.href='/?name=chgRefTime&amp;driverID=9&amp;refTime=61';">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round" class="feather feather-minus"><line x1="5" y1="12" x2="19"
y2="12"></line></svg>
</button>
</span>
<input type="text" id="refTime" class="form-control" value="62">
<span class="input-group-btn">
<button type="button" class="btn btn-success btn-number"
onclick="location.href='/?name=chgRefTime&amp;driverID=9&amp;refTime=63';">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round" class="feather feather-plus"><line x1="12" y1="5" x2="12"
y2="19"></line><line
x1="5" y1="12" x2="19" y2="12"></line></svg>
</button>
</span>
</div>
<p></p>
</div>
</div>
</div>
<div class="col-xl-2 col-lg-4 col-md-6">
<div class="card" style="width: auto;">
<a class="card-img-top" href="/?name=chgDriver&amp;kartID=2&amp;driverID=10">
<img class="card-img-top " src="img/10.png" alt="Card image cap">
</a>
<div class="card-body">
<h5 class="card-title">Paul</h5>
<p class="card-text">Total : 03:48:44<br>
Tps de repos : 13:20:32<br>
<label for="refTime">Temps de ref. :</label>
</p>
<div class="input-group">
<span class="input-group-btn">
<button type="button" class="btn btn-danger btn-number"
onclick="location.href='/?name=chgRefTime&amp;driverID=10&amp;refTime=60';">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round" class="feather feather-minus"><line x1="5" y1="12" x2="19"
y2="12"></line></svg>
</button>
</span>
<input type="text" id="refTime" class="form-control" value="61">
<span class="input-group-btn">
<button type="button" class="btn btn-success btn-number"
onclick="location.href='/?name=chgRefTime&amp;driverID=10&amp;refTime=62';">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round" class="feather feather-plus"><line x1="12" y1="5" x2="12"
y2="19"></line><line
x1="5" y1="12" x2="19" y2="12"></line></svg>
</button>
</span>
</div>
<p></p>
</div>
</div>
</div>
<div class="col-xl-2 col-lg-4 col-md-6">
<div class="card" style="width: auto;">
<a class="card-img-top" href="/?name=chgDriver&amp;kartID=2&amp;driverID=12">
<img class="card-img-top " src="img/12.png" alt="Card image cap">
</a>
<div class="card-body">
<h5 class="card-title">Benoît</h5>
<p class="card-text">Total : 03:37:02<br>
Tps de repos : 12:38:57<br>
<label for="refTime">Temps de ref. :</label>
</p>
<div class="input-group">
<span class="input-group-btn">
<button type="button" class="btn btn-danger btn-number"
onclick="location.href='/?name=chgRefTime&amp;driverID=12&amp;refTime=59';">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round" class="feather feather-minus"><line x1="5" y1="12" x2="19"
y2="12"></line></svg>
</button>
</span>
<input type="text" id="refTime" class="form-control" value="60">
<span class="input-group-btn">
<button type="button" class="btn btn-success btn-number"
onclick="location.href='/?name=chgRefTime&amp;driverID=12&amp;refTime=61';">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round" class="feather feather-plus"><line x1="12" y1="5" x2="12"
y2="19"></line><line
x1="5" y1="12" x2="19" y2="12"></line></svg>
</button>
</span>
</div>
<p></p>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<div class="card text-center">
<div class="card-body">
<div class="row">
<h2>Relay history<a class="align-items-center text-muted">
</a></h2>
<div class="table-responsive">
<table class="table table-striped table-sm">
<thead>
<tr>
<th>Driver</th>
<th>Start</th>
<th>End</th>
<th>Relay duration</th>
<th>Fuel</th>
<th>Durée prev</th>
<th>Aut.</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- /.container-fluid -->
</div>
<!-- End of Main Content -->
<!-- Footer -->
<footer class="sticky-footer bg-white">
<div class="container my-auto">
<div class="copyright text-center my-auto">
<span>Copyright &copy; Your Website 2019</span>
</div>
</div>
</footer>
<!-- End of Footer -->
</div>
<!-- End of Content Wrapper -->
</div>
<!-- End of Page Wrapper -->
<!-- Scroll to Top Button-->
<a class="scroll-to-top rounded" href="#page-top">
<i class="fas fa-angle-up"></i>
</a>
<!-- Bootstrap core JavaScript-->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Core plugin JavaScript-->
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
<!-- Custom scripts for all pages-->
<script src="js/sb-admin-2.min.js"></script>
<script src="vendor/notify/notify.min.js"></script>
<script src="js/var_conf.js"></script>
<script src="js/timelaps.js"></script>
<!-- Page level plugins -->
<script src="vendor/chart.js/Chart.min.js"></script>
<!-- Page level custom scripts -->
<script>
$(document).ready(function () {
getKartsMenu();
});
</script>
</body>
</html>

View File

@ -1,3 +1,8 @@
timelapsStorage = localStorage;
if(typeof timelapsStorage.current_kart_id === "undefined"){
timelapsStorage.setItem('current_kart_id', null);
}
function getKartsMenu() { function getKartsMenu() {
$.ajax({ $.ajax({
type: 'GET', type: 'GET',
@ -5,9 +10,14 @@ function getKartsMenu() {
url: api_url + 'karts/', url: api_url + 'karts/',
dataType: 'json', dataType: 'json',
success: function (data, status) { success: function (data, status) {
$.each(data, function (index, value) { actual_kart = timelapsStorage.current_kart_id;
$.each(data.reverse(), function (index, value) {
btn_class = 'btn-light';
if(actual_kart == value.id ){
btn_class = 'btn-primary';
}
$('#link_all').after("" + $('#link_all').after("" +
"&nbsp;<a id=\"link_" + value.id + "\" href=\"#\" class=\"btn btn-light btn-icon-split btn-sm\">\n" + "&nbsp;<a id=\"link_" + value.id + "\" href=\"#\" onclick=\"showKartDashboard("+value.id+")\" class=\"btn "+btn_class+" btn-icon-split btn-sm\">\n \n" +
" <span class=\"icon text-gray-600\">\n" + " <span class=\"icon text-gray-600\">\n" +
" <i class=\"fas fa-car\"></i>\n" + " <i class=\"fas fa-car\"></i>\n" +
"</span>\n" + "</span>\n" +
@ -88,10 +98,10 @@ function listKarts() {
url: api_url + 'karts/', url: api_url + 'karts/',
dataType: 'json', dataType: 'json',
success: function (data, status) { success: function (data, status) {
if (tableListKart instanceof $.fn.dataTable.Api) { if ($.fn.DataTable.isDataTable("#dataTable_kart_list")) {
tableListKart.destroy(); $('#dataTable_kart_list').DataTable().destroy();
} }
tableListKart = $('#dataTable_kart_list').DataTable({ $('#dataTable_kart_list').DataTable({
data: data, data: data,
columns: [ columns: [
{ {
@ -389,3 +399,12 @@ function deleteDriver(id, kart_id, row_index) {
}, },
}); });
} }
function startRace() {
}
function showKartDashboard(kart_id) {
timelapsStorage.setItem('current_kart_id', kart_id);
window.location.href='index_kart.html';
}

View File

@ -121,7 +121,7 @@
<i class="fa fa-bars"></i> <i class="fa fa-bars"></i>
</button> </button>
<a id="link_all" href="#" class="btn btn-light btn-icon-split btn-sm"> <a id="link_all" onclick="showKartDashboard(null)" href="#" class="btn btn-light btn-icon-split btn-sm">
<span class="icon text-gray-600"> <span class="icon text-gray-600">
<i class="fas fa-car"></i> <i class="fas fa-car"></i>
</span> </span>

View File

@ -118,7 +118,7 @@
<i class="fa fa-bars"></i> <i class="fa fa-bars"></i>
</button> </button>
<a id="link_all" href="#" class="btn btn-light btn-icon-split btn-sm"> <a id="link_all" onclick="showKartDashboard(null)" href="index_kart.html" onclick="current_kart_id = null" class="btn btn-light btn-icon-split btn-sm">
<span class="icon text-gray-600"> <span class="icon text-gray-600">
<i class="fas fa-car"></i> <i class="fas fa-car"></i>
</span> </span>