Fix enable feedback button check

This commit is contained in:
yanas 2016-04-15 15:41:51 -05:00
parent 47a64190a6
commit 7ba8b0a24e
3 changed files with 10 additions and 12 deletions

View File

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

View File

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

View File

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