add option to user gear menu to look up their directory data
This commit is contained in:
parent
827ac02a13
commit
d1e649189e
@ -3,7 +3,8 @@ package org.bigbluebutton.client
|
||||
import akka.actor.{Actor, ActorLogging, Props}
|
||||
import org.bigbluebutton.common2.msgs.BbbCommonEnvJsNodeMsg
|
||||
import org.bigbluebutton.common2.util.JsonUtil
|
||||
import org.bigbluebutton.client.endpoint.redis.MessageSender
|
||||
import org.bigbluebutton.client.endpoint.redis.MessageSender
|
||||
import org.bigbluebutton.common2.msgs.LookUpUserReqMsg
|
||||
|
||||
object MsgToRedisActor {
|
||||
def props(msgSender: MessageSender): Props =
|
||||
@ -19,7 +20,11 @@ class MsgToRedisActor(msgSender: MessageSender)
|
||||
|
||||
def handle(msg: BbbCommonEnvJsNodeMsg): Unit = {
|
||||
val json = JsonUtil.toJson(msg)
|
||||
msgSender.send(toAkkaAppsRedisChannel, json)
|
||||
|
||||
msg.envelope.name match {
|
||||
case LookUpUserReqMsg.NAME => msgSender.send(toThirdPartyRedisChannel, json)
|
||||
case _ => msgSender.send(toAkkaAppsRedisChannel, json)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -12,6 +12,8 @@ trait SystemConfiguration {
|
||||
|
||||
lazy val toAkkaAppsRedisChannel = Try(config.getString("redis.toAkkaAppsRedisChannel")).getOrElse("to-akka-apps-redis-channel")
|
||||
lazy val fromAkkaAppsRedisChannel = Try(config.getString("redis.fromAkkaAppsRedisChannel")).getOrElse("from-akka-apps-redis-channel")
|
||||
lazy val toThirdPartyRedisChannel = Try(config.getString("redis.toThirdPartyRedisChannel")).getOrElse("to-third-party-redis-channel")
|
||||
lazy val fromThirdPartyRedisChannel = Try(config.getString("redis.fromThirdPartyRedisChannel")).getOrElse("from-third-party-redis-channel")
|
||||
lazy val meetingManagerChannel = Try(config.getString("eventBus.meetingManagerChannel")).getOrElse("FOOOOOOOOO")
|
||||
lazy val fromAkkaAppsChannel = Try(config.getString("eventBus.fromAkkaAppsChannel")).getOrElse("from-akka-apps-channel")
|
||||
lazy val toRedisChannel = Try(config.getString("eventBus.toRedisChannel")).getOrElse("to-redis-channel")
|
||||
|
2
bbb-apps-common/src/main/scala/org/bigbluebutton/client/endpoint/redis/AppsRedisSubscriberActor.scala
Executable file → Normal file
2
bbb-apps-common/src/main/scala/org/bigbluebutton/client/endpoint/redis/AppsRedisSubscriberActor.scala
Executable file → Normal file
@ -15,7 +15,7 @@ import redis.api.servers.ClientSetname
|
||||
|
||||
object AppsRedisSubscriberActor extends SystemConfiguration {
|
||||
|
||||
val channels = Seq(fromAkkaAppsRedisChannel, fromAkkaAppsWbRedisChannel, fromAkkaAppsChatRedisChannel, fromAkkaAppsPresRedisChannel)
|
||||
val channels = Seq(fromAkkaAppsRedisChannel, fromAkkaAppsWbRedisChannel, fromAkkaAppsChatRedisChannel, fromAkkaAppsPresRedisChannel, fromThirdPartyRedisChannel)
|
||||
val patterns = Seq("bigbluebutton:from-bbb-apps:*")
|
||||
|
||||
def props(jsonMsgBus: JsonMsgFromAkkaAppsBus): Props =
|
||||
|
@ -0,0 +1,11 @@
|
||||
package org.bigbluebutton.common2.msgs
|
||||
|
||||
/* Sent straight to redis to look up a user's info */
|
||||
object LookUpUserReqMsg {val NAME = "LookUpUserReqMsg"}
|
||||
case class LookUpUserReqMsg(header: BbbCoreHeaderWithMeetingId, body: LookUpUserReqMsgBody) extends BbbCoreMsg
|
||||
case class LookUpUserReqMsgBody(externalUserId: String)
|
||||
|
||||
object LookUpUserRespMsg {val NAME = "LookUpUserRespMsg"}
|
||||
case class LookUpUserRespMsg(header: BbbCoreHeaderWithMeetingId, body: LookUpUserRespMsgBody) extends BbbCoreMsg
|
||||
case class LookUpUserRespMsgBody(userInfo: scala.collection.immutable.List[scala.collection.immutable.Map[String, Any]])
|
||||
/* ************************ */
|
1
bigbluebutton-client/branding/default/style/css/V2Theme.css
Executable file → Normal file
1
bigbluebutton-client/branding/default/style/css/V2Theme.css
Executable file → Normal file
@ -1948,6 +1948,7 @@ users|MediaItemRenderer {
|
||||
iconDemote : Embed(source="assets/swf/v2_skin.swf", symbol="Icon_User_Demote");
|
||||
iconPromote : Embed(source="assets/swf/v2_skin.swf", symbol="Icon_User_Promote");
|
||||
iconEject : Embed(source="assets/swf/v2_skin.swf", symbol="Icon_User_Eject");
|
||||
iconUserLookUp : Embed(source="assets/swf/v2_skin.swf", symbol="Icon_User_Moderator");
|
||||
glowFilterColor : #1070D7;
|
||||
verticalAlign : middle;
|
||||
horizontalGap : 2;
|
||||
|
5
bigbluebutton-client/locale/en_US/bbbResources.properties
Executable file → Normal file
5
bigbluebutton-client/locale/en_US/bbbResources.properties
Executable file → Normal file
@ -234,6 +234,7 @@ bbb.users.usersGrid.mediaItemRenderer.pushToUnlock = Unlock {0}
|
||||
bbb.users.usersGrid.mediaItemRenderer.addUserToPresenterGroup = Add {0} to presenter group
|
||||
bbb.users.usersGrid.mediaItemRenderer.removeUserFromPresenterGroup = Remove {0} from presenter group
|
||||
bbb.users.usersGrid.mediaItemRenderer.kickUser = Remove {0}
|
||||
bbb.users.usersGrid.mediaItemRenderer.userLookup = Directory Lookup
|
||||
bbb.users.usersGrid.mediaItemRenderer.webcam = Webcam shared
|
||||
bbb.users.usersGrid.mediaItemRenderer.micOff = Microphone off
|
||||
bbb.users.usersGrid.mediaItemRenderer.micOn = Microphone on
|
||||
@ -258,6 +259,10 @@ bbb.users.emojiStatus.speakSofter = Could you please speak softer?
|
||||
bbb.users.emojiStatus.speakFaster = Could you please speak faster?
|
||||
bbb.users.emojiStatus.speakSlower = Could you please speak slower?
|
||||
bbb.users.emojiStatus.beRightBack = I'll be right back
|
||||
bbb.userLookupWindow.title = Directory Lookup
|
||||
bbb.userLookupWindow.grid.accessibilityName = User information
|
||||
bbb.userLookupWindow.closeButton.label = Close
|
||||
bbb.userLookupWindow.closeButton.accessibilityName = Close User Lookup Window
|
||||
bbb.presentation.title = Presentation
|
||||
bbb.presentation.quickLink.label = Presentation Window
|
||||
bbb.presentation.fitToWidth.toolTip = Fit Presentation To Width
|
||||
|
1
bigbluebutton-client/resources/config.xml.template
Executable file → Normal file
1
bigbluebutton-client/resources/config.xml.template
Executable file → Normal file
@ -47,6 +47,7 @@
|
||||
moderatorUnmute="true"
|
||||
allowClearRecordingMarks="false"
|
||||
guestSoftMode="false"
|
||||
allowUserLookup="false"
|
||||
baseTabIndex="301"
|
||||
/>
|
||||
|
||||
|
9
bigbluebutton-client/src/org/bigbluebutton/main/model/users/UserService.as
Executable file → Normal file
9
bigbluebutton-client/src/org/bigbluebutton/main/model/users/UserService.as
Executable file → Normal file
@ -35,6 +35,7 @@ package org.bigbluebutton.main.model.users
|
||||
import org.bigbluebutton.core.events.VoiceConfEvent;
|
||||
import org.bigbluebutton.core.managers.ConnectionManager;
|
||||
import org.bigbluebutton.core.model.LiveMeeting;
|
||||
import org.bigbluebutton.core.model.users.User2x;
|
||||
import org.bigbluebutton.main.events.BBBEvent;
|
||||
import org.bigbluebutton.main.events.BreakoutRoomEvent;
|
||||
import org.bigbluebutton.main.events.LogoutEvent;
|
||||
@ -48,6 +49,7 @@ package org.bigbluebutton.main.model.users
|
||||
import org.bigbluebutton.main.model.users.events.ConferenceCreatedEvent;
|
||||
import org.bigbluebutton.main.model.users.events.EmojiStatusEvent;
|
||||
import org.bigbluebutton.main.model.users.events.KickUserEvent;
|
||||
import org.bigbluebutton.main.model.users.events.LookUpUserEvent;
|
||||
import org.bigbluebutton.main.model.users.events.RoleChangeEvent;
|
||||
import org.bigbluebutton.main.model.users.events.UsersConnectionEvent;
|
||||
import org.bigbluebutton.modules.users.events.MeetingMutedEvent;
|
||||
@ -358,5 +360,12 @@ package org.bigbluebutton.main.model.users
|
||||
public function updateWebcamsOnlyForModerator(command:SetWebcamsOnlyForModeratorEvent):void {
|
||||
sender.updateWebcamsOnlyForModerator(command.webcamsOnlyForModerator, UsersUtil.getMyUserID());
|
||||
}
|
||||
|
||||
public function lookUpUser(command:LookUpUserEvent):void {
|
||||
var user:User2x = UsersUtil.getUser(command.userId);
|
||||
if (user) {
|
||||
sender.lookUpUser(user.extId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,33 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 3.0 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License along
|
||||
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.bigbluebutton.main.model.users.events {
|
||||
import flash.events.Event;
|
||||
|
||||
public class LookUpUserEvent extends Event{
|
||||
public static const LOOK_UP_USER:String = "LOOK_UP_USER";
|
||||
|
||||
public var userId:String;
|
||||
|
||||
public function LookUpUserEvent(userId:String) {
|
||||
this.userId = userId;
|
||||
super(LOOK_UP_USER, true, false);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package org.bigbluebutton.main.model.users.events {
|
||||
import flash.events.Event;
|
||||
|
||||
public class LookUpUserResultEvent extends Event {
|
||||
public static const SHOW_WINDOW:String = "SHOW USER LOOKUP WINDOW";
|
||||
|
||||
public var userInfo:Array
|
||||
|
||||
public function LookUpUserResultEvent(userInfo:Array) {
|
||||
super(SHOW_WINDOW, false, false);
|
||||
|
||||
this.userInfo = userInfo;
|
||||
}
|
||||
}
|
||||
}
|
14
bigbluebutton-client/src/org/bigbluebutton/main/views/MainApplicationShell.mxml
Executable file → Normal file
14
bigbluebutton-client/src/org/bigbluebutton/main/views/MainApplicationShell.mxml
Executable file → Normal file
@ -55,7 +55,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
<mate:Listener type="{AudioSelectionWindowEvent.SHOW_AUDIO_SELECTION}" method="handleShowAudioSelectionWindowEvent" />
|
||||
<mate:Listener type="{ShareCameraRequestEvent.SHARE_CAMERA_REQUEST}" method="handleShareCameraRequestEvent" />
|
||||
<mate:Listener type="{ScreenshareSelectionWindowEvent.SHOW_WINDOW}" method="handleShowScreenshareSelection" />
|
||||
|
||||
<mate:Listener type="{LookUpUserResultEvent.SHOW_WINDOW}" method="handleShowLookUpUserResult" />
|
||||
|
||||
<mate:Listener type="{ToolbarButtonEvent.ADD}" method="handleAddToolbarComponent" />
|
||||
<mate:Listener type="{ToolbarButtonEvent.REMOVE}" method="handleRemoveToolbarComponent"/>
|
||||
<mate:Listener type="{ShortcutEvent.OPEN_SHORTCUT_WIN}" method="openShortcutHelpWindow" />
|
||||
@ -89,6 +90,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
import flash.events.TextEvent;
|
||||
import flash.utils.setTimeout;
|
||||
|
||||
import flexlib.mdi.effects.effectsLib.MDIVistaEffects;
|
||||
|
||||
import mx.binding.utils.ChangeWatcher;
|
||||
import mx.collections.ArrayCollection;
|
||||
import mx.core.FlexGlobals;
|
||||
@ -96,8 +99,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
import mx.core.UIComponent;
|
||||
import mx.events.FlexEvent;
|
||||
|
||||
import flexlib.mdi.effects.effectsLib.MDIVistaEffects;
|
||||
|
||||
import org.as3commons.lang.StringUtils;
|
||||
import org.as3commons.logging.api.ILogger;
|
||||
import org.as3commons.logging.api.getClassLogger;
|
||||
@ -135,6 +136,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
import org.bigbluebutton.main.model.options.LanguageOptions;
|
||||
import org.bigbluebutton.main.model.options.LayoutOptions;
|
||||
import org.bigbluebutton.main.model.users.events.ConferenceCreatedEvent;
|
||||
import org.bigbluebutton.main.model.users.events.LookUpUserResultEvent;
|
||||
import org.bigbluebutton.modules.phone.events.AudioSelectionWindowEvent;
|
||||
import org.bigbluebutton.modules.phone.events.FlashMicSettingsEvent;
|
||||
import org.bigbluebutton.modules.phone.events.WebRTCCallEvent;
|
||||
@ -145,6 +147,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
import org.bigbluebutton.modules.screenshare.view.components.ScreenshareSelectionWindow;
|
||||
import org.bigbluebutton.modules.users.model.UsersOptions;
|
||||
import org.bigbluebutton.modules.users.views.BreakoutRoomSettings;
|
||||
import org.bigbluebutton.modules.users.views.UserLookUpWindow;
|
||||
import org.bigbluebutton.modules.videoconf.events.ShareCameraRequestEvent;
|
||||
import org.bigbluebutton.util.browser.BrowserCheck;
|
||||
import org.bigbluebutton.util.i18n.ResourceUtil;
|
||||
@ -580,6 +583,11 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
PopUpUtil.createModalPopUp(FlexGlobals.topLevelApplication as DisplayObject, ScreenshareSelectionWindow, true);
|
||||
}
|
||||
|
||||
private function handleShowLookUpUserResult(event:LookUpUserResultEvent):void {
|
||||
var popup:UserLookUpWindow = PopUpUtil.createModalPopUp(FlexGlobals.topLevelApplication as DisplayObject, UserLookUpWindow, true) as UserLookUpWindow;
|
||||
popup.setUserInfo(event.userInfo);
|
||||
}
|
||||
|
||||
private function showbrowserPermissionHelper() : void {
|
||||
var browserPermissionHelper : BrowserPermissionHelper = PopUpUtil.createNonModalPopUp(FlexGlobals.topLevelApplication as DisplayObject, BrowserPermissionHelper, false) as BrowserPermissionHelper;
|
||||
if (browserPermissionHelper) {
|
||||
|
8
bigbluebutton-client/src/org/bigbluebutton/modules/users/maps/UsersMainEventMap.mxml
Executable file → Normal file
8
bigbluebutton-client/src/org/bigbluebutton/modules/users/maps/UsersMainEventMap.mxml
Executable file → Normal file
@ -43,8 +43,10 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
import org.bigbluebutton.main.model.users.events.ChangeRoleEvent;
|
||||
import org.bigbluebutton.main.model.users.events.EmojiStatusEvent;
|
||||
import org.bigbluebutton.main.model.users.events.KickUserEvent;
|
||||
import org.bigbluebutton.main.model.users.events.LookUpUserEvent;
|
||||
import org.bigbluebutton.main.model.users.events.RoleChangeEvent;
|
||||
<!--TODO: Move guest events to user events? -->
|
||||
|
||||
// TODO: Move guest events to user events?
|
||||
|
||||
|
||||
]]>
|
||||
@ -105,6 +107,10 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
<EventHandlers type="{KickUserEvent.KICK_USER}" >
|
||||
<MethodInvoker generator="{UserService}" method="kickUser" arguments="{event}" />
|
||||
</EventHandlers>
|
||||
|
||||
<EventHandlers type="{LookUpUserEvent.LOOK_UP_USER}" >
|
||||
<MethodInvoker generator="{UserService}" method="lookUpUser" arguments="{event}" />
|
||||
</EventHandlers>
|
||||
|
||||
<EventHandlers type="{BBBEvent.CHANGE_RECORDING_STATUS}">
|
||||
<MethodInvoker generator="{UserService}" method="changeRecordingStatus" arguments="{event}" />
|
||||
|
2
bigbluebutton-client/src/org/bigbluebutton/modules/users/model/UsersOptions.as
Executable file → Normal file
2
bigbluebutton-client/src/org/bigbluebutton/modules/users/model/UsersOptions.as
Executable file → Normal file
@ -45,6 +45,8 @@ package org.bigbluebutton.modules.users.model {
|
||||
|
||||
public var guestSoftMode:Boolean = false;
|
||||
|
||||
[Bindable]
|
||||
public var allowUserLookup:Boolean = false;
|
||||
|
||||
public function UsersOptions() {
|
||||
name = "UsersModule";
|
||||
|
19
bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageReceiver.as
Executable file → Normal file
19
bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageReceiver.as
Executable file → Normal file
@ -22,6 +22,9 @@ package org.bigbluebutton.modules.users.services
|
||||
|
||||
import flash.utils.setTimeout;
|
||||
|
||||
import mx.controls.Alert;
|
||||
import mx.utils.ObjectUtil;
|
||||
|
||||
import org.as3commons.logging.api.ILogger;
|
||||
import org.as3commons.logging.api.getClassLogger;
|
||||
import org.bigbluebutton.common.toaster.Toaster;
|
||||
@ -29,6 +32,7 @@ package org.bigbluebutton.modules.users.services
|
||||
import org.bigbluebutton.common.toaster.message.ToastType;
|
||||
import org.bigbluebutton.core.BBB;
|
||||
import org.bigbluebutton.core.EventConstants;
|
||||
import org.bigbluebutton.core.PopUpUtil;
|
||||
import org.bigbluebutton.core.TimerUtil;
|
||||
import org.bigbluebutton.core.UsersUtil;
|
||||
import org.bigbluebutton.core.events.BreakoutRoomsUsersListUpdatedEvent;
|
||||
@ -55,6 +59,7 @@ package org.bigbluebutton.modules.users.services
|
||||
import org.bigbluebutton.main.model.users.BreakoutRoom;
|
||||
import org.bigbluebutton.main.model.users.IMessageListener;
|
||||
import org.bigbluebutton.main.model.users.events.ChangeMyRole;
|
||||
import org.bigbluebutton.main.model.users.events.LookUpUserResultEvent;
|
||||
import org.bigbluebutton.main.model.users.events.StreamStartedEvent;
|
||||
import org.bigbluebutton.main.model.users.events.StreamStoppedEvent;
|
||||
import org.bigbluebutton.modules.phone.events.AudioSelectionWindowEvent;
|
||||
@ -141,6 +146,9 @@ package org.bigbluebutton.modules.users.services
|
||||
break;
|
||||
case "UserEmojiChangedEvtMsg":
|
||||
handleEmojiStatusHand(message);
|
||||
break;
|
||||
case "LookUpUserRespMsg":
|
||||
handleLookUpUserRespMsg(message);
|
||||
break;
|
||||
case "UpdateRecordingTimerEvtMsg":
|
||||
handleUpdateRecordingTimer(message);
|
||||
@ -769,6 +777,17 @@ package org.bigbluebutton.modules.users.services
|
||||
|
||||
}
|
||||
|
||||
private function handleLookUpUserRespMsg(msg:Object):void {
|
||||
// This message is coming from outside so checks need to be more thorough
|
||||
var body:Object = msg.body as Object;
|
||||
if (body) {
|
||||
var userInfo:Array = body.userInfo as Array;
|
||||
if (userInfo) {
|
||||
dispatcher.dispatchEvent(new LookUpUserResultEvent(userInfo));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function handleUpdateRecordingTimer(msg:Object):void {
|
||||
if (msg.body.time > 0) {
|
||||
TimerUtil.recordingTimeReceived = true;
|
||||
|
16
bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageSender.as
Executable file → Normal file
16
bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageSender.as
Executable file → Normal file
@ -489,6 +489,22 @@ package org.bigbluebutton.modules.users.services
|
||||
LOGGER.info(JSON.stringify(logData));
|
||||
}, message);
|
||||
}
|
||||
|
||||
public function lookUpUser(externalUserId:String):void {
|
||||
var message:Object = {
|
||||
header: {name: "LookUpUserReqMsg", meetingId: UsersUtil.getInternalMeetingID(), userId: UsersUtil.getMyUserID()},
|
||||
body: {externalUserId: externalUserId}
|
||||
};
|
||||
|
||||
var _nc:ConnectionManager = BBB.initConnectionManager();
|
||||
_nc.sendMessage2x(function(result:String):void { // On successful result
|
||||
}, function(status:String):void { // status - On error occurred
|
||||
var logData:Object = UsersUtil.initLogData();
|
||||
logData.tags = ["apps"];
|
||||
logData.logCode = "error_sending_look_up_user";
|
||||
LOGGER.info(JSON.stringify(logData));
|
||||
}, message);
|
||||
}
|
||||
|
||||
public function addUserToPresenterGroup(userID:String):void {
|
||||
var message:Object = {
|
||||
|
65
bigbluebutton-client/src/org/bigbluebutton/modules/users/views/MediaItemRenderer.mxml
Executable file → Normal file
65
bigbluebutton-client/src/org/bigbluebutton/modules/users/views/MediaItemRenderer.mxml
Executable file → Normal file
@ -49,11 +49,13 @@
|
||||
import org.bigbluebutton.core.events.LockControlEvent;
|
||||
import org.bigbluebutton.core.events.VoiceConfEvent;
|
||||
import org.bigbluebutton.core.model.LiveMeeting;
|
||||
import org.bigbluebutton.core.model.users.User2x;
|
||||
import org.bigbluebutton.core.vo.LockSettingsVO;
|
||||
import org.bigbluebutton.main.events.BBBEvent;
|
||||
import org.bigbluebutton.main.model.users.events.ChangeMyRole;
|
||||
import org.bigbluebutton.main.model.users.events.ChangeRoleEvent;
|
||||
import org.bigbluebutton.main.model.users.events.KickUserEvent;
|
||||
import org.bigbluebutton.main.model.users.events.LookUpUserEvent;
|
||||
import org.bigbluebutton.modules.users.events.UsersRollEvent;
|
||||
import org.bigbluebutton.modules.users.events.ViewCameraEvent;
|
||||
import org.bigbluebutton.modules.users.model.UsersOptions;
|
||||
@ -100,26 +102,24 @@
|
||||
}
|
||||
|
||||
private function onRollOver(e:UsersRollEvent):void{
|
||||
if ((moderator || UsersUtil.isMe(e.userID)) && (e.userID == data.userId)) {
|
||||
if (!rolledOver && e.userID == data.userId) {
|
||||
rolledOver = true;
|
||||
updateButtons();
|
||||
}
|
||||
}
|
||||
|
||||
private function onRollOut(e:UsersRollEvent):void{
|
||||
if ((moderator || UsersUtil.isMe(e.userID)) && rolledOver) {
|
||||
if (rolledOver) {
|
||||
rolledOver = false;
|
||||
updateButtons();
|
||||
}
|
||||
}
|
||||
|
||||
private function onChangeMyRole(e:ChangeMyRole):void {
|
||||
rolledOver = false;
|
||||
refreshRole(e.role == Role.MODERATOR);
|
||||
updateButtons();
|
||||
// close the menu if it was opened
|
||||
closeActionsMenu();
|
||||
|
||||
refreshRole(e.role == Role.MODERATOR);
|
||||
}
|
||||
|
||||
private function onChangeWebcamsOnlyForModerator(e:BBBEvent):void {
|
||||
@ -131,7 +131,9 @@
|
||||
}
|
||||
|
||||
private function refreshRole(amIModerator:Boolean):void {
|
||||
lockBtn.enabled = settingsBtn.enabled = moderator = amIModerator;
|
||||
moderator = amIModerator;
|
||||
lockBtn.enabled = moderator;
|
||||
settingsBtn.enabled = moderator || options.allowUserLookup;
|
||||
}
|
||||
|
||||
private function muteMouseOverHandler():void {
|
||||
@ -167,6 +169,12 @@
|
||||
dispatchEvent(new KickUserEvent(data.userId));
|
||||
}
|
||||
}
|
||||
|
||||
private function lookUpUser():void {
|
||||
if (options.allowUserLookup) {
|
||||
dispatchEvent(new LookUpUserEvent(data.userId));
|
||||
}
|
||||
}
|
||||
|
||||
private function toggleMuteState():void {
|
||||
var e:VoiceConfEvent = new VoiceConfEvent(VoiceConfEvent.MUTE_USER);
|
||||
@ -196,8 +204,7 @@
|
||||
var amIMod:Boolean = UsersUtil.amIModerator();
|
||||
|
||||
if (data != null) {
|
||||
var allowModeratorToSeeOwnSettings: Boolean = !data.me || (data.me && UsersUtil.amIModerator());
|
||||
settingsBtn.visible = rolledOver && allowModeratorToSeeOwnSettings && !UsersUtil.isBreakout();
|
||||
settingsBtn.visible = rolledOver && !UsersUtil.isBreakout() && (amIMod || options.allowUserLookup);
|
||||
|
||||
if ( !data.inVoiceConf || ( options.moderatorUnmute == false && amIMod && !UsersUtil.isMe(data.userId) ) ) {
|
||||
muteImg.visible = false;
|
||||
@ -339,27 +346,37 @@
|
||||
if (data != null) {
|
||||
var actionsMenuData:Array = [];
|
||||
|
||||
if (data.role != Role.VOICE_ONLY) {
|
||||
if (data.role == Role.MODERATOR) {
|
||||
if (moderator && !data.me) {
|
||||
if (data.role != Role.VOICE_ONLY) {
|
||||
if (data.role == Role.MODERATOR) {
|
||||
actionsMenuData.push({
|
||||
label: ResourceUtil.getInstance().getString('bbb.users.usersGrid.mediaItemRenderer.demoteUser',[data.name]),
|
||||
icon: getStyle('iconDemote'),
|
||||
callback: demoteUser
|
||||
});
|
||||
} else if (!data.guest && data.role == Role.VIEWER){
|
||||
actionsMenuData.push({
|
||||
label: ResourceUtil.getInstance().getString('bbb.users.usersGrid.mediaItemRenderer.promoteUser',[data.name]),
|
||||
icon: getStyle('iconPromote'),
|
||||
callback: promoteUser
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (options.allowKickUser) {
|
||||
actionsMenuData.push({
|
||||
label: ResourceUtil.getInstance().getString('bbb.users.usersGrid.mediaItemRenderer.demoteUser',[data.name]),
|
||||
icon: getStyle('iconDemote'),
|
||||
callback: demoteUser
|
||||
});
|
||||
} else if (!data.guest && data.role == Role.VIEWER){
|
||||
actionsMenuData.push({
|
||||
label: ResourceUtil.getInstance().getString('bbb.users.usersGrid.mediaItemRenderer.promoteUser',[data.name]),
|
||||
icon: getStyle('iconPromote'),
|
||||
callback: promoteUser
|
||||
label: ResourceUtil.getInstance().getString('bbb.users.usersGrid.mediaItemRenderer.kickUser',[data.name]),
|
||||
icon: getStyle('iconEject'),
|
||||
callback: kickUser
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (options.allowKickUser) {
|
||||
|
||||
if (options.allowUserLookup) {
|
||||
actionsMenuData.push({
|
||||
label: ResourceUtil.getInstance().getString('bbb.users.usersGrid.mediaItemRenderer.kickUser',[data.name]),
|
||||
icon: getStyle('iconEject'),
|
||||
callback: kickUser
|
||||
label: ResourceUtil.getInstance().getString('bbb.users.usersGrid.mediaItemRenderer.userLookup'),
|
||||
icon: getStyle('iconUserLookUp'),
|
||||
callback: lookUpUser
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
|
||||
BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
|
||||
Copyright (c) 2018 BigBlueButton Inc. and by respective authors (see below).
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under the
|
||||
terms of the GNU Lesser General Public License as published by the Free Software
|
||||
Foundation; either version 3.0 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License along
|
||||
with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
-->
|
||||
<mx:TitleWindow xmlns:mx="library://ns.adobe.com/flex/mx"
|
||||
xmlns:fx="http://ns.adobe.com/mxml/2009"
|
||||
xmlns:mate="http://mate.asfusion.com/"
|
||||
xmlns:common="org.bigbluebutton.common.*"
|
||||
xmlns:views="org.bigbluebutton.main.views.*"
|
||||
implements="org.bigbluebutton.common.IKeyboardClose"
|
||||
show="this.setFocus()"
|
||||
layout="absolute"
|
||||
width="300"
|
||||
verticalScrollPolicy="off"
|
||||
horizontalScrollPolicy="off"
|
||||
showCloseButton="false">
|
||||
|
||||
<fx:Script>
|
||||
<![CDATA[
|
||||
import mx.collections.ArrayCollection;
|
||||
|
||||
import org.bigbluebutton.core.PopUpUtil;
|
||||
import org.bigbluebutton.util.i18n.ResourceUtil;
|
||||
|
||||
[Bindable]
|
||||
private var _userInfo:ArrayCollection = new ArrayCollection();
|
||||
|
||||
public function setUserInfo(userInfo:Array):void {
|
||||
trace("setting user info");
|
||||
for each (var item:Object in userInfo) {
|
||||
trace("checking item");
|
||||
for(var id:String in item) {
|
||||
trace("item key: " + id + ", value: " + item[id]);
|
||||
_userInfo.addItem({"property": id, "value": item[id]});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function onCancelClicked():void {
|
||||
PopUpUtil.removePopUp(this);
|
||||
}
|
||||
]]>
|
||||
</fx:Script>
|
||||
|
||||
<mx:VBox width="100%" height="100%" paddingBottom="10" paddingLeft="10" paddingRight="10" paddingTop="10" horizontalAlign="center">
|
||||
<common:AdvancedLabel id="windowTitle"
|
||||
text="{ResourceUtil.getInstance().getString('bbb.userLookupWindow.title')}"
|
||||
styleName="titleWindowStyle"
|
||||
maxWidth="{this.width - 40}" />
|
||||
<views:BBBDataGrid id="infoGrid" dataProvider="{_userInfo}" editable="false" sortableColumns="false"
|
||||
dragEnabled="false" width="100%" draggableColumns="false" styleName="pollVotesDataGridStyle"
|
||||
showHeaders="false"
|
||||
accessibilityName="{ResourceUtil.getInstance().getString('bbb.userLookupWindow.grid.accessibilityName')}" >
|
||||
<views:columns>
|
||||
<mx:DataGridColumn dataField="property" editable="false" sortable="false" />
|
||||
<mx:DataGridColumn dataField="value" editable="false" sortable="false" />
|
||||
</views:columns>
|
||||
</views:BBBDataGrid>
|
||||
<mx:HBox width="100%" horizontalAlign="right">
|
||||
<mx:Button id="closeButton" click="onCancelClicked()" label="{ResourceUtil.getInstance().getString('bbb.userLookupWindow.closeButton.label')}"
|
||||
accessibilityName="{ResourceUtil.getInstance().getString('bbb.userLookupWindow.closeButton.accessibilityName')}" />
|
||||
</mx:HBox>
|
||||
</mx:VBox>
|
||||
|
||||
</mx:TitleWindow>
|
Loading…
Reference in New Issue
Block a user