From 4fdc11c6fbe25bb34149e04d5e8b1962234fa7ed Mon Sep 17 00:00:00 2001 From: damencho Date: Wed, 21 Sep 2016 15:45:08 -0500 Subject: [PATCH 1/2] Removes download logs references. --- css/_base.scss | 9 --------- css/_font-awesome.scss | 6 ------ css/_font.scss | 3 --- index.html | 1 - lang/main.json | 1 - modules/UI/UI.js | 9 --------- 6 files changed, 29 deletions(-) diff --git a/css/_base.scss b/css/_base.scss index a115af31c..435d98b36 100644 --- a/css/_base.scss +++ b/css/_base.scss @@ -81,15 +81,6 @@ form { display: block; } -#downloadlog { - display: none; - position: absolute; - bottom: 5; - left: 5; - overflow: visible; - color: rgba(255,255,255,.50); -} - .active { background-color: #00ccff; } diff --git a/css/_font-awesome.scss b/css/_font-awesome.scss index 880eb8250..a4ae620cc 100644 --- a/css/_font-awesome.scss +++ b/css/_font-awesome.scss @@ -255,9 +255,6 @@ .fa-road:before { content: "\f018"; } -.fa-download:before { - content: "\f019"; -} .fa-arrow-circle-o-down:before { content: "\f01a"; } @@ -842,9 +839,6 @@ .fa-exchange:before { content: "\f0ec"; } -.fa-cloud-download:before { - content: "\f0ed"; -} .fa-cloud-upload:before { content: "\f0ee"; } diff --git a/css/_font.scss b/css/_font.scss index a6164657d..4aa45a4e5 100644 --- a/css/_font.scss +++ b/css/_font.scss @@ -42,9 +42,6 @@ .icon-chat:before { content: "\e906"; } -.icon-download:before { - content: "\e902"; -} .icon-edit:before { content: "\e907"; } diff --git a/index.html b/index.html index 6f437ea7e..a8d7a4f9e 100644 --- a/index.html +++ b/index.html @@ -212,7 +212,6 @@ - diff --git a/lang/main.json b/lang/main.json index bb406ffea..63cb4181b 100644 --- a/lang/main.json +++ b/lang/main.json @@ -2,7 +2,6 @@ "contactlist": "On Call (__participants__)", "connectionsettings": "Connection Settings", "poweredby": "powered by", - "downloadlogs": "Download logs", "feedback": "Give us your feedback", "roomUrlDefaultMsg": "Your conference is currently being created...", "me": "me", diff --git a/modules/UI/UI.js b/modules/UI/UI.js index 90156f866..e4b94223b 100644 --- a/modules/UI/UI.js +++ b/modules/UI/UI.js @@ -482,17 +482,8 @@ UI.start = function () { $('#noticeText').text(config.noticeMessage); $('#notice').css({display: 'block'}); } - $("#downloadlog").click(function (event) { - let logs = APP.conference.getLogs(); - let data = encodeURIComponent(JSON.stringify(logs, null, ' ')); - - let elem = event.target.parentNode; - elem.download = 'meetlog.json'; - elem.href = 'data:application/json;charset=utf-8,\n' + data; - }); } else { $("#mainToolbarContainer").css("display", "none"); - $("#downloadlog").css("display", "none"); FilmStrip.setupFilmStripOnly(); messageHandler.enableNotifications(false); JitsiPopover.enabled = false; From bbc7aedb48dd344f864d2d79b42077db28d86f39 Mon Sep 17 00:00:00 2001 From: damencho Date: Wed, 21 Sep 2016 15:46:10 -0500 Subject: [PATCH 2/2] Adds download logs method for debugging. Adds a download logs method that can be called from console to take usefull messages for debugging. console> APP.conference.saveLogs(); --- conference.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/conference.js b/conference.js index 7c6a6f249..0b8307c37 100644 --- a/conference.js +++ b/conference.js @@ -711,6 +711,30 @@ export default { return room.getLogs(); }, + /** + * Download logs, a function that can be called from console while + * debugging. + * @param filename (optional) specify target filename + */ + saveLogs (filename = 'meetlog.json') { + // this can be called from console and will not have reference to this + // that's why we reference the global var + let logs = APP.conference.getLogs(); + let data = encodeURIComponent(JSON.stringify(logs, null, ' ')); + + let elem = document.createElement('a'); + + elem.download = filename; + elem.href = 'data:application/json;charset=utf-8,\n' + data; + elem.dataset.downloadurl + = ['text/json', elem.download, elem.href].join(':'); + elem.dispatchEvent(new MouseEvent('click', { + view: window, + bubbles: true, + cancelable: false + })); + }, + /** * Exposes a Command(s) API on this instance. It is necessitated by (1) the * desire to keep room private to this instance and (2) the need of other