From cddb95a00d31a417996957f9f1c3234c20114d1a Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Wed, 5 Feb 2020 15:41:11 -0800 Subject: [PATCH] Fixed internalization. --- sample-config.json | 2 +- views/agentinvite.handlebars | 3 ++- views/default.handlebars | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sample-config.json b/sample-config.json index f31f8abb..06f05072 100644 --- a/sample-config.json +++ b/sample-config.json @@ -140,7 +140,7 @@ }, "_letsencrypt": { "__comment__": "Requires NodeJS 10.12 or better, Go to https://letsdebug.net/ first before trying Let's Encrypt.", - "email": "myemail@myserver.com ", + "email": "myemail@myserver.com", "names": "myserver.com,customer1.myserver.com", "rsaKeySize": 3072, "production": false diff --git a/views/agentinvite.handlebars b/views/agentinvite.handlebars index 53eee9fa..7694e4e8 100644 --- a/views/agentinvite.handlebars +++ b/views/agentinvite.handlebars @@ -147,7 +147,7 @@ var groupName = decodeURIComponent('{{{meshname}}}'); if (groupName != '') { QH('groupname', format("Remote Agent Installation for {0}", groupName)); - document.title = format("{0} - Agent Installation"); + document.title = format("{0} - Agent Installation", groupName); } else { document.title = "Agent Installation"; } @@ -296,6 +296,7 @@ function copyToClipLinuxInstall() { copyTextToClip(linuxInstall); } function copyToClipLinuxUnInstall() { copyTextToClip(linuxUnInstall); } 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 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; }); }; diff --git a/views/default.handlebars b/views/default.handlebars index c76db2b8..5059f3d7 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -8786,6 +8786,7 @@ function p3showDownloadEventsDialog(mode) { if (xxdialogMode) return; + console.log('p3showDownloadEventsDialog'); var x = "Download the list of events with one of the file formats below." + '

'; x += addHtmlValue("CSV Format", '' + "eventslist.csv" + ''); x += addHtmlValue("JSON Format", '' + "eventslist.json" + ''); @@ -8809,7 +8810,7 @@ if (mode == 2) { eventList = events; } if (mode == 3) { eventList = currentUserEvents; } for (var i in eventList) { r.push(events[i]); } - saveAs(new Blob([JSON.stringify(r)], { type: 'application/octet-stream' }), "eventslist.json"); + saveAs(new Blob([JSON.stringify(r, null, 2)], { type: 'application/octet-stream' }), "eventslist.json"); return false; } @@ -9036,7 +9037,7 @@ function p4downloadUserInfoJSON() { var r = [] for (var i in users) { r.push(users[i]); } - saveAs(new Blob([JSON.stringify(r)], { type: 'application/octet-stream' }), "userlist.json"); + saveAs(new Blob([JSON.stringify(r, null, 2)], { type: 'application/octet-stream' }), "userlist.json"); return false; }