Added select all button in AMT scan dialog.

This commit is contained in:
Ylian Saint-Hilaire 2020-12-04 09:39:53 -08:00
parent b1f9b5569e
commit 1605e1ad7e
3 changed files with 15 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@ -617,13 +617,13 @@ body {
overflow: auto;
}
#idx_dlgCancelButton {
#idx_dlgCancelButton, #idx_dlgCancelButton2 {
float: right;
min-width: 80px;
margin-left: 5px;
}
#idx_dlgOkButton {
#idx_dlgOkButton, #idx_dlgOkButton2 {
float: right;
min-width: 80px;
margin-left: 5px;

View File

@ -2989,6 +2989,7 @@
QH('dp1results', x);
QE('dp1range', true);
QE('dp1rangebutton', true);
QE('d2scanSelectButton', true);
break;
}
case 'notify': {
@ -4134,14 +4135,22 @@
}
x += '<div id=dp1results style="width:100%;height:200px;background-color:white;border:1px gray solid;overflow-y:scroll"></div>';
x += '<input type=hidden id=amtScanMeshId value="' + meshid + '" />';
setDialogMode(2, "Scan for Intel&reg; AMT devices", 3, addAmtScanToMeshEx, x, meshid);
QE('idx_dlgOkButton', false);
x += '<div style="padding:10px;margin-bottom:5px"><input id="idx_dlgCancelButton2" type="button" value="Cancel" style="" onclick="dialogclose(0)" /><input id="idx_dlgOkButton2" type="button" value="OK" style="" onclick="dialogclose(1)" /><div><input id="d2scanSelectButton" type="button" value="Select All" onclick="scanSelectAll()" /></div></div>';
setDialogMode(2, "Scan for Intel&reg; AMT devices", 0, addAmtScanToMeshEx, x, meshid);
QE('idx_dlgOkButton2', false);
QE('d2scanSelectButton', false);
QH('dp1results', '<div style=width:100%;text-align:center;margin-top:12px;color:gray;line-height:1.5>Sample IP range values<br />192.168.0.100<br />192.168.1.0/24<br />192.167.0.1-192.168.0.100</div>');
focusTextBox('dp1range');
addAmtScanToMeshKeyUp();
return false;
}
function scanSelectAll() {
var elements = document.getElementsByClassName('DevScanCheckbox'), checkcount = 0;
for (var i=0;i<elements.length;i++) { elements[i].checked = true; }
addAmtScanToMeshCheckbox();
}
function addAmtScanToMeshKeyUp(e) {
QE('dp1rangebutton', (Q('dp1range').value.split('.').length > 3));
if (e && (e.keyCode == 13)) { haltEvent(e); addAmtScanToMeshButton(); }
@ -4179,7 +4188,7 @@
function addAmtScanToMeshCheckbox() {
var elements = document.getElementsByClassName('DevScanCheckbox'), checkcount = 0;
for (var i=0;i<elements.length;i++) { if (elements[i].checked) checkcount++; }
QE('idx_dlgOkButton', checkcount > 0);
QE('idx_dlgOkButton2', checkcount > 0);
}
// Return true is the input string looks like an email address