From e81a10de4a45a107593f239748d53b9ea2da42a7 Mon Sep 17 00:00:00 2001 From: damencho Date: Tue, 1 Nov 2016 13:10:58 -0500 Subject: [PATCH 1/6] Reports to close callback whether feedback is submitted. --- modules/UI/feedback/FeedbackWindow.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/UI/feedback/FeedbackWindow.js b/modules/UI/feedback/FeedbackWindow.js index f6254557e..1bab72a0b 100644 --- a/modules/UI/feedback/FeedbackWindow.js +++ b/modules/UI/feedback/FeedbackWindow.js @@ -164,9 +164,7 @@ export default class Dialog { } setFeedbackMessage() { - let message = $('#feedbackTextArea').val(); - - this.feedbackMessage = message; + this.feedbackMessage = $('#feedbackTextArea').val(); } show(cb) { @@ -179,6 +177,8 @@ export default class Dialog { } onHide() { - this.onCloseCallback(this.feedbackScore, this.feedbackMessage); + this.onCloseCallback({ + feedbackSubmitted: this.submitted + }); } } From 87f7be2182c45f5162214b060fbc19d75cbfd306 Mon Sep 17 00:00:00 2001 From: damencho Date: Tue, 1 Nov 2016 13:13:07 -0500 Subject: [PATCH 2/6] Updates close page and adds a second one. Close pages text are different depending whether feedback was provided or not. --- close.html | 28 +++++++++++++++++++++++++--- close2.html | 32 ++++++++++++++++++++++++++++++++ css/_redirect_page.scss | 33 +++++++++++++++++++++++++++++++-- css/_variables.scss | 2 ++ 4 files changed, 90 insertions(+), 5 deletions(-) create mode 100644 close2.html diff --git a/close.html b/close.html index ec4302df9..48752e6e3 100644 --- a/close.html +++ b/close.html @@ -1,8 +1,30 @@ + + - -
Thank you for your feedback!
+ +
+
+

Thank you for your feedback!

+
+
+

+ Did you know? + +

+
+
+
- \ No newline at end of file + diff --git a/close2.html b/close2.html new file mode 100644 index 000000000..57db65936 --- /dev/null +++ b/close2.html @@ -0,0 +1,32 @@ + + + + + + + +
+
+

+
+
+

+ Did you know? + +

