From f697158de0d1923f3e6e69a98b63300b37db1186 Mon Sep 17 00:00:00 2001 From: PeewX Date: Fri, 13 Nov 2026 12:50:22 +0100 Subject: [PATCH 1/5] feat(web): add quantity multiplier --- InteractiveHtmlBom/web/ibom.css | 17 +++++++++++++---- InteractiveHtmlBom/web/ibom.html | 2 ++ InteractiveHtmlBom/web/ibom.js | 9 ++++++++- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/InteractiveHtmlBom/web/ibom.css b/InteractiveHtmlBom/web/ibom.css index cbd0e38e..edc40e9f 100644 --- a/InteractiveHtmlBom/web/ibom.css +++ b/InteractiveHtmlBom/web/ibom.css @@ -423,19 +423,28 @@ canvas:active { } .filter { - width: calc(60% - 64px); + width: calc(60% - 128px); } .reflookup { - width: calc(40% - 10px); + width: calc(40% - 20px); } -input[type=text]:focus { +.qty-multiplier { + width: 60px; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='M2 2l8 8M10 2l-8 8' stroke='%23888' stroke-width='2'/%3E%3C/svg%3E"); + background-position: 8px center; + padding: 0 4px 0 24px; +} + +input[type=text]:focus, +input[type=number]:focus { background-color: white; border: 1px solid #333; } -.dark input[type=text]:focus { +.dark input[type=text]:focus, +.dark input[type=number]:focus { background-color: #333; border: 1px solid #ccc; } diff --git a/InteractiveHtmlBom/web/ibom.html b/InteractiveHtmlBom/web/ibom.html index a6e5a6d2..aa6b3d3c 100644 --- a/InteractiveHtmlBom/web/ibom.html +++ b/InteractiveHtmlBom/web/ibom.html @@ -297,6 +297,8 @@ oninput="updateRefLookup(this.value)"> +
diff --git a/InteractiveHtmlBom/web/ibom.js b/InteractiveHtmlBom/web/ibom.js index d88a6f86..ce6931ee 100644 --- a/InteractiveHtmlBom/web/ibom.js +++ b/InteractiveHtmlBom/web/ibom.js @@ -14,6 +14,7 @@ var markedFootprints = new Set(); var highlightedFootprints = []; var highlightedNet = null; var lastClicked; +var qtyMultiplier = 1; function dbg(html) { dbgdiv.innerHTML = html; @@ -726,7 +727,7 @@ function populateBomBody(placeholderColumn = null, placeHolderElements = null) { } else if (column === "Quantity" && settings.bommode == "grouped") { // Quantity td = document.createElement("TD"); - td.textContent = references.length; + td.textContent = references.length * qtyMultiplier; tr.appendChild(td); } else { // All the other fields @@ -857,6 +858,12 @@ function updateFilter(input) { populateBomTable(); } +function updateQtyMultiplier(input) { + var value = parseInt(input); + qtyMultiplier = value > 0 ? value : 1; + populateBomTable(); +} + function updateRefLookup(input) { reflookup = input.toLowerCase(); populateBomTable(); From d6bf377263e3fa85f908dbb6b0a3ea5019a042f1 Mon Sep 17 00:00:00 2001 From: PeewX Date: Fri, 13 Nov 2026 13:11:36 +0100 Subject: [PATCH 2/5] fix(web): disable form restore for qty multiplier --- InteractiveHtmlBom/web/ibom.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/InteractiveHtmlBom/web/ibom.html b/InteractiveHtmlBom/web/ibom.html index aa6b3d3c..8a09b109 100644 --- a/InteractiveHtmlBom/web/ibom.html +++ b/InteractiveHtmlBom/web/ibom.html @@ -298,7 +298,8 @@ + autocomplete="off" title="Quantity multiplier (number of boards)" + oninput="updateQtyMultiplier(this.value)">
From 70d12f6fe847b988ecce2c53aa1db163c85ce3b6 Mon Sep 17 00:00:00 2001 From: PeewX Date: Fri, 13 Nov 2026 13:13:07 +0100 Subject: [PATCH 3/5] fix(web): widen qty multiplier input --- InteractiveHtmlBom/web/ibom.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/InteractiveHtmlBom/web/ibom.css b/InteractiveHtmlBom/web/ibom.css index edc40e9f..bd72be03 100644 --- a/InteractiveHtmlBom/web/ibom.css +++ b/InteractiveHtmlBom/web/ibom.css @@ -423,15 +423,15 @@ canvas:active { } .filter { - width: calc(60% - 128px); + width: calc(60% - 104px); } .reflookup { - width: calc(40% - 20px); + width: calc(40% - 60px); } .qty-multiplier { - width: 60px; + width: 80px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='M2 2l8 8M10 2l-8 8' stroke='%23888' stroke-width='2'/%3E%3C/svg%3E"); background-position: 8px center; padding: 0 4px 0 24px; From 38dcedf76cba92ca78b00fd529f81a1603974ad6 Mon Sep 17 00:00:00 2001 From: PeewX Date: Sun, 15 Nov 2026 13:53:07 +0100 Subject: [PATCH 4/5] refactor(web): switch search row to flex layout --- InteractiveHtmlBom/web/ibom.css | 12 ++++++++++-- InteractiveHtmlBom/web/ibom.html | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/InteractiveHtmlBom/web/ibom.css b/InteractiveHtmlBom/web/ibom.css index bd72be03..9c694569 100644 --- a/InteractiveHtmlBom/web/ibom.css +++ b/InteractiveHtmlBom/web/ibom.css @@ -393,6 +393,7 @@ canvas:active { .searchbox { float: left; + min-width: 80px; height: 40px; margin: 10px 5px; padding: 12px 32px; @@ -422,15 +423,22 @@ canvas:active { color: #666; } +.search-row { + display: flex; + flex-wrap: wrap; + width: 100%; +} + .filter { - width: calc(60% - 104px); + flex: 3 1 0; } .reflookup { - width: calc(40% - 60px); + flex: 2 1 0; } .qty-multiplier { + flex: none; width: 80px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='M2 2l8 8M10 2l-8 8' stroke='%23888' stroke-width='2'/%3E%3C/svg%3E"); background-position: 8px center; diff --git a/InteractiveHtmlBom/web/ibom.html b/InteractiveHtmlBom/web/ibom.html index 8a09b109..048fa4b9 100644 --- a/InteractiveHtmlBom/web/ibom.html +++ b/InteractiveHtmlBom/web/ibom.html @@ -292,7 +292,7 @@
-
+
-
+
From 037ac797369912b59d7c1d9e2dda862afe32b51a Mon Sep 17 00:00:00 2001 From: PeewX Date: Sun, 15 Nov 2026 13:53:27 +0100 Subject: [PATCH 5/5] feat(web): hide qty multiplier outside grouped mode --- InteractiveHtmlBom/web/ibom.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/InteractiveHtmlBom/web/ibom.js b/InteractiveHtmlBom/web/ibom.js index ce6931ee..3eadd2c8 100644 --- a/InteractiveHtmlBom/web/ibom.js +++ b/InteractiveHtmlBom/web/ibom.js @@ -1069,6 +1069,8 @@ function changeBomMode(mode) { } } + document.getElementById("qty-multiplier").hidden = mode != "grouped"; + writeStorage("bommode", mode); if (mode != settings.bommode) { settings.bommode = mode;