Added more colored hovering

This commit is contained in:
Ylian Saint-Hilaire 2018-11-12 19:30:09 -08:00
parent f45f4fcbbf
commit 832868c90e
3 changed files with 41 additions and 17 deletions

View File

@ -1,6 +1,6 @@
{
"name": "meshcentral",
"version": "0.2.2-v",
"version": "0.2.2-x",
"keywords": [
"Remote Management",
"Intel AMT",

File diff suppressed because one or more lines are too long

View File

@ -1661,14 +1661,27 @@
// Highlights the device being hovered
function devMouseHover(element, over) {
var e = element.children[1].children[1];
e.children[0].classList.remove('g1s');
e.children[1].classList.remove('e2s');
e.children[2].classList.remove('g2s');
if (over == 1) {
e.children[0].classList.add('g1s');
e.children[1].classList.add('e2s');
e.children[2].classList.add('g2s');
var view = Q('viewselect').value;
if (view == 1) {
var e = element.children[1].children[1];
e.children[0].classList.remove('g1s');
e.children[1].classList.remove('e2s');
e.children[2].classList.remove('g2s');
if (over == 1) {
e.children[0].classList.add('g1s');
e.children[1].classList.add('e2s');
e.children[2].classList.add('g2s');
}
} else if (view == 2) {
var e = element;
e.children[2].classList.remove('g1s');
e.children[4].classList.remove('e2s');
e.children[3].classList.remove('g2s');
if (over == 1) {
e.children[2].classList.add('g1s');
e.children[4].classList.add('e2s');
e.children[3].classList.add('g2s');
}
}
}
@ -1769,7 +1782,7 @@
xw = 301 + Math.floor((realw - (xw * 301)) / xw);
r += '<div id=devs onmouseover=devMouseHover(this,1) onmouseout=devMouseHover(this,0) style=display:inline-block;width:' + xw + 'px;height:50px;padding-top:1px;padding-bottom:1px><div style=width:22px;height:50%;float:left;padding-top:12px><input class="' + nodes[i].meshid + ' DeviceCheckbox" onclick=p1updateInfo() value=devid_' + nodes[i]._id + ' type=checkbox></div><div style=height:100%;cursor:pointer onclick=gotoDevice(\'' + nodes[i]._id + '\')><div class="i' + icon + '" style=width:50px;float:left></div><div style=height:100%><div class=g1></div><div class=e2><div class=e1 style=width:' + (xw - 100) + 'px title="' + title + '">' + name + '</div><div>' + nodestate + '</div></div><div class=g2></div></div></div></div>';
} else if (view == 2) {
r += '<tr><td><div id=devs class=bar18 style=height:18px;width:100%;font-size:medium>';
r += '<tr><td><div id=devs class=bar18 onmouseover=devMouseHover(this,1) onmouseout=devMouseHover(this,0) style=height:18px;width:100%;font-size:medium>';
r += '<div style=width:22px;float:left;background-color:white><input class="' + nodes[i].meshid + ' DeviceCheckbox" onclick=p1updateInfo() value=devid_' + nodes[i]._id + ' type=checkbox></div>';
r += '<div style=float:left;height:18px;width:18px;background-color:white onclick=gotoDevice(\'' + nodes[i]._id + '\')><div class=j' + icon + ' style=width:16px;margin-top:1px;margin-left:2px;height:16px></div></div>';
r += '<div class=g1 style=height:18px;float:left></div><div class=g2 style=height:18px;float:right></div>';
@ -5538,10 +5551,7 @@
e.children[1].classList.remove('g1s');
e.children[2].style['background-color'] = ((over == 0) ? '#c9c9c9' : '#b9b9b9');
e.children[3].classList.remove('g2s');
if (over == 1) {
e.children[1].classList.add('g1s');
e.children[3].classList.add('g2s');
}
if (over == 1) { e.children[1].classList.add('g1s'); e.children[3].classList.add('g2s'); }
}
function events_update() {
@ -5674,7 +5684,7 @@
var username = EscapeHtml(user.name), emailVerified = '';
if (serverinfo.emailcheck == true) { emailVerified = ((user.emailVerified != true)?' <b style=color:red title="Email is not verified">&#x1F5F4</b>':' <b style=color:green title="Email is verified">&#x1F5F8</b>'); }
if (user.email != null) { username += ', <a onclick=doemail(event,\"' + user.email + '\")>' + user.email + '</a>' + emailVerified; }
x += '<tr><td style=cursor:pointer onclick=gotoUser(\"' + encodeURIComponent(user._id) + '\")>';
x += '<tr onmouseover=userMouseHover(this,1) onmouseout=userMouseHover(this,0)><td style=cursor:pointer onclick=gotoUser(\"' + encodeURIComponent(user._id) + '\")>';
x += '<div class=bar style=height:24px;width:100%;font-size:medium>';
x += '<div style=float:left;height:24px;width:24px;background-color:white><div class="' + icon + gray + '" style=width:16px;margin-top:4px;margin-left:2px;height:16px></div></div>';
x += '<div class=g1 style=height:24px;float:left></div><div class=g2 style=height:24px;float:right></div>';
@ -5682,6 +5692,15 @@
return x;
}
// Highlights the user being hovered
function userMouseHover(element, over) {
var e = element.children[0].children[0];
e.children[1].classList.remove('g1s');
e.children[2].classList.remove('g2s');
if (over == 1) { e.children[1].classList.add('g1s'); e.children[2].classList.add('g2s'); }
element.children[0].children[0].style['background-color'] = ((over == 0) ? '#c9c9c9' : '#b9b9b9');
}
function showUserAlertDialog(e, userid) {
if (xxdialogMode) return;
haltEvent(e);
@ -6269,7 +6288,12 @@
if (((b & 8) || x) && f) f(x, t);
}
function center() { QS('dialog').left = ((((getDocWidth() - 400) / 2)) + "px"); deskAdjust(); deskAdjust(); drawDeviceTimeline(); updateDevicesEx(); }
function center() {
QS('dialog').left = ((((getDocWidth() - 400) / 2)) + "px");
if (xxcurrentView == 11) { deskAdjust(); deskAdjust(); }
else if (xxcurrentView == 10) { drawDeviceTimeline(); }
else if (xxcurrentView == 1) { updateDevicesEx(); }
}
function messagebox(t, m) { QH('id_dialogMessage', m); setDialogMode(1, t, 1); }
function statusbox(t, m) { QH('id_dialogMessage', m); setDialogMode(1, t); }
function getDocWidth() { if (window.innerWidth) return window.innerWidth; if (document.documentElement && document.documentElement.clientWidth && document.documentElement.clientWidth != 0) return document.documentElement.clientWidth; return document.getElementsByTagName('body')[0].clientWidth; }