Browse Source

Merge pull request #1219 from jitsi/guest-hint

Adds an option for guest only hint
j8
hristoterezov 8 years ago
parent
commit
cd03b29ece
5 changed files with 24 additions and 6 deletions
  1. 2
    1
      close.html
  2. 14
    2
      close.js
  3. 2
    1
      close2.html
  4. 4
    2
      conference.js
  5. 2
    0
      interface_config.js

+ 2
- 1
close.html View File

@@ -3,6 +3,7 @@
3 3
     <link rel="stylesheet" href="css/all.css"/>
4 4
     <!--#include virtual="title.html" -->
5 5
     <script><!--#include virtual="/interface_config.js" --></script>
6
+    <script src="utils.js?v=1"></script>
6 7
     <script src="close.js"></script>
7 8
 </head>
8 9
 <body>
@@ -12,7 +13,7 @@
12 13
     </div>
13 14
     <div class="hint-msg">
14 15
         <p>
15
-            <span>Did you know?</span>
16
+            <span id="hintQuestion">Did you know?</span>
16 17
             <span class="hint-msg__holder" id="hintMessage"></span>
17 18
         </p>
18 19
         <div class="happy-software"></div>

+ 14
- 2
close.js View File

@@ -1,4 +1,4 @@
1
-/* global interfaceConfig */
1
+/* global interfaceConfig, getConfigParamsFromUrl */
2 2
 //list of tips
3 3
 var hints = [
4 4
     "You can pin participants by clicking on their thumbnails.",// jshint ignore:line
@@ -32,7 +32,7 @@ function insertTextMsg(id, msg){
32 32
     var el = document.getElementById(id);
33 33
 
34 34
     if (el)
35
-        el.innerText = msg;
35
+        el.innerHTML = msg;
36 36
 }
37 37
 
38 38
 /**
@@ -42,6 +42,18 @@ function onLoad() {
42 42
     //Works only for close2.html because close.html doesn't have this element.
43 43
     insertTextMsg('thanksMessage',
44 44
         'Thank you for using ' + interfaceConfig.APP_NAME);
45
+
46
+    // If there is a setting show a special message only for the guests
47
+    if (interfaceConfig.CLOSE_PAGE_GUEST_HINT) {
48
+        let params = getConfigParamsFromUrl('search');
49
+        if ( params.guest ) {
50
+            var element = document.getElementById('hintQuestion');
51
+            element.classList.add('hide');
52
+            insertTextMsg('hintMessage', interfaceConfig.CLOSE_PAGE_GUEST_HINT);
53
+            return;
54
+        }
55
+    }
56
+
45 57
     insertTextMsg('hintMessage', getHint());
46 58
 }
47 59
 

+ 2
- 1
close2.html View File

@@ -3,6 +3,7 @@
3 3
     <link rel="stylesheet" href="css/all.css"/>
4 4
     <!--#include virtual="title.html" -->
5 5
     <script><!--#include virtual="/interface_config.js" --></script>
6
+    <script src="utils.js?v=1"></script>
6 7
     <script src="close.js"></script>
7 8
 </head>
8 9
 <body>
@@ -12,7 +13,7 @@
12 13
         </div>
13 14
         <div class="hint-msg">
14 15
             <p>
15
-                <span>Did you know?</span>
16
+                <span id="hintQuestion">Did you know?</span>
16 17
                 <span class="hint-msg__holder" id="hintMessage"></span>
17 18
             </p>
18 19
             <div class="happy-software"></div>

+ 4
- 2
conference.js View File

@@ -196,9 +196,11 @@ function maybeRedirectToWelcomePage(options) {
196 196
     // if close page is enabled redirect to it, without further action
197 197
     if (config.enableClosePage) {
198 198
         if (options.feedbackSubmitted)
199
-            window.location.pathname = "close.html";
199
+            window.location.pathname = "close.html?guest="
200
+                + APP.tokenData.isGuest;
200 201
         else
201
-            window.location.pathname = "close2.html";
202
+            window.location.pathname = "close2.html?guest="
203
+                + APP.tokenData.isGuest;
202 204
         return;
203 205
     }
204 206
 

+ 2
- 0
interface_config.js View File

@@ -53,6 +53,8 @@ var interfaceConfig = { // eslint-disable-line no-unused-vars
53 53
      * Whether to only show the filmstrip (and hide the toolbar).
54 54
      */
55 55
     filmStripOnly: false,
56
+    //A html text to be shown to guests on the close page, false disables it
57
+    CLOSE_PAGE_GUEST_HINT: false,
56 58
     RANDOM_AVATAR_URL_PREFIX: false,
57 59
     RANDOM_AVATAR_URL_SUFFIX: false,
58 60
     FILM_STRIP_MAX_HEIGHT: 120,

Loading…
Cancel
Save