don-safe2
This commit is contained in:
@@ -1141,31 +1141,39 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
// Hook up the main DattoRMM checkbox → show/hide its sub-options/password/dropdown
|
||||||
const master = document.getElementById('installDattoRMM');
|
const master = document.getElementById('installDattoRMM');
|
||||||
if (master) master.addEventListener('change', toggleDattoRMMOptions);
|
if (master) {
|
||||||
|
master.addEventListener('change', toggleDattoRMMOptions);
|
||||||
|
}
|
||||||
|
|
||||||
// Fetch sites when the "Enter" key is pressed in the password input field
|
// Fetch sites when the "Enter" key is pressed in the password input field
|
||||||
const passwordField = document.getElementById('Password');
|
const passwordField = document.getElementById('Password');
|
||||||
const goButton = document.querySelector("button[onclick='fetchSites()']");
|
const goButton = document.querySelector("button[onclick='fetchSites()']");
|
||||||
|
|
||||||
|
if (passwordField && goButton) {
|
||||||
passwordField.addEventListener('keydown', (e) => {
|
passwordField.addEventListener('keydown', (e) => {
|
||||||
if (e.key === 'Enter') { // Check if the key pressed is 'Enter'
|
if (e.key === 'Enter') {
|
||||||
goButton.click(); // Trigger the 'Go' button click
|
goButton.click(); // Trigger the 'Go' button click
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Trigger 'Run Selected' button click when 'Enter' is pressed after selecting a site
|
// Trigger 'Run Selected' button click when 'Enter' is pressed after selecting a site
|
||||||
const siteDropdown = document.getElementById('dattoDropdown');
|
const siteDropdown = document.getElementById('dattoDropdown');
|
||||||
const runButton = document.querySelector('.run-button');
|
const runButton = document.querySelector('.run-button');
|
||||||
|
|
||||||
|
if (siteDropdown && runButton) {
|
||||||
siteDropdown.addEventListener('keydown', (e) => {
|
siteDropdown.addEventListener('keydown', (e) => {
|
||||||
if (e.key === 'Enter' && siteDropdown.value) { // Check if the key pressed is 'Enter' and a site is selected
|
if (e.key === 'Enter' && siteDropdown.value) {
|
||||||
runButton.click(); // Trigger the 'Run Selected' button click
|
runButton.click(); // Trigger the 'Run Selected' button click
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// =======================================================================
|
// =======================================================================
|
||||||
// Fetch Sites Handler
|
// Fetch Sites Handler
|
||||||
// =======================================================================
|
// =======================================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user