ソースを参照

Implements config property for disabling the prezi button

master
hristoterezov 10年前
コミット
ab4ba5a9c3
3個のファイルの変更17行の追加4行の削除
  1. 1
    0
      app.js
  2. 6
    4
      index.html
  3. 10
    0
      toolbar.js

+ 1
- 0
app.js ファイルの表示

@@ -60,6 +60,7 @@ var getVideoPosition;
60 60
 var sessionTerminated = false;
61 61
 
62 62
 function init() {
63
+    Toolbar.setupButtonsFromConfig();
63 64
     RTC = setupRTC();
64 65
     if (RTC === null) {
65 66
         window.location.href = 'webrtcrequired.html';

+ 6
- 4
index.html ファイルの表示

@@ -190,10 +190,12 @@
190 190
                         </a>
191 191
                         <span id="unreadMessages"></span>
192 192
                     </span>
193
-                    <div class="header_button_separator"></div>
194
-                    <a class="button" data-toggle="popover" data-placement="bottom" content="Share Prezi" onclick='Prezi.openPreziDialog();'>
195
-                        <i class="icon-prezi"></i>
196
-                    </a>
193
+                    <span id="prezi_button">
194
+                        <div class="header_button_separator"></div>
195
+                        <a class="button" data-toggle="popover" data-placement="bottom" content="Share Prezi" onclick='Prezi.openPreziDialog();'>
196
+                            <i class="icon-prezi"></i>
197
+                        </a>
198
+                    </span>
197 199
                     <span id="etherpadButton">
198 200
                         <div class="header_button_separator"></div>
199 201
                         <a class="button" data-toggle="popover" data-placement="bottom" content="Shared document" onclick='Etherpad.toggleEtherpad(0);'>

+ 10
- 0
toolbar.js ファイルの表示

@@ -1,5 +1,15 @@
1 1
 var Toolbar = (function (my) {
2 2
 
3
+    /**
4
+     * Disables and enables some of the buttons.
5
+     */
6
+    my.setupButtonsFromConfig = function () {
7
+        if(config.disablePrezi)
8
+        {
9
+            $("#prezi_button").css({display: "none"});
10
+        }
11
+    }
12
+
3 13
     /**
4 14
      * Opens the lock room dialog.
5 15
      */

読み込み中…
キャンセル
保存