- Get javascript working and password visible icon [SME: 13001] - Fix missing cmd in panel - Delete out of date list of protocols/device/services etc from controller source
62 lines
1.5 KiB
JavaScript
62 lines
1.5 KiB
JavaScript
function showPass() {
|
|
var x = document.getElementById("ddcPass");
|
|
if (x.type === "password") {
|
|
x.type = "text";
|
|
} else {
|
|
x.type = "password";
|
|
}
|
|
}
|
|
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
// Run on page load
|
|
SelectInput_custom();
|
|
|
|
// Attach onchange event to the select element
|
|
var dnsSelect = document.getElementById('dns');
|
|
if (dnsSelect) {
|
|
dnsSelect.addEventListener('change', SelectInput_custom);
|
|
}
|
|
});
|
|
|
|
|
|
function SelectInput_custom() {
|
|
var method = document.querySelector("#dns");
|
|
const types=['custom'];
|
|
types.forEach((type)=>{
|
|
var service = document.querySelector(`.${type}`);
|
|
if (service != null) {
|
|
if (method.value == type) {
|
|
service.style.display = 'block';
|
|
} else {
|
|
service.style.display = 'none';
|
|
}
|
|
}
|
|
})
|
|
}
|
|
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
// Run on page load (replaces onload)
|
|
SelectInput_params();
|
|
|
|
// Attach onchange event (replaces inline onchange)
|
|
var dnsSelect = document.getElementById('retrievemethod');
|
|
if (dnsSelect) {
|
|
dnsSelect.addEventListener('change', SelectInput_params);
|
|
}
|
|
});
|
|
|
|
|
|
function SelectInput_params() {
|
|
var method = document.querySelector("#retrievemethod");
|
|
const types=['smeIF','smeCMD','web','router','if','ip','cmd','custom'];
|
|
types.forEach((type)=>{
|
|
var service = document.querySelector(`.${type}`);
|
|
if (service != null) {
|
|
if (method.value == type) {
|
|
service.style.display = 'block';
|
|
} else {
|
|
service.style.display = 'none';
|
|
}
|
|
}
|
|
})
|
|
} |