diff --git a/InteractiveHtmlBom/web/ibom.css b/InteractiveHtmlBom/web/ibom.css index cbd0e38..1bc0d3a 100644 --- a/InteractiveHtmlBom/web/ibom.css +++ b/InteractiveHtmlBom/web/ibom.css @@ -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; diff --git a/InteractiveHtmlBom/web/ibom.html b/InteractiveHtmlBom/web/ibom.html index a6e5a6d..3a71bdc 100644 --- a/InteractiveHtmlBom/web/ibom.html +++ b/InteractiveHtmlBom/web/ibom.html @@ -280,6 +280,7 @@ + diff --git a/InteractiveHtmlBom/web/ibom.js b/InteractiveHtmlBom/web/ibom.js index d88a6f8..3c69b02 100644 --- a/InteractiveHtmlBom/web/ibom.js +++ b/InteractiveHtmlBom/web/ibom.js @@ -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); }