Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
Disables feedback functionality if callstats isn't available.
yanas7ea675159e0f
diff --git a/css/main.css b/css/main.cssindex e4855d8c98..5a937025fd 100644--- a/css/main.css+++ b/css/main.css@@ -248,6 +248,7 @@ form {}div.feedbackButton {+ display: none;position: absolute;background-color: rgba(0,0,0,.50);border-radius: 50%;diff --git a/modules/UI/Feedback.js b/modules/UI/Feedback.jsindex 670bb38eaf..baf53447c7 100644--- a/modules/UI/Feedback.js+++ b/modules/UI/Feedback.js@@ -1,4 +1,4 @@-/* global $, interfaceConfig */+/* global $, config, interfaceConfig *//** Created by Yana Stamcheva on 2/10/15.@@ -73,6 +73,30 @@ var Feedback = {* The feedback score. -1 indicates no score has been given for now.*/feedbackScore: -1,+ /**+ * Initialise the Feedback functionality.+ */+ init: function () {+ // CallStats is the way we send feedback, so we don't have to initialise+ // if callstats isn't enabled.+ if (!config.callStatsID || !config.callStatsSecret)+ return;++ $("div.feedbackButton").css("display", "block");+ $("#feedbackButton").click(function (event) {+ Feedback.openFeedbackWindow();+ });+ },+ /**+ * Indicates if the feedback functionality is enabled.+ *+ * @return true if the feedback functionality is enabled, false otherwise.+ */+ isEnabled: function() {+ var isCallStatsEnabled = (config.callStatsID && config.callStatsSecret);++ return isCallStatsEnabled;+ },/*** Opens the feedback window.*/@@ -120,7 +144,7 @@ var Feedback = {var states = {overall_feedback: {html: constructOverallFeedbackHtml(),- persistent: true,+ persistent: false,buttons: {},closeText: '',focus: "div[id='stars']",@@ -161,7 +185,7 @@ var Feedback = {var feedbackDialog= APP.UI.messageHandler.openDialogWithStates(states,- { persistent: true,+ { persistent: false,buttons: {},closeText: '',loaded: onLoadFunction,diff --git a/modules/UI/UI.js b/modules/UI/UI.jsindex 6372563941..8cbb077096 100644--- a/modules/UI/UI.js+++ b/modules/UI/UI.js@@ -429,15 +429,12 @@ UI.start = function (init) {$("#downloadlog").click(function (event) {dump(event.target);});- $("#feedbackButton").click(function (event) {- Feedback.openFeedbackWindow();- });+ Feedback.init();}else{$("#header").css("display", "none");$("#bottomToolbar").css("display", "none");- $("#feedbackButton").css("display", "none");$("#downloadlog").css("display", "none");$("#remoteVideos").css("padding", "0px 0px 18px 0px");$("#remoteVideos").css("right", "0px");diff --git a/modules/UI/toolbars/Toolbar.js b/modules/UI/toolbars/Toolbar.jsindex 03949b09fc..0928581014 100644--- a/modules/UI/toolbars/Toolbar.js+++ b/modules/UI/toolbars/Toolbar.js@@ -151,12 +151,28 @@ function hangup() {}};- if (Feedback.feedbackScore > 0) {- Feedback.openFeedbackWindow();+ if (Feedback.isEnabled())+ {+ // If the user has already entered feedback, we'll show the window and+ // immidiately start the conference dispose timeout.+ if (Feedback.feedbackScore > 0) {+ Feedback.openFeedbackWindow();+ conferenceDispose();++ }+ // Otherwise we'll wait for user's feedback.+ else+ Feedback.openFeedbackWindow(conferenceDispose);+ }+ else {conferenceDispose();++ // If the feedback functionality isn't enabled we show a thank you+ // dialog.+ APP.UI.messageHandler.openMessageDialog(null, null, null,+ APP.translation.translateString("dialog.thankYou",+ {appName:interfaceConfig.APP_NAME}));}- else- Feedback.openFeedbackWindow(conferenceDispose);}/**