diff --git a/static/app.js b/static/app.js index a138920..357c985 100755 --- a/static/app.js +++ b/static/app.js @@ -3303,3 +3303,17 @@ selectMenu.addEventListener("change", function() { pElement.textContent = selectedValue + " Settings - Changes detected."; pElement2.innerHTML = selectedValue + " Settings -" + "
" + " Saved!"; }); + + +// load selected network item into ssid input +function sendNetworkToSSID(element) { + var networksList = document.getElementById('networks-list'); + var lis = networksList.querySelectorAll("li"); + var ssid_input = document.getElementById('wifi-ssid-input'); + var value = element.innerText; + lis.forEach(function(li) { + li.classList.remove("active"); + }); + ssid_input.value = value; + element.classList.add("active"); +}