From 9f497cc95667e2b9c9c73601075c4000ff9b55ac Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Mon, 12 Nov 2018 19:30:09 -0800 Subject: [PATCH] Added more colored hovering --- package.json | 2 +- views/default-min.handlebars | 2 +- views/default.handlebars | 54 ++++++++++++++++++++++++++---------- 3 files changed, 41 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index 58be3beb..c1474cf7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "meshcentral", - "version": "0.2.2-v", + "version": "0.2.2-x", "keywords": [ "Remote Management", "Intel AMT", diff --git a/views/default-min.handlebars b/views/default-min.handlebars index cce64e24..65b8570b 100644 --- a/views/default-min.handlebars +++ b/views/default-min.handlebars @@ -1 +1 @@ - MeshCentral
{{{title}}}
{{{title2}}}

{{{logoutControl}}}

 

\ No newline at end of file + MeshCentral
{{{title}}}
{{{title2}}}

{{{logoutControl}}}

 

\ No newline at end of file diff --git a/views/default.handlebars b/views/default.handlebars index 19e975b7..0a8a2863 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -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 += '
' + name + '
' + nodestate + '
'; } else if (view == 2) { - r += '
'; + r += '
'; r += '
'; r += '
'; r += '
'; @@ -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)?' 🗴':' 🗸'); } if (user.email != null) { username += ', ' + user.email + '' + emailVerified; } - x += ''; + x += ''; x += '
'; x += '
'; x += '
'; @@ -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; }