From fb2fd12f3c935b5b097e4114ed43b207ba0265cf Mon Sep 17 00:00:00 2001 From: Richard Alam Date: Fri, 23 May 2014 19:33:27 -0700 Subject: [PATCH] - disable/enable chat for viewer when settings are changed --- .../bigbluebutton/main/model/users/BBBUser.as | 12 +++++------ .../modules/chat/views/ChatBox.mxml | 20 ++++++++++++------- 2 files changed, 18 insertions(+), 14 deletions(-) mode change 100644 => 100755 bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatBox.mxml diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/model/users/BBBUser.as b/bigbluebutton-client/src/org/bigbluebutton/main/model/users/BBBUser.as index 7b8efb00a4..1a0cebf3dc 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/main/model/users/BBBUser.as +++ b/bigbluebutton-client/src/org/bigbluebutton/main/model/users/BBBUser.as @@ -305,15 +305,13 @@ package org.bigbluebutton.main.model.users public function applyLockSettings():void { var lockSettings:LockSettingsVO = UserManager.getInstance().getConference().getLockSettings(); - disableMyCam = userLocked && lockSettings.getDisableCam(); - disableMyMic = userLocked && lockSettings.getDisableMic(); - disableMyPrivateChat = userLocked && lockSettings.getDisablePrivateChat(); - disableMyPublicChat = userLocked && lockSettings.getDisablePublicChat(); + disableMyCam = lockSettings.getDisableCam(); + disableMyMic = lockSettings.getDisableMic(); + disableMyPrivateChat = lockSettings.getDisablePrivateChat(); + disableMyPublicChat = lockSettings.getDisablePublicChat(); var dispatcher:Dispatcher = new Dispatcher(); - - var event:LockControlEvent = new LockControlEvent(LockControlEvent.CHANGED_LOCK_SETTINGS) - dispatcher.dispatchEvent(event); + dispatcher.dispatchEvent(new LockControlEvent(LockControlEvent.CHANGED_LOCK_SETTINGS)); //If it's sharing webcam, stop it if(disableMyCam && hasStream){ diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatBox.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatBox.mxml old mode 100644 new mode 100755 index 2f51c6a34d..73e8e5e69f --- a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatBox.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatBox.mxml @@ -67,12 +67,15 @@ with BigBlueButton; if not, see . . import org.bigbluebutton.modules.chat.events.SendPrivateChatMessageEvent; import org.bigbluebutton.modules.chat.events.SendPublicChatMessageEvent; import org.bigbluebutton.modules.chat.events.TranscriptEvent; - import org.bigbluebutton.modules.chat.model.ChatMessage; import org.bigbluebutton.modules.chat.model.ChatConversation; + import org.bigbluebutton.modules.chat.model.ChatMessage; import org.bigbluebutton.modules.chat.model.ChatOptions; import org.bigbluebutton.modules.chat.views.ChatMessageRenderer; import org.bigbluebutton.modules.chat.vo.ChatMessageVO; @@ -619,14 +622,17 @@ with BigBlueButton; if not, see . } private function lockSettingsChanged(e:Event):void { + + if (UsersUtil.amIModerator()) return; // Settings only affect viewers. + var userManager:UserManager = UserManager.getInstance(); var conference:Conference = userManager.getConference(); var me:BBBUser = conference.getMyUser(); - if(publicChat) { - sendBtn.enabled = !me.disableMyPublicChat; + if (publicChat) { + txtMsgArea.enabled = sendBtn.enabled = !me.disableMyPublicChat; } else { - sendBtn.enabled = !me.disableMyPrivateChat; + txtMsgArea.enabled = sendBtn.enabled = !me.disableMyPrivateChat; } } ]]>