Просмотр исходного кода

Merge pull request #924 from jitsi/add-close-page

Adds close page
j8
yanas 9 лет назад
Родитель
Сommit
06247266ad
6 измененных файлов: 48 добавлений и 9 удалений
  1. 8
    0
      close.html
  2. 21
    1
      conference.js
  3. 2
    0
      config.js
  4. 12
    0
      css/_close.scss
  5. 2
    0
      css/main.scss
  6. 3
    8
      modules/UI/UI.js

+ 8
- 0
close.html Просмотреть файл

1
+<html>
2
+<head>
3
+    <link rel="stylesheet" href="css/all.css"/>
4
+</head>
5
+<body>
6
+    <div class="closeMessage">Thank you for your feedback!</div>
7
+</body>
8
+</html>

+ 21
- 1
conference.js Просмотреть файл

202
 
202
 
203
 /**
203
 /**
204
  * Check if the welcome page is enabled and redirects to it.
204
  * Check if the welcome page is enabled and redirects to it.
205
+ * If requested show a thank you dialog before that.
206
+ * If we have a close page enabled, redirect to it without
207
+ * showing any other dialog.
208
+ * @param {boolean} showThankYou whether we should show a thank you dialog
205
  */
209
  */
206
-function maybeRedirectToWelcomePage() {
210
+function maybeRedirectToWelcomePage(showThankYou) {
211
+
212
+    // if close page is enabled redirect to it, without further action
213
+    if (config.enableClosePage) {
214
+        window.location.pathname = "close.html";
215
+        return;
216
+    }
217
+
218
+    if (showThankYou) {
219
+        APP.UI.messageHandler.openMessageDialog(
220
+            null, null, null,
221
+            APP.translation.translateString(
222
+                "dialog.thankYou", {appName:interfaceConfig.APP_NAME}
223
+            )
224
+        );
225
+    }
226
+
207
     if (!config.enableWelcomePage) {
227
     if (!config.enableWelcomePage) {
208
         return;
228
         return;
209
     }
229
     }

+ 2
- 0
config.js Просмотреть файл

56
     //disableAdaptiveSimulcast: false,
56
     //disableAdaptiveSimulcast: false,
57
     enableRecording: false,
57
     enableRecording: false,
58
     enableWelcomePage: true,
58
     enableWelcomePage: true,
59
+    //enableClosePage: false, // enabling the close page will ignore the welcome
60
+                              // page redirection when call is hangup
59
     disableSimulcast: false,
61
     disableSimulcast: false,
60
     logStats: false, // Enable logging of PeerConnection stats via the focus
62
     logStats: false, // Enable logging of PeerConnection stats via the focus
61
 //    requireDisplayName: true, // Forces the participants that doesn't have display name to enter it when they enter the room.
63
 //    requireDisplayName: true, // Forces the participants that doesn't have display name to enter it when they enter the room.

+ 12
- 0
css/_close.scss Просмотреть файл

1
+html, body {
2
+    width: 100%;
3
+    height:100%;
4
+    color: $defaultColor;
5
+    background: $defaultBackground;
6
+    text-align: center;
7
+}
8
+
9
+.closeMessage {
10
+    font-size: 36px;
11
+    margin-top: 20%;
12
+}

+ 2
- 0
css/main.scss Просмотреть файл

42
 @import 'device_settings_dialog';
42
 @import 'device_settings_dialog';
43
 @import 'jquery.contextMenu';
43
 @import 'jquery.contextMenu';
44
 @import 'keyboard-shortcuts';
44
 @import 'keyboard-shortcuts';
45
+@import 'close';
46
+
45
 
47
 
46
 /* Modules END */
48
 /* Modules END */

+ 3
- 8
modules/UI/UI.js Просмотреть файл

1130
                 }
1130
                 }
1131
             } else {
1131
             } else {
1132
                 // If the feedback functionality isn't enabled we show a thank
1132
                 // If the feedback functionality isn't enabled we show a thank
1133
-                // you dialog.
1134
-                messageHandler.openMessageDialog(
1135
-                    null, null, null,
1136
-                    APP.translation.translateString(
1137
-                        "dialog.thankYou", {appName:interfaceConfig.APP_NAME}
1138
-                    )
1139
-                );
1140
-                resolve();
1133
+                // you dialog. Signaling it (true), so the caller
1134
+                // of requestFeedback can act on it
1135
+                resolve(true);
1141
             }
1136
             }
1142
         });
1137
         });
1143
 };
1138
 };

Загрузка…
Отмена
Сохранить