mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
UI customization improvements.
This commit is contained in:
parent
6bdc57b79a
commit
98b39000eb
11 changed files with 72 additions and 39 deletions
|
@ -3331,7 +3331,13 @@
|
|||
for (var pid in processes) { p.push({ p: parseInt(pid), c: processes[pid].cmd, d: processes[pid].cmd.toLowerCase(), u: processes[pid].user }); }
|
||||
if (deskTools.sort == 0) { p.sort(sortProcessPid); } else if (deskTools.sort == 1) { p.sort(sortProcessName); }
|
||||
var x = '';
|
||||
for (var i in p) { if (p[i].p != 0) { x += '<div class=deskToolsBar><div style=width:50px;float:left;text-align:right;padding-right:5px>' + p[i].p + '</div><a style=float:right;padding-right:5px;cursor:pointer onclick=stopProcess(' + p[i].p + ',"' + p[i].c + '")><img width=10 height=10 src="images/trash.png"></a><div style=float:right;padding-right:5px>' + (p[i].u ? p[i].u : '') + '</div><div>' + p[i].c + '</div></div>'; } }
|
||||
for (var i in p) {
|
||||
if (p[i].p != 0) {
|
||||
var c = p[i].c;
|
||||
if (c.length > 30) { c = '<span title="' + EscapeHtml(c) + '">' + EscapeHtml(c.substring(0, 30)) + '...</span>' } else { c = EscapeHtml(c); }
|
||||
x += '<div class=deskToolsBar><div style=width:50px;float:left;text-align:right;padding-right:5px>' + EscapeHtml(p[i].p) + '</div><a style=float:right;padding-right:5px;cursor:pointer onclick=stopProcess(' + EscapeHtml(p[i].p) + ',"' + EscapeHtml(p[i].c) + '")><img width=10 height=10 src="images/trash.png"></a><div style=float:right;padding-right:5px>' + (p[i].u ? EscapeHtml(p[i].u) : '') + '</div><div>' + c + '</div></div>';
|
||||
}
|
||||
}
|
||||
QH('DeskToolsProcesses', x);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1573,8 +1573,7 @@
|
|||
if (typeof dialog.elements == 'object') {
|
||||
for (var i in dialog.elements) {
|
||||
var elem = dialog.elements[i];
|
||||
if (elem.type == 'text') { t.values[i] = Q('cui:' + i).value; }
|
||||
if (elem.type == 'droplist') { t.values[i] = Q('cui:' + i).value; }
|
||||
if ((elem.type == 'droplist') || (elem.type == 'textarea') || (elem.type == 'text')) { t.values[i] = Q('cui:' + i).value; }
|
||||
}
|
||||
}
|
||||
meshserver.send(t);
|
||||
|
@ -5790,7 +5789,9 @@
|
|||
// Custom UI
|
||||
if ((customui != null) && (customui.devicebuttons != null)) {
|
||||
for (var i in customui.devicebuttons) {
|
||||
x += '<input id="cui:' + i + '" type="button" value="' + customui.devicebuttons[i].name + '" onclick=customUIAction(event,"devicebuttons") />';
|
||||
if ((customui.devicebuttons[i].showif == null) || ((mesh != null) && (customui.devicebuttons[i].showif == mesh._id)) || (customui.devicebuttons[i].showif == currentNode._id)) {
|
||||
x += '<input id="cui:' + i + '" type="button" value="' + customui.devicebuttons[i].name + '" onclick=customUIAction(event,"devicebuttons") />';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue