diff --git a/bigbluebutton-client/resources/config.xml.template b/bigbluebutton-client/resources/config.xml.template index facef78003..a05643a550 100644 --- a/bigbluebutton-client/resources/config.xml.template +++ b/bigbluebutton-client/resources/config.xml.template @@ -13,6 +13,8 @@ + diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/model/users/Conference.as b/bigbluebutton-client/src/org/bigbluebutton/main/model/users/Conference.as index a7471a6aec..b9fff7ea00 100644 --- a/bigbluebutton-client/src/org/bigbluebutton/main/model/users/Conference.as +++ b/bigbluebutton-client/src/org/bigbluebutton/main/model/users/Conference.as @@ -35,9 +35,11 @@ package org.bigbluebutton.main.model.users { public var avatarURL:String; public var voiceBridge:String; public var dialNumber:String; - [Bindable] public var record:Boolean; + [Bindable] public var record:Boolean; - private var lockSettings:LockSettingsVO; + private static const LOG:String = "main.model.users::Conference - "; + + private var lockSettings:LockSettingsVO; private var _myCamSettings:CameraSettingsVO = new CameraSettingsVO(); @@ -424,7 +426,12 @@ package org.bigbluebutton.main.model.users { public function configLockSettings():void { var config:Config = BBB.initConfigManager().config; - var allowModeratorLocking:Boolean, disableCam:Boolean, disableMic:Boolean, disablePrivateChat:Boolean, disablePublicChat:Boolean, lockedLayout:Boolean; + var allowModeratorLocking:Boolean, + disableCam:Boolean, + disableMic:Boolean, + disablePrivateChat:Boolean, + disablePublicChat:Boolean, + lockedLayout:Boolean; var lockConfig:XML; @@ -468,7 +475,11 @@ package org.bigbluebutton.main.model.users { lockedLayout = false; } + trace(LOG + " init lock settings from config"); + lockSettings = new LockSettingsVO(disableCam, disableMic, disablePrivateChat, disablePublicChat, lockedLayout); + + setLockSettings(lockSettings); } public function getMyUser():BBBUser { @@ -491,10 +502,14 @@ package org.bigbluebutton.main.model.users { public function setLockSettings(lockSettings:LockSettingsVO):void { this.lockSettings = lockSettings; + applyLockSettings(); + } + + public function applyLockSettings():void { for (var i:int = 0; i < users.length; i++) { var eachUser:BBBUser = users.getItemAt(i) as BBBUser; eachUser.applyLockSettings(); - } - } + } + } } } 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 100755 new mode 100644 index 9a82868ea0..ebe7360972 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatBox.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatBox.mxml @@ -67,15 +67,12 @@ with BigBlueButton; if not, see . . import org.bigbluebutton.modules.chat.vo.ChatMessageVO; import org.bigbluebutton.util.i18n.ResourceUtil; - + private static const LOG:String = "Chat::ChatBox - "; + public var publicChat:Boolean = false; public var chatWithUserID:String; public var chatWithUsername:String @@ -185,7 +183,8 @@ with BigBlueButton; if not, see . if(Capabilities.hasAccessibility) Accessibility.updateProperties(); - lockSettingsChanged(null); + trace(LOG + " onCreationComplete. Apply lock settings"); + applyLockSettings(); } private function focusChatBox(e:ShortcutEvent):void{ @@ -621,8 +620,12 @@ with BigBlueButton; if not, see . txtMsgArea.setFocus(); } - private function lockSettingsChanged(e:Event):void { - + private function lockSettingsChanged(e:Event):void { + applyLockSettings(); + } + + private function applyLockSettings():void { + if (UsersUtil.amIModerator() || UsersUtil.amIPresenter()) return; // Settings only affect viewers. var userManager:UserManager = UserManager.getInstance(); diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatWindow.mxml old mode 100755 new mode 100644 index 4f3cea984e..8f1b8615be --- a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatWindow.mxml @@ -53,6 +53,8 @@ with BigBlueButton; if not, see . import org.bigbluebutton.util.i18n.ResourceUtil; import org.bigbluebutton.common.LogUtil; + private static const LOG:String = "Chat::ChatWindow - "; + private var _xPosition:int; private var _yPosition:int; private var keyCombos:Object; diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/messaging/MessageReceiver.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/messaging/MessageReceiver.as old mode 100755 new mode 100644 index e2348037bd..b4f55795ba --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/messaging/MessageReceiver.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/messaging/MessageReceiver.as @@ -280,7 +280,7 @@ package org.bigbluebutton.modules.present.services.messaging } private function handleGetPresentationInfoReply(msg:Object) : void { - trace(LOG + "*** handleGetPresentationInfoReply " + msg.msg + " **** \n"); +// trace(LOG + "*** handleGetPresentationInfoReply " + msg.msg + " **** \n"); var map:Object = JSON.parse(msg.msg); var presenterMap:Object = map.presenter as Object; diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageReceiver.as b/bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageReceiver.as index 2038b603a8..44ad9b3444 100644 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageReceiver.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageReceiver.as @@ -376,6 +376,8 @@ package org.bigbluebutton.modules.users.services participantJoined(user); processUserVoice(user); } + + UserManager.getInstance().getConference().applyLockSettings(); } }