diff --git a/views/default-min.handlebars b/views/default-min.handlebars
index 94f87311..f8dc081b 100644
--- a/views/default-min.handlebars
+++ b/views/default-min.handlebars
@@ -7437,7 +7437,7 @@ var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this
node.lastconnect = message.time;
node.lastaddr = message.addr;
if ((currentNode._id == node._id) && (Q('MainComputerState').innerHTML == '')) {
- QH('MainComputerState', '
');
}
}
break;
@@ -7483,7 +7483,7 @@ var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this
} else {
var x = '
';
- if (currentNode.lastconnect) { x += addHtmlValue2('Last agent connection', new Date(currentNode.lastconnect).toLocaleString()); }
+ if (currentNode.lastconnect) { x += addHtmlValue2('Last agent connection', printDateTime(new Date(currentNode.lastconnect))); }
if (currentNode.lastaddr) {
var splitip = currentNode.lastaddr.split(':');
if (splitip.length > 2) {
@@ -7499,7 +7499,7 @@ var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this
}
}
- x += addHtmlValue2('Last interfaces update', new Date(message.updateTime).toLocaleString());
+ x += addHtmlValue2('Last interfaces update', printDateTime(new Date(message.updateTime)));
for (var i in message.netif) {
var net = message.netif[i];
x += '
'
@@ -7577,7 +7577,7 @@ var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this
var n = Q('d2devNotes');
if (n && (message.id == decodeURIComponent(n.attributes['noteid'].value))) {
if (message.notes) { QH('d2devNotes', decodeURIComponent(message.notes)); } else { QH('d2devNotes', ''); }
- var ro = n.attributes['ro'].value == 'true';
+ var ro = (n.attributes['ro'].value == 'true');
if (ro == false) { // If we have permissions, set read/write on this note.
n.removeAttribute('readonly');
QE('idx_dlgOkButton', true);
@@ -9982,7 +9982,7 @@ var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this
if ((connectivity & 1) != 0) { if (powerstate.length > 0) { powerstate += '
'; } powerstate += '
Agent connected'; }
if ((connectivity & 2) != 0) { if (powerstate.length > 0) { powerstate += '
'; } powerstate += '
Intel® AMT connected'; }
else if ((connectivity & 4) != 0) { if (powerstate.length > 0) { powerstate += '
'; } powerstate += '
Intel® AMT detected'; }
- if ((powerstate == '') && node.lastconnect) { powerstate = '
Last seen:
' + new Date(node.lastconnect).toLocaleDateString() + ', ' + new Date(node.lastconnect).toLocaleTimeString() + ''; }
+ if ((powerstate == '') && node.lastconnect) { powerstate = '
Last seen:
' + printDateTime(new Date(node.lastconnect)) + ''; }
QH('MainComputerState', powerstate);
// Set the node icon
@@ -10166,12 +10166,12 @@ var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this
var te = Math.min(Math.min(end, block[1]), now);
var width = Math.round(((te - ts) * totalWidth) / 86400000);
if (width > 0) {
- var title = powerStateStrings2[block[2]] + ' from ' + new Date(ts).toLocaleTimeString() + ' to ' + new Date(te).toLocaleTimeString() + '.';
+ var title = powerStateStrings2[block[2]] + ' from ' + printTime(new Date(ts)) + ' to ' + printTime(new Date(te)) + '.';
datavalue += '
';
}
}
}
- x += '
' + date.toLocaleDateString() + ' | ' + datavalue + ' |
';
+ x += '
| ' + datavalue + ' |
';
++count;
date = new Date(date.getTime() - (1000 * 60 * 60 * 24)); // Substract one day
}
@@ -11354,7 +11354,7 @@ var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this
// Figure out the date
var fdatestr = '';
- if (f.d != null) { var fdate = new Date(f.d), fdatestr = (fdate.getMonth() + 1) + "/" + (fdate.getDate()) + "/" + fdate.getFullYear() + " " + fdate.toLocaleTimeString() + " "; }
+ if (f.d != null) { var fdate = new Date(f.d), fdatestr = printDateTime(fdate) + " "; }
// Figure out the size
var fsize = '';
@@ -11703,10 +11703,10 @@ var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this
for (var i in currentDeviceEvents) {
var event = currentDeviceEvents[i];
var time = new Date(event.time);
- if (time.toLocaleDateString() != dateHeader) {
+ if (printDate(time) != dateHeader) {
if (dateHeader != null) x += '';
- x += '
' + time.toLocaleDateString() + ' |
';
- dateHeader = time.toLocaleDateString();
+ dateHeader = printDate(time);
+ x += '' + dateHeader + ' |
';
}
var icon = 'si3';
if (event.etype == 'user') icon = 'm2';
@@ -11714,7 +11714,7 @@ var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this
var msg = event.msg.split('(R)').join('®');
//if (event.username && event.username != userinfo.name) { msg += ': ' + event.username; }
- x += ' | | ' + time.toLocaleTimeString() + ' - ' + msg + ' | |
';
+ x += ' | | ' + printTime(time) + ' - ' + msg + ' | |
';
}
if (dateHeader != null) x += '
';
if (x == '') x = "
No Events Found
";
@@ -12699,7 +12699,7 @@ var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this
// Figure out the date
var fdatestr = '';
- if (f.d != null) { var fdate = new Date(f.d), fdatestr = (fdate.getMonth() + 1) + "/" + (fdate.getDate()) + "/" + fdate.getFullYear() + " " + fdate.toLocaleTimeString() + " "; }
+ if (f.d != null) { var fdate = new Date(f.d), fdatestr = printDateTime(fdate) + " "; }
// Figure out the size
var fsize = '';
@@ -12910,10 +12910,10 @@ var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this
for (var i in events) {
var event = events[i], time = new Date(event.time);
if (event.msg) {
- if (time.toLocaleDateString() != dateHeader) {
+ if (printDate(time) != dateHeader) {
if (dateHeader != null) x += '
';
- x += '
' + time.toLocaleDateString() + ' |
';
- dateHeader = time.toLocaleDateString();
+ dateHeader = printDate(time);
+ x += '' + dateHeader + ' |
';
}
var icon = 'si3';
if (event.etype == 'user') icon = 'm2';
@@ -12921,7 +12921,7 @@ var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this
var msg = event.msg.split('(R)').join('®');
if (event.username && event.username != userinfo.name) { msg += ': ' + event.username; }
- x += ' | | ' + time.toLocaleTimeString() + ' - ' + msg + ' | |
';
+ x += ' | | ' + printTime(time) + ' - ' + msg + ' | |
';
}
}
if (dateHeader != null) x += '
';
@@ -13051,17 +13051,21 @@ var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this
}
if (sessions == 1) { lastAccess += '1 session'; } else { lastAccess += sessions + ' sessions'; }
} else {
- if (user.login) { lastAccess += '' + new Date(user.login * 1000).toLocaleDateString() + ''; }
+ if (user.login) { lastAccess += '' + printDate(new Date(user.login * 1000)) + ''; }
}
if (self) { permissions += ""; }
if ((user.siteadmin != null) && ((user.siteadmin & 32) != 0) && (user.siteadmin != 0xFFFFFFFF)) { permissions += "Locked, "; }
permissions += "";
- if ((user.siteadmin == null) || (user.siteadmin == 0) || ((user.siteadmin & (0xFFFFFFFF - 224)) == 0)) {
+
+ var urights = user.siteadmin & (0xFFFFFFFF - 224);
+ if ((user.siteadmin == null) || (urights == 0)) {
permissions += "User";
- } else if (user.siteadmin == 8) {
+ } else if (urights == 8) {
permissions += "User + Files";
} else if (user.siteadmin == 0xFFFFFFFF) {
permissions += "Administrator";
+ } else if ((urights & 2) != 0) {
+ permissions += "Manager";
} else {
permissions += "Partial";
}
@@ -13256,14 +13260,14 @@ var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this
if (xxdialogMode) return;
haltEvent(e);
userid = decodeURIComponent(userid);
- var x = '';
+ var x = '
';
@@ -13287,6 +13291,7 @@ var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this
QE('ua_fileaccess', userinfo.siteadmin == 0xFFFFFFFF);
QE('ua_fileaccessquota', userinfo.siteadmin == 0xFFFFFFFF);
QE('ua_serverupdate', userinfo.siteadmin == 0xFFFFFFFF);
+ QV('d2AdminPermissions', userinfo.siteadmin == 0xFFFFFFFF)
QE('ua_lockedaccount', (userinfo.siteadmin & 2) && (user.siteadmin != 0xFFFFFFFF) && (userinfo._id != user._id));
QE('ua_nonewgroups', (userinfo.siteadmin & 2) && (user.siteadmin != 0xFFFFFFFF) && (userinfo._id != user._id));
QE('ua_nomeshcmd', (userinfo.siteadmin & 2) && (user.siteadmin != 0xFFFFFFFF) && (userinfo._id != user._id));
@@ -13364,10 +13369,10 @@ var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this
}
x += addDeviceAttribute('Server Rights', premsg + "
" + msg.join(', ') + "");
if (user.quota) x += addDeviceAttribute('Server Quota', EscapeHtml(parseInt(user.quota) / 1024) + ' k');
- x += addDeviceAttribute('Creation', new Date(user.creation * 1000).toLocaleString());
- if (user.login) x += addDeviceAttribute('Last Login', new Date(user.login * 1000).toLocaleString());
+ x += addDeviceAttribute('Creation', printDateTime(new Date(user.creation * 1000)));
+ if (user.login) x += addDeviceAttribute('Last Login', printDateTime(new Date(user.login * 1000)));
if (user.passchange == -1) { x += addDeviceAttribute('Password', 'Will be changed on next login.'); }
- else if (user.passchange) { x += addDeviceAttribute('Password', 'Last changed: ' + new Date(user.passchange * 1000).toLocaleString()); }
+ else if (user.passchange) { x += addDeviceAttribute('Password', 'Last changed: ' + printDateTime(new Date(user.passchange * 1000))); }
// Device Groups
var linkCount = 0, linkCountStr = '
None';
@@ -13544,12 +13549,12 @@ var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this
var te = Math.min(Math.min(end, block[1]), now);
var width = Math.round((te - ts) / 112794);
if (width > 0) {
- var title = powerStateStrings2[block[2]] + ' from ' + new Date(ts).toLocaleTimeString() + ' to ' + new Date(te).toLocaleTimeString() + '.';
+ var title = powerStateStrings2[block[2]] + ' from ' + printTime(new Date(ts)) + ' to ' + printTime(new Date(te)) + '.';
datavalue += '';
}
}
}
- x += ' ' + date.toLocaleDateString() + ' | ' + datavalue + ' |
';
+ x += ' | ' + datavalue + ' |
';
++count;
date = new Date(date.getTime() - (1000 * 60 * 60 * 24)); // Substract one day
}
@@ -13566,10 +13571,10 @@ var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this
for (var i in currentUserEvents) {
var event = currentUserEvents[i];
var time = new Date(event.time);
- if (time.toLocaleDateString() != dateHeader) {
+ if (printDate(time) != dateHeader) {
if (dateHeader != null) x += '
';
- x += '
' + time.toLocaleDateString() + ' |
';
- dateHeader = time.toLocaleDateString();
+ dateHeader = printDate(time);
+ x += '' + dateHeader + ' |
';
}
var icon = 'si3';
if (event.etype == 'user') icon = 'm2';
@@ -13580,7 +13585,7 @@ var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this
x += '';
x += ' ';
x += ' ';
- x += ' ' + time.toLocaleTimeString() + ' - ' + msg + ' |
';
+ x += '' + printTime(time) + ' - ' + msg + '
';
}
if (dateHeader != null) x += '
';
if (x == '') x = "
No Events Found
";
@@ -13720,7 +13725,7 @@ var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this
if (node != null) { icon = node.icon; t = '' + node.name + ': ' }
}
- r += '';
+ r += '
';
if (icon) { r += '
'; }
r += '
X
' + t + n.text + '
';
}
@@ -14183,5 +14188,7 @@ var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this
function u2fSupported() { return (window.u2f && ((navigator.userAgent.indexOf('Chrome/') > 0) || (navigator.userAgent.indexOf('Firefox/') > 0) || (navigator.userAgent.indexOf('Opera/') > 0) || (navigator.userAgent.indexOf('Safari/') > 0))); }
function findOne(arr1, arr2) { if ((arr1 == null) || (arr2 == null)) return false; return arr2.some(function (v) { return arr1.indexOf(v) >= 0; }); };
function copyTextToClip(txt) { function selectElementText(e) { if (document.selection) { var range = document.body.createTextRange(); range.moveToElementText(e); range.select(); } else if (window.getSelection) { var range = document.createRange(); range.selectNode(e); window.getSelection().removeAllRanges(); window.getSelection().addRange(range); } } var e = document.createElement('DIV'); e.textContent = txt; document.body.appendChild(e); selectElementText(e); document.execCommand('copy'); e.remove(); }
-
+ function printDate(d) { return d.toLocaleDateString(args.locale); }
+ function printTime(d) { return d.toLocaleTimeString(args.locale); }
+ function printDateTime(d) { return d.toLocaleString(args.locale); }