Change column from "Firmware ID" to "TS Name" (#2549)
* replace firmware ID column with TS name * wrong var cas
This commit is contained in:
parent
2c1922107c
commit
17e8ddb08e
|
@ -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>
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue