diff --git a/views/default-fr.handlebars b/views/default-fr.handlebars deleted file mode 100644 index a8656d64..00000000 --- a/views/default-fr.handlebars +++ /dev/null @@ -1,9282 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{{title}}} - - - - - - - -
- -
-
{{{title}}}
-
{{{title2}}}
-
- -
-

{{{logoutControl}}}

-
-
-
-
-
-
-
-
-
-
-
-
- - - -
-
-
-
-
- ♦ - -
- - - - - - - - - - - - - - - -
- - -
 
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - -
-
- - - -
-
- -
- - - - \ No newline at end of file diff --git a/views/default-mobile.handlebars b/views/default-mobile.handlebars index 8d5582b6..73b9809a 100644 --- a/views/default-mobile.handlebars +++ b/views/default-mobile.handlebars @@ -1172,7 +1172,7 @@ function account_showVerifyEmail() { if (xxdialogMode || (userinfo.emailVerified == true) || (serverinfo.emailcheck != true)) return; - var x = "Click ok to send a verification mail to:
" + EscapeHtml(userinfo.email) + "
Please wait a few minute to receive the verification."; + var x = "Click ok to send a verification mail to:" + '
' + EscapeHtml(userinfo.email) + "
Please wait a few minute to receive the verification."; setDialogMode(2, "Email Verification", 3, account_showVerifyEmailEx, x); } @@ -1182,7 +1182,7 @@ function account_showChangeEmail() { if (xxdialogMode) return; - var x = addHtmlValue('Email', ''); + var x = addHtmlValue("Email", ''); setDialogMode(2, "Email Address Change", 3, account_changeEmail, x); if (userinfo.email != null) { Q('dp3email').value = userinfo.email; } account_validateEmail(); @@ -1887,15 +1887,15 @@ } // Attribute: Description - var description = node.desc ? EscapeHtml(node.desc) : "None"; + var description = node.desc ? EscapeHtml(node.desc) : '' + "None" + ''; if ((meshrights & 4) != 0) { x += addDeviceAttribute('Description', '' + description + ''); } else { - x += addDeviceAttribute('Description', description); + x += addDeviceAttribute("Description", description); } // Attribute: Mesh Agent - var agentsStr = ['Unknown', 'Windows 32bit console', 'Windows 64bit console', 'Windows 32bit service', 'Windows 64bit service', 'Linux 32bit', 'Linux 64bit', 'MIPS', 'XENx86', 'Android ARM', 'Linux ARM', 'MacOS 32bit', 'Android x86', 'PogoPlug ARM', 'Android APK', 'Linux Poky x86-32bit', 'MacOS 64bit', 'ChromeOS', 'Linux Poky x86-64bit', 'Linux NoKVM x86-32bit', 'Linux NoKVM x86-64bit', 'Windows MinCore console', 'Windows MinCore service', 'NodeJS', 'ARM-Linaro', 'ARMv6l / ARMv7l', 'ARMv8 64bit', 'ARMv6l / ARMv7l / NoKVM', 'Unknown', 'Unknown', 'FreeBSD x86-64']; + var agentsStr = ["Unknown", "Windows 32bit console", "Windows 64bit console", 'Windows 32bit service', 'Windows 64bit service', 'Linux 32bit', 'Linux 64bit', 'MIPS', 'XENx86', 'Android ARM', 'Linux ARM', 'MacOS 32bit', 'Android x86', 'PogoPlug ARM', 'Android APK', 'Linux Poky x86-32bit', 'MacOS 64bit', 'ChromeOS', 'Linux Poky x86-64bit', 'Linux NoKVM x86-32bit', 'Linux NoKVM x86-64bit', 'Windows MinCore console', 'Windows MinCore service', 'NodeJS', 'ARM-Linaro', 'ARMv6l / ARMv7l', 'ARMv8 64bit', 'ARMv6l / ARMv7l / NoKVM', 'Unknown', 'Unknown', 'FreeBSD x86-64']; if ((node.agent != null) && (node.agent.id != null) && (node.agent.ver != null)) { var str = ''; if (node.agent.id <= agentsStr.length) { str = agentsStr[node.agent.id]; } else { str = agentsStr[0]; } diff --git a/views/default.handlebars b/views/default.handlebars index b8b4dbd7..fd145d84 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -1784,12 +1784,12 @@ } case 'otpauth-setup': { if (xxdialogMode) return; - setDialogMode(2, "Authenticator App", 1, null, message.success ? "Authenticator app activation successful. You will now need a valid token to login again." : "2-step login activation failed. Clear the secret from the application and try again. You only have a few minutes to enter the proper code."); + setDialogMode(2, "Authenticator App", 1, null, message.success ? ('' + "Authenticator app activation successful." + ' ' + "You will now need a valid token to login again.") : ('' + "2-step login activation failed." + ' ' + "Clear the secret from the application and try again. You only have a few minutes to enter the proper code.")); break; } case 'otpauth-clear': { if (xxdialogMode) return; - setDialogMode(2, "Authenticator App", 1, null, message.success ? "Authenticator application removed. You can reactivate this feature at any time." : "2-step login activation removal failed. Try again."); + setDialogMode(2, "Authenticator App", 1, null, message.success ? ('' + "Authenticator application removed." + ' ' + "You can reactivate this feature at any time.") : ('' + "2-step login activation removal failed." + ' ' + "Try again.")); break; } case 'otpauth-getpasswords': { @@ -2556,7 +2556,7 @@ else if (sort == 2) { if (showRealNames == true) { nodes.sort(deviceHostSort); } else { nodes.sort(deviceSort); } } // Save the list of currently checked nodeid's - var checkedNodeids = [], elements = document.getElementsByClassName("DeviceCheckbox"), checkcount = 0; + var checkedNodeids = [], elements = document.getElementsByClassName('DeviceCheckbox'), checkcount = 0; for (var i=0;iState'; + r += '
' + "User" + '' + "Address" + '' + "Connectivity"; //State'; } // Go thru the list of nodes and display them @@ -2615,11 +2615,11 @@ count++; var title = EscapeHtml(node.name); - if (title.length == 0) { title = 'None'; } - if ((node.rname != null) && (node.rname.length > 0)) { title += " / " + EscapeHtml(node.rname); } + if (title.length == 0) { title = '' + "None" + ''; } + if ((node.rname != null) && (node.rname.length > 0)) { title += ' / ' + EscapeHtml(node.rname); } var name = EscapeHtml(node.name); if (showRealNames == true && node.rname != null) name = EscapeHtml(node.rname); - if (name.length == 0) { name = 'None'; } + if (name.length == 0) { name = '' + "None" + ''; } // Node var icon = node.icon; @@ -2629,11 +2629,11 @@ } else if (view == 2) { var states = []; if (node.conn) { - if ((node.conn & 1) != 0) { states.push('Agent'); } - if ((node.conn & 2) != 0) { states.push('CIRA'); } - else if ((node.conn & 4) != 0) { states.push('AMT'); } - if ((node.conn & 8) != 0) { states.push('Relay'); } - if ((node.conn & 16) != 0) { states.push('MQTT'); } + if ((node.conn & 1) != 0) { states.push('' + "Agent" + ''); } + if ((node.conn & 2) != 0) { states.push('' + "CIRA" + ''); } + else if ((node.conn & 4) != 0) { states.push('' + "AMT" + ''); } + if ((node.conn & 8) != 0) { states.push('' + "Relay" + ''); } + if ((node.conn & 16) != 0) { states.push('' + "MQTT" + ''); } } r += '
'; r += '
'; @@ -2650,7 +2650,7 @@ r += '
'; //r += ''; r += '
 ' + name + '
'; - r += '
Disconnected
'; + r += '
' + "Disconnected" + '
'; r += '
'; kvmDivs.push(node._id); } @@ -2679,7 +2679,7 @@ // If displaying devices by groups, sort the group names and display the devices. if (sort == 3) { - if (view == 2) { r = '
UserAddressConnectivity'; } + if (view == 2) { r = ''; if (mesh.mtype == 1) { - r += ''; current = mesh._id; @@ -2736,11 +2736,11 @@ // Add a "Add Device Group" option r += '
'; if ((view < 3) && (sort == 0) && (meshcount > 0) && ((userinfo.siteadmin == 0xFFFFFFFF) || ((userinfo.siteadmin & 64) == 0))) { - r += 'Add Device Group '; + r += '' + "Add Device Group" + ' '; } if ((userinfo.siteadmin == 0xFFFFFFFF) || ((userinfo.siteadmin & 128) == 0)) { - r += 'MeshCmd '; - if (navigator.platform.toLowerCase() == 'win32') { r += 'Router '; } + r += '' + "MeshCmd" + ' '; + if (navigator.platform.toLowerCase() == 'win32') { r += '' + "Router" + ' '; } } r += '

'; @@ -2748,7 +2748,7 @@ deviceHeaderSet(); // Re-check nodeid's - var elements = document.getElementsByClassName("DeviceCheckbox"), checkcount = 0; + var elements = document.getElementsByClassName('DeviceCheckbox'), checkcount = 0; if (checkedNodeids) { for (var i=0;i= 0); } } for (var i in deviceHeaders) { QH(i, deviceHeaders[i]); } @@ -2773,7 +2773,7 @@ desk.m.CanvasId.setAttribute('style', 'background-color:black;width:' + vsize.x + 'px;height:' + vsize.y + 'px'); Q('xkvmid_' + shortid).appendChild(desk.m.CanvasId); delete desk.xxdelete; - QH('skvmid_' + shortid, ['Disconnected', 'Connecting...', 'Setup...', '', ''][((desk.m.State == null)?desk.m.state:desk.m.State)]); + QH('skvmid_' + shortid, ["Disconnected", "Connecting...", "Setup...", '', ''][((desk.m.State == null)?desk.m.state:desk.m.State)]); } else { var node = getNodeFromId(id); if ((desktopNode == node) && (desktop != null)) { // Check if the main desktop is this device, if it is, use that. @@ -2786,7 +2786,7 @@ c.removeAttribute('onmouseup'); c.removeAttribute('onmousemove'); Q('xkvmid_' + shortid).appendChild(c); - QH('skvmid_' + shortid, ['Disconnected', 'Connecting...', 'Setup...', '', ''][((desktop.m.State == null)?desktop.m.state:desktop.m.State)]); + QH('skvmid_' + shortid, ["Disconnected", "Connecting...", "Setup...", '', ''][((desktop.m.State == null)?desktop.m.state:desktop.m.State)]); if (desktop.m.SendCompressionLevel) { desktop.m.SendCompressionLevel(1, multidesktopsettings.quality, multidesktopsettings.scaling, multidesktopsettings.framerate); } desktop.shortid = shortid; desktop.onStateChanged = onMultiDesktopStateChange; @@ -2836,7 +2836,7 @@ function getUserShortStr(node) { if (node == null || node.users == null || node.users.length == 0) return ''; - if (node.users.length > 1) { return '' + node.users.length + ' users'; } + if (node.users.length > 1) { return '' + format("{0} users", node.users.length) + ''; } var u = node.users[0], su = u, i = u.indexOf('\\'); if (i > 0) { su = u.substring(i + 1); } su = EscapeHtml(su); @@ -2847,7 +2847,7 @@ function autoConnectDesktops() { if (Q('autoConnectDesktopCheckbox').checked == true) { connectAllKvmFunction(); } } function connectAllKvmFunction() { for (var i in nodes) { if (multiDesktop[nodes[i]._id] == null) { toggleKvmDevice(nodes[i]._id); } } } function disconnectAllKvmFunction() { for (var nodeid in multiDesktop) { multiDesktop[nodeid].Stop(); } multiDesktop = {}; } - function onMultiDesktopStateChange(desk, state) { try { QH('skvmid_' + desk.shortid, ['Disconnected', 'Connecting...', 'Setup...', '', ''][state]); } catch (ex) {} } + function onMultiDesktopStateChange(desk, state) { try { QH('skvmid_' + desk.shortid, ["Disconnected", "Connecting...", "Setup...", '', ''][state]); } catch (ex) {} } function showMultiDesktopSettings() { QV('d7amtkvm', false); @@ -2916,22 +2916,22 @@ if ((meshrights & 4) == 0) return ''; var r = ''; if ((features & 1024) == 0) { // If CIRA is allowed - r += ' Add CIRA'; + r += ' ' + "Add CIRA" + ''; } if (mesh.mtype == 1) { if ((features & 1) == 0) { // If not WAN-Only - r += ' Add Local'; - r += ' Scan Network'; + r += ' ' + "Add Local" + ''; + r += ' ' + "Scan Network" + ''; } if (mesh.amt && (mesh.amt.type == 2)) { // CCM activation - r += ' Activation'; + r += ' ' + "Activation" + ''; } else if (mesh.amt && (mesh.amt.type == 3) && ((features & 0x00100000) != 0)) { // ACM activation - r += ' Activation'; + r += ' ' + "Activation" + ''; } } if (mesh.mtype == 2) { - r += ' Add Agent'; - if ((features & 2) == 0) { r += ' Invite'; } + r += ' ' + "Add Agent" + ''; + if ((features & 2) == 0) { r += ' ' + "Invite" + ''; } } return r; } @@ -2939,12 +2939,12 @@ function addDeviceToMesh(meshid) { if (xxdialogMode) return false; var mesh = meshes[meshid]; - var x = "Add a new Intel® AMT device to device group \"" + EscapeHtml(mesh.name) + "\".

"; - x += addHtmlValue('Device Name', ''); - x += addHtmlValue('Hostname', ''); - x += addHtmlValue('Username', ''); - x += addHtmlValue('Password', ''); - x += addHtmlValue('Security', ''); + var x = format("Add a new Intel® AMT device to device group \"{0}\".", EscapeHtml(mesh.name)) + '

'; + x += addHtmlValue("Device Name", ''); + x += addHtmlValue("Hostname", ''); + x += addHtmlValue("Username", ''); + x += addHtmlValue("Password", ''); + x += addHtmlValue("Security", ''); setDialogMode(2, "Add Intel® AMT device", 3, addDeviceToMeshEx, x, meshid); validateDeviceToMesh(); Q('dp1devicename').focus(); @@ -2958,13 +2958,13 @@ if ((servername.indexOf('.') == -1) || ((features & 2) != 0)) { servername = window.location.hostname; } // If the server name is not set or it's in LAN-only mode, use the URL hostname as server name. var url, domainUrlNoSlash = domainUrl.substring(0, domainUrl.length - 1); if (serverinfo.https == true) { - var portStr = (serverinfo.port == 443) ? '' : (":" + serverinfo.port); - url = "wss://" + servername + portStr + domainUrl; + var portStr = (serverinfo.port == 443) ? '' : (':' + serverinfo.port); + url = 'wss://' + servername + portStr + domainUrl; } else { - var portStr = (serverinfo.port == 80) ? '' : (":" + serverinfo.port); - url = "ws://" + servername + portStr + domainUrl; + var portStr = (serverinfo.port == 80) ? '' : (':' + serverinfo.port); + url = 'ws://' + servername + portStr + domainUrl; } - var x = "Perform Intel AMT client control mode (CCM) activation to group \"" + EscapeHtml(mesh.name) + "\" by downloading the MeshCMD tool and running it like this:

"; + var x = format("Perform Intel AMT client control mode (CCM) activation to group \"{0}\" by downloading the MeshCMD tool and running it like this:", EscapeHtml(mesh.name)) + '

'; x += ''; setDialogMode(2, "Intel® AMT activation", 9, null, x); Q('idx_dlgOkButton').focus(); @@ -2978,16 +2978,16 @@ if ((servername.indexOf('.') == -1) || ((features & 2) != 0)) { servername = window.location.hostname; } // If the server name is not set or it's in LAN-only mode, use the URL hostname as server name. var url, domainUrlNoSlash = domainUrl.substring(0, domainUrl.length - 1); if (serverinfo.https == true) { - var portStr = (serverinfo.port == 443) ? '' : (":" + serverinfo.port); - url = "wss://" + servername + portStr + domainUrl; + var portStr = (serverinfo.port == 443) ? '' : (':' + serverinfo.port); + url = 'wss://' + servername + portStr + domainUrl; } else { - var portStr = (serverinfo.port == 80) ? '' : (":" + serverinfo.port); - url = "ws://" + servername + portStr + domainUrl; + var portStr = (serverinfo.port == 80) ? '' : (':' + serverinfo.port); + url = 'ws://' + servername + portStr + domainUrl; } - var x = "Perform Intel AMT admin control mode (ACM) activation to group \"" + EscapeHtml(mesh.name) + "\" by downloading the MeshCMD tool and running it like this:

"; + var x = format("Perform Intel AMT admin control mode (ACM) activation to group \"{0}\" by downloading the MeshCMD tool and running it like this:", EscapeHtml(mesh.name)) + '

'; x += ''; if (serverinfo.amtAcmFqdn != null) { - x += '
Intel AMT will need to be set with a Trusted FQDN in MEBx or have a wired LAN on the network: ' + serverinfo.amtAcmFqdn.join(', ') + '
'; + x += ('
' + "Intel AMT will need to be set with a Trusted FQDN in MEBx or have a wired LAN on the network:" + ' ' + serverinfo.amtAcmFqdn.join(', ') + '
'); } setDialogMode(2, "Intel® AMT activation", 9, null, x); Q('idx_dlgOkButton').focus(); @@ -2997,8 +2997,8 @@ // Display the Intel AMT scanning dialog box function addAmtScanToMesh(meshid) { if (xxdialogMode) return false; - var x = "Enter a range of IP addresses to scan for Intel AMT devices.

"; - x += addHtmlValue('IP Range', ''); + var x = "Enter a range of IP addresses to scan for Intel AMT devices." + '

'; + x += addHtmlValue("IP Range", ''); x += '
'; setDialogMode(2, "Scan for Intel® AMT devices", 3, addAmtScanToMeshEx, x, meshid); QE('idx_dlgOkButton', false); @@ -3013,7 +3013,7 @@ // Called when OK is pressed on the Intel AMT scanning box function addAmtScanToMeshEx(button, meshid) { - var elements = document.getElementsByClassName("DevScanCheckbox"), checkcount = 0; + var elements = document.getElementsByClassName('DevScanCheckbox'), checkcount = 0; for (var i=0;iScanning...'); + QH('dp1results', '
' + "Scanning..." + '
'); meshserver.send({ action: 'scanamtdevice', range: Q('dp1range').value }); } // Called when a scanned computer is checked or unchecked. function addAmtScanToMeshCheckbox() { - var elements = document.getElementsByClassName("DevScanCheckbox"), checkcount = 0; + var elements = document.getElementsByClassName('DevScanCheckbox'), checkcount = 0; for (var i=0;i 0); } @@ -3045,36 +3045,36 @@ // Replace non alphabetic characters (@ and $) with 'X' because MPS username cannot accept it. var meshidx = meshid.split('/')[2].replace(/\@/g, 'X').replace(/\$/g, 'X'); - var y = ''; } // Only display this option if Intel AMT CIRA with Mutual-Auth is allowed. + var y = ''); } // Only display this option if Intel AMT CIRA with Mutual-Auth is allowed. var x = ''; - x += addHtmlValue('Setup Method', y); + x += addHtmlValue("Setup Method", y); x += '
'; // Setup CIRA using a MeshCommander script (Pretty Simple) - x += "
To add a new Intel® AMT device to device group \"" + EscapeHtml(mesh.name) + "\" with CIRA, download the following script files and use MeshCommander to run the script to configure computers.

"; + x += '
' + format("To add a new Intel® AMT device to device group \"{0}\" with CIRA, download the following script files and use MeshCommander to run the script to configure computers.", EscapeHtml(mesh.name)) + '

'; //x += addHtmlValue('Setup CIRA', 'cira_setup.mescript'); - x += addHtmlValue('Setup CIRA', 'cira_setup.mescript'); - x += addHtmlValue('Cleanup CIRA', 'cira_clean.mescript'); - x += "
"; + x += addHtmlValue("Setup CIRA", 'cira_setup.mescript'); + x += addHtmlValue("Cleanup CIRA", 'cira_clean.mescript'); + x += '
'; // Setup CIRA with user/pass authentication (Somewhat difficult) - x += ""; + x += ''; // Setup CIRA with certificate authentication (Really difficult, only if TLS offload is not used) if ((features & 16) == 0) { - x += ""; + x += ''; } setDialogMode(2, "Add Intel® AMT CIRA device", 2, null, x, 'fileDownload'); @@ -3101,21 +3101,21 @@ if (xxdialogMode) return false; var x = '', mesh = meshes[meshid]; if (features & 64) { - x += addHtmlValue('Invitation Type', '') + "
"; - x += "
' + "User" + '' + "Address" + '' + "Connectivity"; } var groupNames = []; for (var i in groups) { groupNames.push(i); } @@ -2697,9 +2697,9 @@ // If there is nothing to display, explain the problem if ((r == '') && (meshcount > 0) && (Q('SearchInput').value != '')) { if (sort == 3) { - r = '
No devices are included in any groups, click on a device\'s \"Groups\" to add to a group.
'; + r = '
' + "No devices are included in any groups, click on a device\'s \"Groups\" to add to a group." + '
'; } else { - r = '
No devices matching this search.
'; + r = '
' + "No devices matching this search." + '
'; } } @@ -2717,12 +2717,12 @@ r += getMeshActions(mesh, meshrights); r += '
No Intel® AMT devices in this mesh'; - if ((meshrights & 4) != 0) { r += ', add one'; } + r += '
' + "No Intel® AMT devices in this mesh"; + if ((meshrights & 4) != 0) { r += ', ' + "add one" + ''; } } if (mesh.mtype == 2) { - r += '
No devices in this mesh'; - if ((meshrights & 4) != 0) { r += ', add one'; } + r += '
' + "No devices in this mesh"; + if ((meshrights & 4) != 0) { r += ', ' + "add one" + ''; } } r += '.
'; // Attribute: Mesh - x += addDeviceAttribute('Group', '' + EscapeHtml(meshes[node.meshid].name) + ''); + x += addDeviceAttribute('' + "Group" + '', '' + EscapeHtml(meshes[node.meshid].name) + ''); // Attribute: Name if ((node.rname != null) && (node.name != node.rname)) { x += addDeviceAttribute('Name', '' + EscapeHtml(node.rname) + ''); } @@ -4202,65 +4202,65 @@ if ((features & 1) == 0) { // If not WAN-only, local hostname is in use if ((meshrights & 4) != 0) { if (node.host) { - x += addDeviceAttribute('Hostname', '' + EscapeHtml(node.host) + ''); + x += addDeviceAttribute("Hostname", '' + EscapeHtml(node.host) + ''); } else { - x += addDeviceAttribute('Hostname', 'None'); + x += addDeviceAttribute("Hostname", '' + "None" + ''); } } else { - x += addDeviceAttribute('Hostname', EscapeHtml(node.host)); + x += addDeviceAttribute("Hostname", EscapeHtml(node.host)); } } // Attribute: Description - var description = node.desc?EscapeHtml(node.desc):"None"; + var description = node.desc?EscapeHtml(node.desc):('' + "None" + ''); if ((meshrights & 4) != 0) { - x += addDeviceAttribute('Description', '' + description + ' '); + x += addDeviceAttribute("Description", '' + description + ' '); } else { - x += addDeviceAttribute('Description', description); + x += addDeviceAttribute("Description", description); } // Attribute: Mesh Agent - var agentsStr = ['Unknown', 'Windows 32bit console', 'Windows 64bit console', 'Windows 32bit service', 'Windows 64bit service', 'Linux 32bit', 'Linux 64bit', 'MIPS', 'XENx86', 'Android ARM', 'Linux ARM', 'MacOS 32bit', 'Android x86', 'PogoPlug ARM', 'Android APK', 'Linux Poky x86-32bit', 'MacOS 64bit', 'ChromeOS', 'Linux Poky x86-64bit', 'Linux NoKVM x86-32bit', 'Linux NoKVM x86-64bit', 'Windows MinCore console', 'Windows MinCore service', 'NodeJS', 'ARM-Linaro', 'ARMv6l / ARMv7l', 'ARMv8 64bit', 'ARMv6l / ARMv7l / NoKVM', 'Unknown', 'Unknown', 'FreeBSD x86-64']; + var agentsStr = ["Unknown", "Windows 32bit console", "Windows 64bit console", "Windows 32bit service", "Windows 64bit service", "Linux 32bit", "Linux 64bit", "MIPS", "XENx86", "Android ARM", "Linux ARM", "MacOS 32bit", "Android x86", "PogoPlug ARM", "Android APK", "Linux Poky x86-32bit", "MacOS 64bit", "ChromeOS", "Linux Poky x86-64bit", "Linux NoKVM x86-32bit", "Linux NoKVM x86-64bit", "Windows MinCore console", "Windows MinCore service", "NodeJS", "ARM-Linaro", "ARMv6l / ARMv7l", "ARMv8 64bit", "ARMv6l / ARMv7l / NoKVM", "Unknown", "Unknown", "FreeBSD x86-64"]; if ((node.agent != null) && (node.agent.id != null) && (node.agent.ver != null)) { var str = ''; if (node.agent.id <= agentsStr.length) { str = agentsStr[node.agent.id]; } else { str = agentsStr[0]; } if (node.agent.ver != 0) { str += ' v' + node.agent.ver; } - x += addDeviceAttribute('Mesh Agent', str); + x += addDeviceAttribute("Mesh Agent", str); } // Attribute: Intel AMT if (node.intelamt != null) { var str = ''; - var provisioningStates = { 0: 'Not Activated (Pre)', 1: 'Not Activated (In)', 2: 'Activated' }; - if (node.intelamt.ver != null && node.intelamt.state == null) { str += 'Unknown State, v' + node.intelamt.ver; } else + var provisioningStates = { 0: "Not Activated (Pre)", 1: "Not Activated (In)", 2: "Activated" }; + if (node.intelamt.ver != null && node.intelamt.state == null) { str += '' + "Unknown State" + ', v' + node.intelamt.ver; } else - if ((node.intelamt.ver == null) && (node.intelamt.state == 2)) { str += 'Activated'; } - else if ((node.intelamt.ver == null) || (node.intelamt.state == null)) { str += 'Unknown Version & State'; } + if ((node.intelamt.ver == null) && (node.intelamt.state == 2)) { str += '' + "Activated" + ''; } + else if ((node.intelamt.ver == null) || (node.intelamt.state == null)) { str += '' + "Unknown Version & State" + ''; } else { str += provisioningStates[node.intelamt.state]; - if ((node.intelamt.state == 2) && node.intelamt.flags) { if (node.intelamt.flags & 2) { str += ' CCM'; } else if (node.intelamt.flags & 4) { str += ' ACM'; } } + if ((node.intelamt.state == 2) && node.intelamt.flags) { if (node.intelamt.flags & 2) { str += ' ' + "CCM" + ''; } else if (node.intelamt.flags & 4) { str += ' ' + "ACM" + ''; } } str += (', v' + node.intelamt.ver); } - if (node.intelamt.tls == 1) { str += ', TLS'; } + if (node.intelamt.tls == 1) { str += ', ' + "TLS" + ''; } if (node.intelamt.state == 2) { if (node.intelamt.user == null || node.intelamt.user == '') { if ((meshrights & 4) != 0) { - str += ', No Credentials'; + str += ', ' + "No Credentials" + ''; } else { - str += ', No Credentials'; + str += ', ' + "No Credentials" + ''; } } str += ' '; if ((meshrights & 4) != 0) { - str += ''; + str += ''; } } - var meName = 'Intel® ME'; + var meName = '' + "Intel® ME" + ''; if (typeof node.intelamt.sku == 'number') { - if ((node.intelamt.sku & 8) != 0) { meName = 'Intel® AMT'; } - else if ((node.intelamt.sku & 16) != 0) { meName = 'Intel® SM'; } + if ((node.intelamt.sku & 8) != 0) { meName = '' + "Intel® AMT" + ''; } + else if ((node.intelamt.sku & 16) != 0) { meName = '' + "Intel® SM" + ''; } } x += addDeviceAttribute(meName, str); } @@ -4270,14 +4270,14 @@ if ((node.agent != null) && (node.agent.tag != null)) { var tag = EscapeHtml(node.agent.tag); if (tag.startsWith('mailto:')) { tag = '' + tag.substring(7) + ''; } - x += addDeviceAttribute('Agent Tag', tag); + x += addDeviceAttribute("Agent Tag", tag); } } else { // Attribute: Intel AMT Tag if ((node.intelamt != null) && (node.intelamt.tag != null)) { var tag = EscapeHtml(node.intelamt.tag); if (tag.startsWith('mailto:')) { tag = '' + tag.substring(7) + ''; } - x += addDeviceAttribute('Intel® AMT Tag', tag); + x += addDeviceAttribute("Intel® AMT Tag", tag); } } @@ -4285,7 +4285,7 @@ //if (node.intelamt && node.intelamt.user) { x += addDeviceAttribute('Intel® AMT', node.intelamt.user); } // Operating system description - if (node.osdesc) { x += addDeviceAttribute('Operating System', node.osdesc); } + if (node.osdesc) { x += addDeviceAttribute("Operating System", node.osdesc); } // Antivirus if (node.av && node.av.length > 0) { @@ -4293,32 +4293,32 @@ for (var i in node.av) { if (node.av[i].product) { var avx = EscapeHtml(node.av[i].product); - if (node.av[i].enabled !== true) { avx += ' - Disabled'; } - if (node.av[i].updated !== true) { avx += ' - Out of date'; } - if ((node.av[i].enabled == true) && (node.av[i].updated == true)) { avx += ' - OK'; } + if (node.av[i].enabled !== true) { avx += ' - ' + "Disabled" + ''; } + if (node.av[i].updated !== true) { avx += ' - ' + "Out of date" + ''; } + if ((node.av[i].enabled == true) && (node.av[i].updated == true)) { avx += ' - ' + "OK" + ''; } y.push(avx); } } - x += addDeviceAttribute('Antivirus', y.join('
')); + x += addDeviceAttribute("Antivirus", y.join('
')); } // Active Users - if (node.users && node.conn && (node.users.length > 0) && (node.conn & 1)) { x += addDeviceAttribute('Active User' + ((node.users.length > 1)?'s':''), node.users.join(', ')); } + if (node.users && node.conn && (node.users.length > 0) && (node.conn & 1)) { x += addDeviceAttribute(format("Active User{0}", ((node.users.length > 1)?'s':'')), node.users.join(', ')); } // Attribute: Connectivity (Only show this if more than just the agent is connected). var connectivity = node.conn; if (connectivity && connectivity > 1) { var cstate = []; - if ((node.conn & 1) != 0) cstate.push('Mesh Agent'); - if ((node.conn & 2) != 0) cstate.push('Intel® AMT CIRA'); - else if ((node.conn & 4) != 0) cstate.push('Intel® AMT'); - if ((node.conn & 8) != 0) cstate.push('Mesh Relay'); - if ((node.conn & 16) != 0) { cstate.push('MQTT'); } - x += addDeviceAttribute('Connectivity', cstate.join(', ')); + if ((node.conn & 1) != 0) cstate.push('' + "Mesh Agent" + ''); + if ((node.conn & 2) != 0) cstate.push('' + "Intel® AMT CIRA" + ''); + else if ((node.conn & 4) != 0) cstate.push('' + "Intel® AMT" + ''); + if ((node.conn & 8) != 0) cstate.push('' + "Mesh Relay" + ''); + if ((node.conn & 16) != 0) { cstate.push('' + "MQTT" + ''); } + x += addDeviceAttribute("Connectivity", cstate.join(', ')); } // Node grouping tags - var groupingTags = 'None'; + var groupingTags = '' + "None" + ''; if (node.tags != null) { groupingTags = ''; for (var i in node.tags) { groupingTags += '' + node.tags[i] + ''; } } if ((meshrights & 4) != 0) { x += addDeviceAttribute('Tags', '' + groupingTags + ' '); @@ -4328,9 +4328,9 @@ x += '

'; // Show action button, only show if we have permissions 4, 8, 64 - if ((meshrights & 76) != 0) { x += ''; } - x += ''; - x += ''; + if ((meshrights & 76) != 0) { x += ''; } + x += ''; + x += ''; //if ((connectivity & 1) && (meshrights & 8) && (node.agent.id < 5)) { x += ''; } QH('p10html', x); @@ -4341,25 +4341,25 @@ x = '
'; if ((meshrights & 4) != 0) { // TODO: Show change group only if there is another mesh of the same type. - x += ' Change Group'; - x += ' Delete Device'; + x += ' ' + "Change Group" + ''; + x += ' ' + "Delete Device" + ''; } x += '
'; - if (mesh.mtype == 2) x += 'Interfaces '; - if (xxmap != null) x += 'Location '; - if (((meshrights & 8) != 0) && (mesh.mtype == 2)) x += 'Router '; + if (mesh.mtype == 2) x += '' + "Interfaces" + ' '; + if (xxmap != null) x += '' + "Location" + ' '; + if (((meshrights & 8) != 0) && (mesh.mtype == 2)) x += '' + "Router" + ' '; // RDP link, show this link only of the remote machine is Windows. if (((connectivity & 1) != 0) && (clickOnce == true) && (mesh.mtype == 2) && ((meshrights & 8) != 0)) { - if ((node.agent.id > 0) && (node.agent.id < 5)) { x += 'RDP '; } + if ((node.agent.id > 0) && (node.agent.id < 5)) { x += '' + "RDP" + ' '; } if (node.agent.id > 4) { - x += 'Putty '; - x += 'WinSCP '; + x += '' + "Putty" + ' '; + x += '' + "WinSCP" + ' '; } } // MQTT options - if ((meshrights == 0xFFFFFFFF) && (features & 0x00400000)) { x += 'MQTT Login '; } + if ((meshrights == 0xFFFFFFFF) && (features & 0x00400000)) { x += '' + "MQTT Login" + ' '; } x += '

' QH('p10html3', x); @@ -4367,15 +4367,15 @@ // Set the node power state var powerstate = PowerStateStr(node.state); //if (node.state == 0) { powerstate = 'Unknown State'; } - 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 ((connectivity & 16) != 0) { if (powerstate.length > 0) { powerstate += '
'; } powerstate += 'MQTT channel connected'; } - if ((powerstate == '') && node.lastconnect) { powerstate = 'Last seen:
' + printDateTime(new Date(node.lastconnect)) + '
'; } + 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 ((connectivity & 16) != 0) { if (powerstate.length > 0) { powerstate += '
'; } powerstate += '' + "MQTT channel connected" + ''; } + if ((powerstate == '') && node.lastconnect) { powerstate = '' + "Last seen:" + '
' + printDateTime(new Date(node.lastconnect)) + '
'; } QH('MainComputerState', powerstate); // Set the node icon - Q('MainComputerImage').setAttribute("src", "images/icons256-" + node.icon + "-1.png"); + Q('MainComputerImage').setAttribute('src', 'images/icons256-' + node.icon + '-1.png'); Q('MainComputerImage').className = ((!node.conn) || (node.conn == 0)?'gray':''); // Check if we have terminal and file access @@ -4675,7 +4675,7 @@ var meshrights = meshes[i].links[userinfo._id].rights; if ((meshes[i]._id != targetMeshId) && (meshrights & 4)) { count++; y += ''; } } - y += ""; + y += ''; if (count > 0) { var x = (nodeids.length == 1) ? ("Select a new group for this device" + '

') : ("Select a new group for selected devices" + '

'); @@ -4792,14 +4792,14 @@ y += ''; y += ''; - var x = ""; + var x = ''; if (mode == 0) { x += '
MeshCmd is a command line tool that performs lots of different operations. The action file can optionally be downloaded and edited to provide server information and credentials.

'; } if (mode == 1) { x += '
Download "meshcmd" with an action file to route traffic thru this server to this device. Make sure to edit meshaction.txt and add your account password or make any changes needed.

'; } x += addHtmlValue('Operating System', y); x += addHtmlValue('MeshCmd', ''); if (mode == 0) { x += addHtmlValue('Action File', 'MeshAction (.txt)'); } if (mode == 1) { x += addHtmlValue('Action File', 'MeshAction (.txt)'); } - x += "
"; + x += '
'; setDialogMode(2, [ "Download MeshCmd", "Network Router" ][mode], 9, null, x, 'fileDownload'); meshCmdOsClick(); } @@ -5039,7 +5039,7 @@ if (e.candidate == null) { desktop.m.sendKvmData(JSON.stringify({ action: 'offer', ver: 1, sdp: webRtcDesktop.webrtcoffer.sdp })); } else { - webRtcDesktop.webrtcoffer.sdp += ("a=" + e.candidate.candidate + "\r\n"); // New candidate, add it to the SDP + webRtcDesktop.webrtcoffer.sdp += ('a=' + e.candidate.candidate + '\r\n'); // New candidate, add it to the SDP } } webRtcDesktop.webrtc.oniceconnectionstatechange = function () { @@ -5944,7 +5944,7 @@ //console.log('p13gotFiles', data); data = JSON.parse(decode_utf8(data)); if (data.action == 'download') { p13gotDownloadCommand(data); return; } - data.path = data.path.replace(/\//g, "\\"); + data.path = data.path.replace(/\//g, '\\'); if ((p13filetree != null) && (data.path == p13filetree.path)) { // This is an update to the same folder var checkedNames = p13getCheckedNames(); @@ -5952,7 +5952,7 @@ p13updateFiles(checkedNames); } else { // Make both paths use the same seperator not start with / - var x1 = data.path.replace(/\//g, "\\"), x2 = p13targetpath.replace(/\//g, "\\"); + var x1 = data.path.replace(/\//g, '\\'), x2 = p13targetpath.replace(/\//g, '\\'); while ((x1.length > 0) && (x1[0] == '\\')) { x1 = x1.substring(1); } while ((x2.length > 0) && (x2[0] == '\\')) { x2 = x2.substring(1); } if ((x1 == x2) || ((data.path == '\\') && (p13targetpath == ''))) { @@ -5988,7 +5988,7 @@ // Figure out the name and shortname var f = filetreexx[i], name = f.n, shortname; shortname = name; - if (name.length > 70) { shortname = '' + EscapeHtml(name.substring(0, 70)) + "..."; } else { shortname = EscapeHtml(name); } + if (name.length > 70) { shortname = '' + EscapeHtml(name.substring(0, 70)) + ("..." + ''); } else { shortname = EscapeHtml(name); } name = EscapeHtml(name); // Figure out the date @@ -6082,8 +6082,8 @@ } } - function p13getFileSelCount(includeDirs) { var cc = 0; var checkboxes = document.getElementsByName('fd'); for (var i = 0; i < checkboxes.length; i++) { if ((checkboxes[i].checked) && ((includeDirs != false) || (checkboxes[i].attributes.file.value == "3"))) cc++; } return cc; } - function p13getFileSelDirCount() { var cc = 0, checkboxes = document.getElementsByName('fd'); for (var i = 0; i < checkboxes.length; i++) { if ((checkboxes[i].checked) && (checkboxes[i].attributes.file.value == "999")) cc++; } return cc; } + function p13getFileSelCount(includeDirs) { var cc = 0; var checkboxes = document.getElementsByName('fd'); for (var i = 0; i < checkboxes.length; i++) { if ((checkboxes[i].checked) && ((includeDirs != false) || (checkboxes[i].attributes.file.value == '3'))) cc++; } return cc; } + function p13getFileSelDirCount() { var cc = 0, checkboxes = document.getElementsByName('fd'); for (var i = 0; i < checkboxes.length; i++) { if ((checkboxes[i].checked) && (checkboxes[i].attributes.file.value == '999')) cc++; } return cc; } function p13getFileCount() { var cc = 0; var checkboxes = document.getElementsByName('fd'); return checkboxes.length; } function p13selectallfile() { var nv = (p13getFileSelCount() == 0), checkboxes = document.getElementsByName('fd'); for (var i = 0; i < checkboxes.length; i++) { checkboxes[i].checked = nv; } p13setActions(); } function p13createfolder() { setDialogMode(2, "New Folder", 3, p13createfolderEx, ''); focusTextBox('p13renameinput'); p13fileNameCheck(); } @@ -6108,10 +6108,39 @@ } var p13clipboard = null, p13clipboardFolder = null, p13clipboardCut = 0; - function p13copyFile(cut) { var checkboxes = document.getElementsByName('fd'); p13clipboard = []; p13clipboardCut = cut, p13clipboardFolder = p13targetpath; for (var i = 0; i < checkboxes.length; i++) { if ((checkboxes[i].checked) && (checkboxes[i].attributes.file.value == "3")) { p13clipboard.push(p13filetree.dir[checkboxes[i].value].n); } } p13updateClipview(); } - function p13pasteFile() { var x = ''; if ((p13clipboard != null) && (p13clipboard.length > 0)) { x = 'Confim ' + (p13clipboardCut == 0?'copy':'move') + ' of ' + p13clipboard.length + ' entrie' + ((p13clipboard.length > 1)?'s':'') + ' to this location?' } setDialogMode(2, "Paste", 3, p13pasteFileEx, x); } + function p13copyFile(cut) { var checkboxes = document.getElementsByName('fd'); p13clipboard = []; p13clipboardCut = cut, p13clipboardFolder = p13targetpath; for (var i = 0; i < checkboxes.length; i++) { if ((checkboxes[i].checked) && (checkboxes[i].attributes.file.value == '3')) { p13clipboard.push(p13filetree.dir[checkboxes[i].value].n); } } p13updateClipview(); } + function p13pasteFile() { + var x = ''; + if ((p13clipboard != null) && (p13clipboard.length > 0)) { + if (p13clipboardCut == 0) { + if (p13clipboard.length > 1) { x = format("Confirm copy of {0} entries's to this location?", p13clipboard.length); } else { x = format("Confirm copy of 1 entrie to this location?"); } + } else { + if (p13clipboard.length > 1) { x = format("Confirm move of {0} entries's to this location?", p13clipboard.length); } else { x = format("Confirm move of 1 entrie to this location?"); } + } + } + setDialogMode(2, "Paste", 3, p13pasteFileEx, x); + } function p13pasteFileEx() { files.sendText({ action: (p13clipboardCut == 0?'copy':'move'), reqid: 1, scpath: p13clipboardFolder, dspath: p13targetpath, names: p13clipboard }); p13folderup(999); if (p13clipboardCut == 1) { p13clipboard = null, p13clipboardFolder = null, p13clipboardCut = 0; p13updateClipview(); } } - function p13updateClipview() { var x = ''; if ((p13clipboard != null) && (p13clipboard.length > 0)) { x = 'Holding ' + p13clipboard.length + ' entrie' + ((p13clipboard.length > 1)?'s':'') + ' for ' + (p13clipboardCut == 0?'copy':'move') + ', Clear.' } QH('p13bottomstatus', x); p13setActions(); } + function p13updateClipview() { + var x = ''; + if ((p13clipboard != null) && (p13clipboard.length > 0)) { + if (p13clipboardCut == 0) { + if (p13clipboard.length > 1) { + x = format("Holding {0} entries for copy" + ', ' + "Clear" + '.', p13clipboard.length); + } else { + x = format("Holding 1 entrie for copy" + ', ' + "Clear" + '.'); + } + } else { + if (p13clipboard.length > 1) { + x = format("Holding {0} entries for move" + ', ' + "Clear" + '.', p13clipboard.length); + } else { + x = format("Holding 1 entrie for move" + ', ' + "Clear" + '.'); + } + } + } + QH('p13bottomstatus', x); + p13setActions(); + } function p13clearClip() { p13clipboard = null; p13clipboardFolder = null; p13clipboardCut = 0; p13updateClipview(); return false; } function p13fileDragDrop(e) { @@ -6683,7 +6712,7 @@ function account_addOtp() { if (xxdialogMode || (userinfo.otpsecret == 1) || ((features & 4096) == 0)) return; - setDialogMode(2, "Authenticator App", 2, function () { meshserver.send({ action: 'otpauth-setup', secret: Q('d2optsecret').attributes.secret.value, token: Q('d2otpauthinput').value }); }, "
Loading...
", 'otpauth-request'); + setDialogMode(2, "Authenticator App", 2, function () { meshserver.send({ action: 'otpauth-setup', secret: Q('d2optsecret').attributes.secret.value, token: Q('d2otpauthinput').value }); }, ('
' + "Loading..." + '
'), 'otpauth-request'); meshserver.send({ action: 'otpauth-request' }); } @@ -6749,7 +6778,7 @@ function account_showLocalizationSettings() { if (xxdialogMode) return false; var n = getstore('loctag', 0); - var x = ''; for (var i in loclist) { x += ''; } x += ''; var y = addHtmlValue("Localization", x); @@ -6768,7 +6797,7 @@ } function account_enableNotifications() { - if (Notification) { Notification.requestPermission().then(function (permission) { QV('accountEnableNotificationsSpan', permission != "granted"); }); } + if (Notification) { Notification.requestPermission().then(function (permission) { QV('accountEnableNotificationsSpan', permission != 'granted'); }); } return false; } @@ -7273,15 +7302,15 @@ if (xxdialogMode) return; var x = '', consent = (currentMesh.consent) ? currentMesh.consent : 0; x += '
' + "Desktop" + '
'; - x += "
'; - x += "
'; - if (debugmode) { x += "
'; } + x += '
'; + x += '
'; + if (debugmode) { x += '
'; } x += '
' + "Terminal" + '
'; - x += "
'; - x += "
'; + x += '
'; + x += '
'; x += '
' + "Files" + '
'; - x += "
'; - x += "
'; + x += '
'; + x += '
'; setDialogMode(2, "Edit Device Group User Consent", 3, p20editmeshconsentEx, x); if (serverinfo.consent) { if (serverinfo.consent & 0x0001) { Q('d20flag1').checked = true; } @@ -7605,7 +7634,7 @@ // Figure out the name and shortname var f = filetreexx[i], name = f.n, shortname; shortname = name; - if (name.length > 70) { shortname = '' + EscapeHtml(name.substring(0, 70)) + "..."; } else { shortname = EscapeHtml(name); } + if (name.length > 70) { shortname = '' + EscapeHtml(name.substring(0, 70)) + "..." + ''; } else { shortname = EscapeHtml(name); } name = EscapeHtml(name); // Figure out the date @@ -7667,7 +7696,9 @@ while (f.t > 1 && f.t != 4) { f = f.parent; } if ((f.t != 1 && f.t != 4) || (f.maxbytes == null)) return ''; var tf = Math.floor(f.s / 1024), tq = (f.maxbytes - f.s); - return ' 1 ? 's' : '') + ". " + (Math.floor(f.maxbytes / 1024 / 1024)) + 'k maxinum">' + getNiceSize(tq) + ' '; + var title; + if (f.c > 1) { title = format("{0}k in {1} files. {2}k maximum", tf, f.c, (Math.floor(f.maxbytes / 1024 / 1024))); } else { title = format("{0}k in 1 file. {1}k maximum", tf, (Math.floor(f.maxbytes / 1024 / 1024))); } + return '' + getNiceSize(tq) + ' '; } function p5showPublicLink(u) { setDialogMode(2, "Public Link", 1, null, ''); return false; } @@ -7702,8 +7733,8 @@ QE('p5PasteButton', (p5clipboard != null) && (p5clipboard.length > 0) && (filetreelocation.length > 0)); } - function getFileSelCount(includeDirs) { var cc = 0, checkboxes = document.getElementsByName('fc'); for (var i = 0; i < checkboxes.length; i++) { if ((checkboxes[i].checked) && ((includeDirs != false) || (checkboxes[i].attributes.file.value == "3"))) cc++; } return cc; } - function getFileSelDirCount() { var cc = 0, checkboxes = document.getElementsByName('fc'); for (var i = 0; i < checkboxes.length; i++) { if ((checkboxes[i].checked) && (checkboxes[i].attributes.file.value == "999")) cc++; } return cc; } + function getFileSelCount(includeDirs) { var cc = 0, checkboxes = document.getElementsByName('fc'); for (var i = 0; i < checkboxes.length; i++) { if ((checkboxes[i].checked) && ((includeDirs != false) || (checkboxes[i].attributes.file.value == '3'))) cc++; } return cc; } + function getFileSelDirCount() { var cc = 0, checkboxes = document.getElementsByName('fc'); for (var i = 0; i < checkboxes.length; i++) { if ((checkboxes[i].checked) && (checkboxes[i].attributes.file.value == '999')) cc++; } return cc; } function getFileCount() { var cc = 0; var checkboxes = document.getElementsByName('fc'); return checkboxes.length; } function p5selectallfile() { var nv = (getFileSelCount() == 0), checkboxes = document.getElementsByName('fc'); for (var i = 0; i < checkboxes.length; i++) { checkboxes[i].checked = nv; } p5setActions(); } function setupBackPointers(x) { if (x.f != null) { var fs = 0, fc = 0; for (var i in x.f) { setupBackPointers(x.f[i]); x.f[i].parent = x; if (x.f[i].s) { fs += x.f[i].s; } if (x.f[i].c) { fc += x.f[i].c; } if (x.f[i].t == 3) { fc++; } } x.s = fs; x.c = fc; } return x; } @@ -7734,7 +7765,7 @@ */ var p5clipboard = null, p5clipboardFolder = null, p5clipboardCut = 0; - function p5copyFile(cut) { var checkboxes = document.getElementsByName('fc'); p5clipboard = []; p5clipboardCut = cut, p5clipboardFolder = Clone(filetreelocation); for (var i = 0; i < checkboxes.length; i++) { if ((checkboxes[i].checked) && (checkboxes[i].attributes.file.value == "3")) { p5clipboard.push(checkboxes[i].value); } } p5updateClipview(); } + function p5copyFile(cut) { var checkboxes = document.getElementsByName('fc'); p5clipboard = []; p5clipboardCut = cut, p5clipboardFolder = Clone(filetreelocation); for (var i = 0; i < checkboxes.length; i++) { if ((checkboxes[i].checked) && (checkboxes[i].attributes.file.value == '3')) { p5clipboard.push(checkboxes[i].value); } } p5updateClipview(); } function p5pasteFile() { var x = ''; if ((p5clipboard != null) && (p5clipboard.length > 0)) { x = format("Confim {0} of {1} entrie{2} to this location?", (p5clipboardCut == 0?'copy':'move'), p5clipboard.length, ((p5clipboard.length > 1)?'s':'')) } setDialogMode(2, "Paste", 3, p5pasteFileEx, x); } function p5pasteFileEx() { meshserver.send({ action: 'fileoperation', fileop: (p5clipboardCut == 0?'copy':'move'), scpath: p5clipboardFolder, path: filetreelocation, names: p5clipboard }); p5folderup(999); if (p5clipboardCut == 1) { p5clipboard = null, p5clipboardFolder = null, p5clipboardCut = 0; p5updateClipview(); } } function p5updateClipview() { var x = ''; if ((p5clipboard != null) && (p5clipboard.length > 0)) { x = format("Holding {0} entrie{1} for {2}", p5clipboard.length, ((p5clipboard.length > 1)?'s':''), (p5clipboardCut == 0?"copy":"move")) + ', ' + "Clear" + '.' } QH('p5bottomstatus', x); p5setActions(); } @@ -8010,7 +8041,7 @@ } else { if (user.login) { lastAccess += '' + printDate(new Date(user.login * 1000)) + ''; } } - if (self) { permissions += ""; } + if (self) { permissions += ''; } if ((user.siteadmin != null) && ((user.siteadmin & 32) != 0) && (user.siteadmin != 0xFFFFFFFF)) { permissions += "Locked" + ', '; } permissions += ''; @@ -8026,10 +8057,10 @@ } else { permissions += "Partial"; } - if ((user.siteadmin != null) && (user.siteadmin != 0xFFFFFFFF) && ((user.siteadmin & (64 + 128)) != 0)) { permissions += "*"; } - permissions += ""; + if ((user.siteadmin != null) && (user.siteadmin != 0xFFFFFFFF) && ((user.siteadmin & (64 + 128)) != 0)) { permissions += '*'; } + permissions += ''; //if ((user.quota != null) && ((user.siteadmin & 8) != 0)) { msg += ", " + (user.quota / 1024) + " k"; } - if (self) { permissions += ""; } + if (self) { permissions += ''; } var groups = 0 if (user.links) { for (var i in user.links) { groups++; } } @@ -8353,11 +8384,11 @@ if (serverinfo.emailcheck) { everify = ((user.emailVerified == true) ? ' ' : ' '); } if (user.name.toLowerCase() != user._id.split('/')[2]) { x += addDeviceAttribute("User Identifier", user._id.split('/')[2]); } if (((features & 0x200000) == 0) && ((user.siteadmin != 0xFFFFFFFF) || (userinfo.siteadmin == 0xFFFFFFFF))) { // If we are not site admin, we can't change a admin email. - x += addDeviceAttribute("Email", everify + "" + email + ' '); + x += addDeviceAttribute("Email", everify + '' + email + ' '); } else { x += addDeviceAttribute("Email", everify + email + ' '); } - x += addDeviceAttribute("Server Rights", premsg + "" + msg.join(', ') + ""); + x += addDeviceAttribute("Server Rights", premsg + '' + msg.join(', ') + ''); if (user.quota) x += addDeviceAttribute("Server Quota", EscapeHtml(parseInt(user.quota) / 1024) + ' k'); x += addDeviceAttribute("Creation", printDateTime(new Date(user.creation * 1000))); if (user.login) x += addDeviceAttribute("Last Login", printDateTime(new Date(user.login * 1000))); @@ -8416,7 +8447,7 @@ // Update user's connection state x = ''; - if (activeSessions == 1) { x = "1 active session"; } else if (activeSessions > 1) { x = format(" active sessions", activeSessions); } + if (activeSessions == 1) { x = "1 active session"; } else if (activeSessions > 1) { x = format("{0} active sessions", activeSessions); } QH('MainUserState', x); go(30); @@ -8656,7 +8687,7 @@ // Figure out the name and shortname var f = filetreexx[i], name = f.n, shortname; shortname = name; - if (name.length > 70) { shortname = '' + EscapeHtml(name.substring(0, 70)) + "..."; } else { shortname = EscapeHtml(name); } + if (name.length > 70) { shortname = '' + EscapeHtml(name.substring(0, 70)) + ("..." + ''); } else { shortname = EscapeHtml(name); } name = EscapeHtml(name); // Figure out the size @@ -9240,7 +9271,7 @@ function methodcheck(r) { if (r && r != null && r.Body && r.Body.ReturnValueStr != 'SUCCESS') { messagebox("Call Error", r.Header.Method + ': ' + r.Body.ReturnValueStr.replace('_', ' ')); return true; } return false; } function TableStart() { return '

'; } function TableStart2() { return '

'; } - function TableEntry(n, v) { return "

" + n + "

" + v; } + function TableEntry(n, v) { return '

' + n + '

' + v; } function FullTable(x, e) { var r = TableStart(); for (i in x) { if (i && x[i]) r += TableEntry(i, x[i]); } return r + TableEnd(e); } function TableEnd(n) { return '

' + (n?n:'') + '

'; } function AddButton(v, f) { return ''; } @@ -9272,7 +9303,7 @@ function printDateTime(d) { return d.toLocaleString(args.locale); } function addDetailItem(title, value, state) { return '
' + value + '' + title + '
'; } function format(format) { var args = Array.prototype.slice.call(arguments, 1); return format.replace(/{(\d+)}/g, function (match, number) { return typeof args[number] != 'undefined' ? args[number] : match; }); }; - +