mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-02-12 11:01:52 +00:00
Added customui device deselection.
This commit is contained in:
parent
a1cb07670d
commit
71b351add9
2 changed files with 7 additions and 7 deletions
|
@ -295,12 +295,8 @@ function CreateMeshRelayEx(parent, ws, req, domain, user, cookie) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check that both sides have websocket connections
|
// Check that both sides have websocket connections, this should never happen.
|
||||||
if ((obj.ws == null) || (relayinfo.peer1.ws == null)) {
|
if ((obj.ws == null) || (relayinfo.peer1.ws == null)) { relayinfo.peer1.close(); obj.close(); return null; }
|
||||||
relayinfo.peer1.close();
|
|
||||||
obj.close();
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Connect to peer
|
// Connect to peer
|
||||||
obj.peer = relayinfo.peer1;
|
obj.peer = relayinfo.peer1;
|
||||||
|
|
|
@ -1608,6 +1608,7 @@
|
||||||
if (typeof info.action == 'string') {
|
if (typeof info.action == 'string') {
|
||||||
if (info.action == 'event') { meshserver.send({ action: 'uicustomevent', section: section, element: id.substring(4), selectedDevices: selectedDevices, logmsg: info.logmsg }); }
|
if (info.action == 'event') { meshserver.send({ action: 'uicustomevent', section: section, element: id.substring(4), selectedDevices: selectedDevices, logmsg: info.logmsg }); }
|
||||||
if (info.action.startsWith('dialog:')) { showCustomUiDialog(info.action.substring(7), { section: section, element: id.substring(4), selectedDevices: selectedDevices }); }
|
if (info.action.startsWith('dialog:')) { showCustomUiDialog(info.action.substring(7), { section: section, element: id.substring(4), selectedDevices: selectedDevices }); }
|
||||||
|
if (info.deselectdevices) { for (var i = 0; i < elements.length; i++) { elements[i].checked = false; } checkedNodeids = {}; p1updateInfo(); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((section == 'devicebuttons') || (section == 'desktopbuttons') || (section == 'terminalbuttons') || (section == 'filesbuttons')) {
|
if ((section == 'devicebuttons') || (section == 'desktopbuttons') || (section == 'terminalbuttons') || (section == 'filesbuttons')) {
|
||||||
|
@ -1657,6 +1658,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
meshserver.send(t);
|
meshserver.send(t);
|
||||||
|
if (dialog.deselectdevices) {
|
||||||
|
var elements = document.getElementsByClassName('DeviceCheckbox')
|
||||||
|
for (var i = 0; i < elements.length; i++) { elements[i].checked = false; } checkedNodeids = {}; p1updateInfo();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function adjustPanels() {
|
function adjustPanels() {
|
||||||
|
@ -14357,7 +14362,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function notificationSelectedEx(n, id) {
|
function notificationSelectedEx(n, id) {
|
||||||
console.log(n);
|
|
||||||
if (n.nodeid != null) {
|
if (n.nodeid != null) {
|
||||||
if (n.tag == 'desktop') gotoDevice(n.nodeid, 12); // Desktop
|
if (n.tag == 'desktop') gotoDevice(n.nodeid, 12); // Desktop
|
||||||
else if (n.tag == 'terminal') gotoDevice(n.nodeid, 11); // Terminal
|
else if (n.tag == 'terminal') gotoDevice(n.nodeid, 11); // Terminal
|
||||||
|
|
Loading…
Reference in a new issue