From 8722400e3d9c0d2e602fda74d19ecb95f581e3a4 Mon Sep 17 00:00:00 2001 From: Daniel Wathen Date: Thu, 19 Jan 2023 15:00:56 -0700 Subject: [PATCH] Fixed bug where icon wasn't changing from plus to minus on second table. --- .../Views/Shared/_DailyReportPartial.cshtml | 2 +- ReportingServices.UI/wwwroot/js/site.js | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ReportingServices.UI/Views/Shared/_DailyReportPartial.cshtml b/ReportingServices.UI/Views/Shared/_DailyReportPartial.cshtml index 35a5f39..76cb08f 100644 --- a/ReportingServices.UI/Views/Shared/_DailyReportPartial.cshtml +++ b/ReportingServices.UI/Views/Shared/_DailyReportPartial.cshtml @@ -79,7 +79,7 @@ Actual Yielded Wafers Out     @for (int i = 0; i < 7; i++) diff --git a/ReportingServices.UI/wwwroot/js/site.js b/ReportingServices.UI/wwwroot/js/site.js index 812789a..bd8c6f9 100644 --- a/ReportingServices.UI/wwwroot/js/site.js +++ b/ReportingServices.UI/wwwroot/js/site.js @@ -145,10 +145,14 @@ function expandYield() { yieldDivs[i].classList.toggle("hidden"); } - var source = document.getElementById("yieldIcon"); + var icons = document.getElementsByClassName("yieldIcon"); - source.classList.toggle("fa-plus-circle"); - source.classList.toggle("fa-minus-circle"); + for (let i = 0; i < icons.length; i++) { + icons[i].classList.toggle("fa-plus-circle"); + icons[i].classList.toggle("fa-minus-circle"); + } + + } function toggleWeek() {