Added customui device deselection.
This commit is contained in:
parent
a1cb07670d
commit
71b351add9
|
@ -295,12 +295,8 @@ function CreateMeshRelayEx(parent, ws, req, domain, user, cookie) {
|
|||
}
|
||||
}
|
||||
|
||||
// Check that both sides have websocket connections
|
||||
if ((obj.ws == null) || (relayinfo.peer1.ws == null)) {
|
||||
relayinfo.peer1.close();
|
||||
obj.close();
|
||||
return null;
|
||||
}
|
||||
// Check that both sides have websocket connections, this should never happen.
|
||||
if ((obj.ws == null) || (relayinfo.peer1.ws == null)) { relayinfo.peer1.close(); obj.close(); return null; }
|
||||
|
||||
// Connect to peer
|
||||
obj.peer = relayinfo.peer1;
|
||||
|
|
|
@ -1608,6 +1608,7 @@
|
|||
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.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')) {
|
||||
|
@ -1657,6 +1658,10 @@
|
|||
}
|
||||
}
|
||||
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() {
|
||||
|
@ -14357,7 +14362,6 @@
|
|||
}
|
||||
|
||||
function notificationSelectedEx(n, id) {
|
||||
console.log(n);
|
||||
if (n.nodeid != null) {
|
||||
if (n.tag == 'desktop') gotoDevice(n.nodeid, 12); // Desktop
|
||||
else if (n.tag == 'terminal') gotoDevice(n.nodeid, 11); // Terminal
|
||||
|
|
Loading…
Reference in New Issue