Merge @dr-dolomite 's for-merging branch

-Create new development-v2 branch to work on simpleadmin v2

-Merged @dr-dolomite work from:
2d197220a4

Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
This commit is contained in:
iamromulan
2024-05-03 15:46:25 -04:00
parent 906688f458
commit c9d0e45aa3
32 changed files with 3702 additions and 2053 deletions

View File

@@ -0,0 +1,37 @@
const freqNumbersContainer = document.getElementById(
"freqNumbersContainer"
);
function generateFreqNumberInputs(num) {
let html = "";
const maxFields = Math.min(num, 10); // Limit to a maximum of 10 fields
for (let i = 1; i <= maxFields; i++) {
html += `
<div class="input-group mb-3" x-show="cellNum >= ${i} && networkModeCell == 'LTE'">
<input
type="text"
aria-label="EARFCN"
placeholder="EARFCN"
class="form-control"
x-model="earfcn${i}"
/>
<input
type="text"
aria-label="PCI"
placeholder="PCI"
class="form-control"
x-model="pci${i}"
/>
</div>
`;
}
return html;
}
document.addEventListener("DOMContentLoaded", function () {
const cellNumInput = document.querySelector("[aria-label='NumCells']");
cellNumInput.addEventListener("input", function () {
const cellNum = parseInt(this.value);
freqNumbersContainer.innerHTML = generateFreqNumberInputs(cellNum);
});
});