|
|
@ -1061,15 +1061,20 @@ UI.updateDTMFSupport = function (isDTMFSupported) { |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Show user feedback dialog if its required or just show "thank you" dialog. |
|
|
|
* Show user feedback dialog if its required and enabled after pressing the |
|
|
|
* @returns {Promise} when dialog is closed. |
|
|
|
* hangup button. |
|
|
|
*/ |
|
|
|
* @returns {Promise} Resolved with value - false if the dialog is enabled and |
|
|
|
UI.requestFeedback = function () { |
|
|
|
* resolved with true if the dialog is disabled or the feedback was already |
|
|
|
|
|
|
|
* submitted. Rejected if another dialog is already displayed. This values are |
|
|
|
|
|
|
|
* used to display or not display the thank you dialog from
|
|
|
|
|
|
|
|
* conference.maybeRedirectToWelcomePage method. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
UI.requestFeedbackOnHangup = function () { |
|
|
|
if (Feedback.isVisible()) |
|
|
|
if (Feedback.isVisible()) |
|
|
|
return Promise.reject(UIErrors.FEEDBACK_REQUEST_IN_PROGRESS); |
|
|
|
return Promise.reject(UIErrors.FEEDBACK_REQUEST_IN_PROGRESS); |
|
|
|
// 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(true); |
|
|
|
else |
|
|
|
else |
|
|
|
return new Promise(function (resolve) { |
|
|
|
return new Promise(function (resolve) { |
|
|
|
if (Feedback.isEnabled()) { |
|
|
|
if (Feedback.isEnabled()) { |
|
|
@ -1077,10 +1082,10 @@ UI.requestFeedback = function () { |
|
|
|
// window and immidiately start the conference dispose timeout.
|
|
|
|
// window and immidiately start the conference dispose timeout.
|
|
|
|
if (Feedback.getFeedbackScore() > 0) { |
|
|
|
if (Feedback.getFeedbackScore() > 0) { |
|
|
|
Feedback.openFeedbackWindow(); |
|
|
|
Feedback.openFeedbackWindow(); |
|
|
|
resolve(); |
|
|
|
resolve(false); |
|
|
|
|
|
|
|
|
|
|
|
} else { // Otherwise we'll wait for user's feedback.
|
|
|
|
} else { // Otherwise we'll wait for user's feedback.
|
|
|
|
Feedback.openFeedbackWindow(resolve); |
|
|
|
Feedback.openFeedbackWindow(() => resolve(false)); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// If the feedback functionality isn't enabled we show a thank
|
|
|
|
// If the feedback functionality isn't enabled we show a thank
|
|
|
|