Renames variables.

This commit is contained in:
damencho 2016-11-01 14:46:47 -05:00
parent f28311a2ce
commit ae01275729
2 changed files with 13 additions and 11 deletions

View File

@ -185,14 +185,15 @@ function muteLocalVideo (muted) {
* If we have a close page enabled, redirect to it without * If we have a close page enabled, redirect to it without
* showing any other dialog. * showing any other dialog.
* *
* @param {object} data Feedback data * @param {object} options Feedback data
* @param {boolean} data.showThankYou - whether we should show thank you dialog * @param {boolean} options.thankYouDialogVisible - whether we should
* @param {boolean} data.feedbackSubmitted - whether feedback was submitted * show thank you dialog
* @param {boolean} options.feedbackSubmitted - whether feedback was submitted
*/ */
function maybeRedirectToWelcomePage(data) { function maybeRedirectToWelcomePage(options) {
// if close page is enabled redirect to it, without further action // if close page is enabled redirect to it, without further action
if (config.enableClosePage) { if (config.enableClosePage) {
if (data.feedbackSubmitted) if (options.feedbackSubmitted)
window.location.pathname = "close.html"; window.location.pathname = "close.html";
else else
window.location.pathname = "close2.html"; window.location.pathname = "close2.html";
@ -200,7 +201,7 @@ function maybeRedirectToWelcomePage(data) {
} }
// else: show thankYou dialog only if there is no feedback // else: show thankYou dialog only if there is no feedback
if (data.showThankYou) if (options.thankYouDialogVisible)
APP.UI.messageHandler.openMessageDialog( APP.UI.messageHandler.openMessageDialog(
null, "dialog.thankYou", {appName:interfaceConfig.APP_NAME}); null, "dialog.thankYou", {appName:interfaceConfig.APP_NAME});

View File

@ -1039,7 +1039,7 @@ UI.requestFeedbackOnHangup = function () {
// Feedback has been submitted already. // Feedback has been submitted already.
else if (Feedback.isEnabled() && Feedback.isSubmitted()) { else if (Feedback.isEnabled() && Feedback.isSubmitted()) {
return Promise.resolve({ return Promise.resolve({
showThankYou : true, thankYouDialogVisible : true,
feedbackSubmitted: true feedbackSubmitted: true
}); });
} }
@ -1047,15 +1047,16 @@ UI.requestFeedbackOnHangup = function () {
return new Promise(function (resolve) { return new Promise(function (resolve) {
if (Feedback.isEnabled()) { if (Feedback.isEnabled()) {
Feedback.openFeedbackWindow( Feedback.openFeedbackWindow(
(data) => { (options) => {
data.showThankYou = false; options.thankYouDialogVisible = false;
resolve(data); resolve(options);
}); });
} else { } else {
// If the feedback functionality isn't enabled we show a thank // If the feedback functionality isn't enabled we show a thank
// you dialog. Signaling it (true), so the caller // you dialog. Signaling it (true), so the caller
// of requestFeedback can act on it // of requestFeedback can act on it
resolve({showThankYou : true, feedbackSubmitted: false}); resolve(
{thankYouDialogVisible : true, feedbackSubmitted: false});
} }
}); });
}; };