Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions InteractiveHtmlBom/web/ibom.css
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,15 @@ mark.highlight {
border-top: 1px solid #ccc;
}

.menu-warning {
margin: 5px 5px 0 5px;
color: #c00;
}

.dark .menu-warning {
color: #f66;
}

.menu-textbox {
float: left;
height: 24px;
Expand Down
1 change: 1 addition & 0 deletions InteractiveHtmlBom/web/ibom.html
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@
<button class="savebtn" onclick="saveBomTable('csv')">csv</button>
<button class="savebtn" onclick="saveBomTable('txt')">txt</button>
</div>
<div id="bom-filter-warning" class="menu-warning" style="display: none"></div>
</div>
</div>
</div>
Expand Down
20 changes: 20 additions & 0 deletions InteractiveHtmlBom/web/ibom.js
Original file line number Diff line number Diff line change
Expand Up @@ -821,9 +821,29 @@ function highlightNextRow() {
smoothScrollToRow(currentHighlightedRowId);
}

function updateBomFilterWarning() {
var reasons = [];
var front = settings.canvaslayout == "F";
// Only warn about the side when the other side has components
if (settings.bommode != "netlist" && settings.canvaslayout != "FB" &&
pcbdata.bom[front ? "B" : "F"].length > 0) {
reasons.push(front ? "front side only" : "back side only");
}
if (filter) {
reasons.push("filter");
}
if (reflookup && settings.bommode != "netlist") {
reasons.push("ref lookup");
}
var warning = document.getElementById("bom-filter-warning");
warning.textContent = "Table is filtered (" + reasons.join(", ") + "), saved file will not contain all rows";
warning.style.display = reasons.length ? "" : "none";
}

function populateBomTable() {
populateBomHeader();
populateBomBody();
updateBomFilterWarning();
setBomHandlers();
resizableGrid(bomhead);
}
Expand Down