Module-HTTPD/src/main/resources/httpd/schematic_download.html

34 lines
1.1 KiB
HTML
Raw Normal View History

2022-04-18 03:05:20 +00:00
Schematics
SCHEMATICS
<h2>Plex HTTPD</h2>
<h5>A list of schematics is below. You can click on the schematic name to download it.</h5>
<div class="input-group mb-3 w-75 p-3">
2022-04-18 06:36:45 +00:00
<input type="text" autocomplete="off" autofocus class="form-control" oninput="filterTable(this.value)"
2022-04-18 03:05:20 +00:00
placeholder="Search for a schematic...">
</div>
<table id="schemList" class="table table-striped table-bordered">
<thead>
<tr>
<th scope="col">Name</th>
<th scope="col">Size</th>
</tr>
</thead>
<tbody>
${schematics}
</tbody>
</table>
<script>
let schemList = document.getElementById("schemList").getElementsByTagName("tbody")[0].getElementsByTagName("tr");
2022-04-18 01:02:39 +00:00
2022-04-18 03:05:20 +00:00
function filterTable(query) {
for (let i = 0; i < schemList.length; i++) {
let th = schemList[i].getElementsByTagName("th")[0];
let schemName = th.textContent || th.innerText;
if (schemName.toLowerCase().includes(query.toLowerCase())) {
schemList[i].style.display = "";
} else {
schemList[i].style.display = "none";
2022-04-18 01:00:02 +00:00
}
}
2022-04-18 03:05:20 +00:00
}
</script>