Browse Source

Renames variables.

j8
damencho 8 years ago
parent
commit
ae01275729
2 changed files with 13 additions and 11 deletions
  1. 7
    6
      conference.js
  2. 6
    5
      modules/UI/UI.js

+ 7
- 6
conference.js View File

185
  * If we have a close page enabled, redirect to it without
185
  * If we have a close page enabled, redirect to it without
186
  * showing any other dialog.
186
  * showing any other dialog.
187
  *
187
  *
188
- * @param {object} data Feedback data
189
- * @param {boolean} data.showThankYou - whether we should show thank you dialog
190
- * @param {boolean} data.feedbackSubmitted - whether feedback was submitted
188
+ * @param {object} options Feedback data
189
+ * @param {boolean} options.thankYouDialogVisible - whether we should
190
+ * show thank you dialog
191
+ * @param {boolean} options.feedbackSubmitted - whether feedback was submitted
191
  */
192
  */
192
-function maybeRedirectToWelcomePage(data) {
193
+function maybeRedirectToWelcomePage(options) {
193
     // if close page is enabled redirect to it, without further action
194
     // if close page is enabled redirect to it, without further action
194
     if (config.enableClosePage) {
195
     if (config.enableClosePage) {
195
-        if (data.feedbackSubmitted)
196
+        if (options.feedbackSubmitted)
196
             window.location.pathname = "close.html";
197
             window.location.pathname = "close.html";
197
         else
198
         else
198
             window.location.pathname = "close2.html";
199
             window.location.pathname = "close2.html";
200
     }
201
     }
201
 
202
 
202
     // else: show thankYou dialog only if there is no feedback
203
     // else: show thankYou dialog only if there is no feedback
203
-    if (data.showThankYou)
204
+    if (options.thankYouDialogVisible)
204
         APP.UI.messageHandler.openMessageDialog(
205
         APP.UI.messageHandler.openMessageDialog(
205
             null, "dialog.thankYou", {appName:interfaceConfig.APP_NAME});
206
             null, "dialog.thankYou", {appName:interfaceConfig.APP_NAME});
206
 
207
 

+ 6
- 5
modules/UI/UI.js View File

1039
     // Feedback has been submitted already.
1039
     // Feedback has been submitted already.
1040
     else if (Feedback.isEnabled() && Feedback.isSubmitted()) {
1040
     else if (Feedback.isEnabled() && Feedback.isSubmitted()) {
1041
         return Promise.resolve({
1041
         return Promise.resolve({
1042
-            showThankYou : true,
1042
+            thankYouDialogVisible : true,
1043
             feedbackSubmitted: true
1043
             feedbackSubmitted: true
1044
         });
1044
         });
1045
     }
1045
     }
1047
         return new Promise(function (resolve) {
1047
         return new Promise(function (resolve) {
1048
             if (Feedback.isEnabled()) {
1048
             if (Feedback.isEnabled()) {
1049
                 Feedback.openFeedbackWindow(
1049
                 Feedback.openFeedbackWindow(
1050
-                    (data) => {
1051
-                        data.showThankYou = false;
1052
-                        resolve(data);
1050
+                    (options) => {
1051
+                        options.thankYouDialogVisible = false;
1052
+                        resolve(options);
1053
                     });
1053
                     });
1054
             } else {
1054
             } else {
1055
                 // If the feedback functionality isn't enabled we show a thank
1055
                 // If the feedback functionality isn't enabled we show a thank
1056
                 // you dialog. Signaling it (true), so the caller
1056
                 // you dialog. Signaling it (true), so the caller
1057
                 // of requestFeedback can act on it
1057
                 // of requestFeedback can act on it
1058
-                resolve({showThankYou : true, feedbackSubmitted: false});
1058
+                resolve(
1059
+                    {thankYouDialogVisible : true, feedbackSubmitted: false});
1059
             }
1060
             }
1060
         });
1061
         });
1061
 };
1062
 };

Loading…
Cancel
Save