+
+
+
+ + diff --git a/css/_redirect_page.scss b/css/_redirect_page.scss index 5408762da..172e6dfe1 100644 --- a/css/_redirect_page.scss +++ b/css/_redirect_page.scss @@ -6,7 +6,36 @@ html, body { } .redirectPageMessage { + width: 30%; + margin: 20% auto; text-align: center; - font-size: 36px; - margin-top: 20%; + font-size: 24px; + + .thanks-msg { + border-bottom: 1px solid $defaultLightFontColor; + padding-left: 30px; + padding-right: 30px; + p { + margin: 30px auto; + font-size: 24px; + line-height: 24px; + } + } + .hint-msg{ + p { + margin: 26px auto; + font-weight: 600; + font-size: 16px; + line-height: 18px; + .hint-msg__holder{ + font-weight: 200; + } + } + .happy-software{ + width: 120px; + height: 86px; + margin: 0 auto; + background: $happySoftwareBackground; + } + } } diff --git a/css/_variables.scss b/css/_variables.scss index 421497793..8d1d5d517 100644 --- a/css/_variables.scss +++ b/css/_variables.scss @@ -92,6 +92,8 @@ $borderRadius: 4px; $defaultWatermarkLink: '../images/watermark.png'; $sidebarWidth: 200px; +$happySoftwareBackground: transparent; + /** * Z-indexes. TODO: Replace this by a function. */ From 5feeef0122984175e04f79c2429e8f8dab0b33d8 Mon Sep 17 00:00:00 2001 From: damencho Date: Tue, 1 Nov 2016 13:14:21 -0500 Subject: [PATCH 3/6] Handles data from feedback callback and use it for correct close page. --- conference.js | 30 +++++++++++++++++------------- modules/UI/UI.js | 24 ++++++++++++------------ 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/conference.js b/conference.js index b10f6c556..484497495 100644 --- a/conference.js +++ b/conference.js @@ -184,29 +184,33 @@ function muteLocalVideo (muted) { * If requested show a thank you dialog before that. * If we have a close page enabled, redirect to it without * showing any other dialog. - * @param {boolean} showThankYou whether we should show a thank you dialog + * + * @param {object} data Feedback data + * @param {boolean} data.showThankYou - whether we should show thank you dialog + * @param {boolean} data.feedbackSubmitted - whether feedback was submitted */ -function maybeRedirectToWelcomePage(showThankYou) { - +function maybeRedirectToWelcomePage(data) { // if close page is enabled redirect to it, without further action if (config.enableClosePage) { - window.location.pathname = "close.html"; + if (data.feedbackSubmitted) + window.location.pathname = "close.html"; + else + window.location.pathname = "close2.html"; return; } - if (showThankYou) { + // else: show thankYou dialog only if there is no feedback + if (data.showThankYou) APP.UI.messageHandler.openMessageDialog( null, "dialog.thankYou", {appName:interfaceConfig.APP_NAME}); - } - if (!config.enableWelcomePage) { - return; + // if Welcome page is enabled redirect to welcome page after 3 sec. + if (config.enableWelcomePage) { + setTimeout(() => { + APP.settings.setWelcomePageEnabled(true); + window.location.pathname = "/"; + }, 3000); } - // redirect to welcome page - setTimeout(() => { - APP.settings.setWelcomePageEnabled(true); - window.location.pathname = "/"; - }, 3000); } /** diff --git a/modules/UI/UI.js b/modules/UI/UI.js index f4cb07285..b33356d7e 100644 --- a/modules/UI/UI.js +++ b/modules/UI/UI.js @@ -1037,25 +1037,25 @@ UI.requestFeedbackOnHangup = function () { if (Feedback.isVisible()) return Promise.reject(UIErrors.FEEDBACK_REQUEST_IN_PROGRESS); // Feedback has been submitted already. - else if (Feedback.isEnabled() && Feedback.isSubmitted()) - return Promise.resolve(true); + else if (Feedback.isEnabled() && Feedback.isSubmitted()) { + return Promise.resolve({ + showThankYou : true, + feedbackSubmitted: true + }); + } else return new Promise(function (resolve) { if (Feedback.isEnabled()) { - // If the user has already entered feedback, we'll show the - // window and immidiately start the conference dispose timeout. - if (Feedback.getFeedbackScore() > 0) { - Feedback.openFeedbackWindow(); - resolve(false); - - } else { // Otherwise we'll wait for user's feedback. - Feedback.openFeedbackWindow(() => resolve(false)); - } + Feedback.openFeedbackWindow( + (data) => { + data.showThankYou = false; + resolve(data); + }); } else { // If the feedback functionality isn't enabled we show a thank // you dialog. Signaling it (true), so the caller // of requestFeedback can act on it - resolve(true); + resolve({showThankYou : true, feedbackSubmitted: false}); } }); }; From 7da8db74b01a13d31d6bff5905d60a7ea49ff40c Mon Sep 17 00:00:00 2001 From: damencho Date: Tue, 1 Nov 2016 13:25:05 -0500 Subject: [PATCH 4/6] Adds default title to static pages. --- 404.html | 1 + authError.html | 1 + close.html | 1 + close2.html | 1 + 4 files changed, 4 insertions(+) diff --git a/404.html b/404.html index fa4e220c8..e7ef4d0cc 100644 --- a/404.html +++ b/404.html @@ -1,6 +1,7 @@ +
diff --git a/authError.html b/authError.html index 1c3b27b45..19954d9f7 100644 --- a/authError.html +++ b/authError.html @@ -1,6 +1,7 @@ +
Sorry! You are not allowed to be here :(
diff --git a/close.html b/close.html index 48752e6e3..bc7226b80 100644 --- a/close.html +++ b/close.html @@ -1,6 +1,7 @@ +