Change column from "Firmware ID" to "TS Name" (#2549)

* replace firmware ID column with TS name

* wrong var cas
This commit is contained in:
David Holdeman 2021-04-13 22:12:25 -05:00 committed by GitHub
parent 2c1922107c
commit 17e8ddb08e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 16 deletions

View File

@ -20,7 +20,7 @@
<template id="table-template">
<tr class="data">
<td class="pin-data"></td>
<td class="id-data"></td>
<td class="ts-data"></td>
<td class="type-data"></td>
<td class="function-data"></td>
<td class="color-data"></td>
@ -38,7 +38,7 @@
<thead>
<tr>
<th class="pin-header">Pin Number</th>
<th class="id-header">Firmware ID</th>
<th class="ts-header">TS Name</th>
<th class="type-header">Type</th>
<th class="function-header">Typical Function</th>
<th class="color-header">Pigtail Color</th>
@ -53,7 +53,7 @@
<thead>
<tr>
<th class="pin-header">Pin Number</th>
<th class="id-header">Firmware ID</th>
<th class="ts-header">TS Name</th>
<th class="type-header">Type</th>
<th class="function-header">Typical Function</th>
<th class="color-header">Pigtail Color</th>

View File

@ -7,13 +7,13 @@ function addRow(table, pin, pdiv) {
var clone = template.content.cloneNode(true);
var row = clone.querySelector(".data");
var pdata = clone.querySelector(".pin-data");
var idata = clone.querySelector(".id-data");
var idata = clone.querySelector(".ts-data");
var tdata = clone.querySelector(".type-data");
var fdata = clone.querySelector(".function-data");
var cdata = clone.querySelector(".color-data");
pdata.textContent = pin.pin;
pdata.dataset.type = pin.type;
idata.textContent = pin.id;
idata.textContent = pin.ts_name;
tdata.textContent = pin.type
fdata.textContent = pin.function;
cdata.textContent = pin.color
@ -25,16 +25,7 @@ function addRow(table, pin, pdiv) {
function clickPin(table, pin, pdiv) {
table.innerHTML = "";
if (Array.isArray(pin.id)) {
var pinIds = pin.id.filter((value, index) => {
return pin.id.indexOf(value) === index;
});
for (var i = 0; i < pinIds.length; i++) {
addRow(table, {pin: pin.pin, id: pinIds[i], function: pin.function, type: pin.type}, pdiv);
}
} else {
addRow(table, pin, pdiv);
}
addRow(table, pin, pdiv);
var pins = document.querySelectorAll(".pin-marker");
for (var i = 0; i < pins.length; i++) {
if (pins[i].dataset.type == pin.type) {

View File

@ -217,7 +217,7 @@ table th {
display: flex;
flex-direction: column;
}
.info-table, .id-data, .id-header, .type-data, .type-header, .color-data, .color-header, thead {
.info-table, .ts-data, .ts-header, .type-data, .type-header, .color-data, .color-header, thead {
display: none;
}
.connector-container {