浏览代码

Fix enable feedback button check

master
yanas 9 年前
父节点
当前提交
7ba8b0a24e
共有 3 个文件被更改,包括 10 次插入12 次删除
  1. 7
    4
      modules/UI/Feedback.js
  2. 2
    2
      modules/UI/UI.js
  3. 1
    6
      modules/recorder/Recorder.js

+ 7
- 4
modules/UI/Feedback.js 查看文件

@@ -100,15 +100,18 @@ var Feedback = {
100 100
      * @param emitter the EventEmitter to associate with the Feedback.
101 101
      */
102 102
     init: function (emitter) {
103
-        // Initialise to enabled.
104
-        this.enabled = true;
105
-
106 103
         // CallStats is the way we send feedback, so we don't have to initialise
107 104
         // if callstats isn't enabled.
108 105
         if (!APP.conference.isCallstatsEnabled())
109 106
             return;
110 107
 
111
-        _showFeedbackButton(true);
108
+        // If enabled property is still undefined, i.e. it hasn't been set from
109
+        // some other module already, we set it to true by default.
110
+        if (typeof this.enabled == "undefined")
111
+            this.enabled = true;
112
+
113
+        _showFeedbackButton(this.enabled);
114
+
112 115
         $("#feedbackButton").click(function (event) {
113 116
             Feedback.openFeedbackWindow();
114 117
         });

+ 2
- 2
modules/UI/UI.js 查看文件

@@ -31,7 +31,6 @@ var Feedback = require("./Feedback");
31 31
 import FollowMe from "../FollowMe";
32 32
 import Recorder from "../recorder/Recorder";
33 33
 
34
-
35 34
 var eventEmitter = new EventEmitter();
36 35
 UI.eventEmitter = eventEmitter;
37 36
 
@@ -245,7 +244,7 @@ UI.initConference = function () {
245 244
     // Initialise the recorder handler. We're doing this explicitly before
246 245
     // calling showToolbar, because the recorder may want to disable all
247 246
     // toolbars.
248
-    new Recorder(APP.conference, UI);
247
+    new Recorder(APP.conference);
249 248
 
250 249
     // Once we've joined the muc show the toolbar
251 250
     ToolbarToggler.showToolbar();
@@ -260,6 +259,7 @@ UI.initConference = function () {
260 259
     UI.setUserAvatar(id, Settings.getEmail());
261 260
 
262 261
     Toolbar.checkAutoEnableDesktopSharing();
262
+
263 263
     if(!interfaceConfig.filmStripOnly) {
264 264
         Feedback.init(eventEmitter);
265 265
     }

+ 1
- 6
modules/recorder/Recorder.js 查看文件

@@ -27,14 +27,9 @@ class Recorder {
27 27
      *
28 28
      * @param conference the {conference} which is to transport
29 29
      * {Recorder}-related information between participants
30
-     * @param UI the {UI} which is the source (model/state) to be sent to
31
-     * remote participants if the local participant is the moderator or the
32
-     * destination (model/state) to receive from the remote moderator if the
33
-     * local participant is not the moderator
34 30
      */
35
-    constructor (conference, UI) {
31
+    constructor (conference) {
36 32
         this._conference = conference;
37
-        this._UI = UI;
38 33
 
39 34
         // If I am a recorder then I publish my recorder custom role to notify
40 35
         // everyone.

正在加载...
取消
保存