Browse Source

Adds an option for a hint message shown only to guests.

master
damencho 8 years ago
parent
commit
63aa60f2d6
2 changed files with 16 additions and 2 deletions
  1. 14
    2
      close.js
  2. 2
    0
      interface_config.js

+ 14
- 2
close.js View File

1
-/* global interfaceConfig */
1
+/* global interfaceConfig, getConfigParamsFromUrl */
2
 //list of tips
2
 //list of tips
3
 var hints = [
3
 var hints = [
4
     "You can pin participants by clicking on their thumbnails.",// jshint ignore:line
4
     "You can pin participants by clicking on their thumbnails.",// jshint ignore:line
32
     var el = document.getElementById(id);
32
     var el = document.getElementById(id);
33
 
33
 
34
     if (el)
34
     if (el)
35
-        el.innerText = msg;
35
+        el.innerHTML = msg;
36
 }
36
 }
37
 
37
 
38
 /**
38
 /**
42
     //Works only for close2.html because close.html doesn't have this element.
42
     //Works only for close2.html because close.html doesn't have this element.
43
     insertTextMsg('thanksMessage',
43
     insertTextMsg('thanksMessage',
44
         'Thank you for using ' + interfaceConfig.APP_NAME);
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
     insertTextMsg('hintMessage', getHint());
57
     insertTextMsg('hintMessage', getHint());
46
 }
58
 }
47
 
59
 

+ 2
- 0
interface_config.js View File

53
      * Whether to only show the filmstrip (and hide the toolbar).
53
      * Whether to only show the filmstrip (and hide the toolbar).
54
      */
54
      */
55
     filmStripOnly: false,
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
     RANDOM_AVATAR_URL_PREFIX: false,
58
     RANDOM_AVATAR_URL_PREFIX: false,
57
     RANDOM_AVATAR_URL_SUFFIX: false,
59
     RANDOM_AVATAR_URL_SUFFIX: false,
58
     FILM_STRIP_MAX_HEIGHT: 120,
60
     FILM_STRIP_MAX_HEIGHT: 120,

Loading…
Cancel
Save