refactoring
This commit is contained in:
@@ -0,0 +1,61 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>batch codes</title>
|
||||||
|
<!-- FK-TODO: keine externen Links -->
|
||||||
|
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.11.4/css/jquery.dataTables.css">
|
||||||
|
<!-- FK-TODO: keine externen Links -->
|
||||||
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||||
|
<!-- FK-TODO: keine externen Links -->
|
||||||
|
<script type="text/javascript" charset="utf8"
|
||||||
|
src="https://cdn.datatables.net/1.11.4/js/jquery.dataTables.min.js"></script>
|
||||||
|
<script>
|
||||||
|
function capitalizeFirstLetter(str) {
|
||||||
|
return str.charAt(0).toUpperCase() + str.slice(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
const searchParams = new URLSearchParams(window.location.search);
|
||||||
|
const company = searchParams.get('company');
|
||||||
|
const companyName = searchParams.get('companyName');
|
||||||
|
const title = searchParams.get('title');
|
||||||
|
document.title = title;
|
||||||
|
document.querySelectorAll(".title").forEach(element => element.textContent = title);
|
||||||
|
document.querySelectorAll(".companyName").forEach(element => element.textContent = companyName);
|
||||||
|
$("#table").load("src/results/batchCodes/" + company + ".html", function () {
|
||||||
|
$('#batchCodeTable').DataTable({
|
||||||
|
language: {
|
||||||
|
searchPlaceholder: "Enter " + companyName + " Batch Code"
|
||||||
|
},
|
||||||
|
search: {
|
||||||
|
return: false
|
||||||
|
},
|
||||||
|
"order": [[1, "desc"]]
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.dataTables_filter {
|
||||||
|
float: left !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_length {
|
||||||
|
float: right !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<h1 class="title"></h1>
|
||||||
|
<p>
|
||||||
|
<b>Check out your <span class="companyName"></span> batch code </b> <font size="-2">(last updated 29th December
|
||||||
|
2021)</font>
|
||||||
|
<div id="table"></div>
|
||||||
|
</p>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
+6
-6
@@ -11,12 +11,12 @@
|
|||||||
<h1>How Bad is My Batch</h1>
|
<h1>How Bad is My Batch</h1>
|
||||||
<p>
|
<p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="moderna.html">Moderna</a></li>
|
<li><a href="batchCodeTable.html?company=moderna&companyName=Moderna&title=Moderna">Moderna</a></li>
|
||||||
<li><a href="pfizer.html">Pfizer</a></li>
|
<li><a href="batchCodeTable.html?company=pfizer&companyName=Pfizer&title=Pfizer">Pfizer</a></li>
|
||||||
<li><a href="janssen.html">Janssen</a></li>
|
<li><a href="batchCodeTable.html?company=janssen&companyName=Janssen&title=Janssen">Janssen</a></li>
|
||||||
<li><a href="modernaInternational.html">Moderna - Outside of the USA</a></li>
|
<li><a href="batchCodeTable.html?company=modernaInternational&companyName=Moderna&title=Moderna - Outside of the USA">Moderna - Outside of the USA</a></li>
|
||||||
<li><a href="pfizerInternational.html">Pfizer - Outside of the USA</a></li>
|
<li><a href="batchCodeTable.html?company=pfizerInternational&companyName=Pfizer&title=Pfizer - Outside of the USA">Pfizer - Outside of the USA</a></li>
|
||||||
<li><a href="janssenInternational.html">Janssen - Outside of the USA</a></li>
|
<li><a href="batchCodeTable.html?company=janssenInternational&companyName=Janssen&title=Janssen - Outside of the USA">Janssen - Outside of the USA</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</p>
|
</p>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
-11945
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
-63073
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
-42451
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user