- display all users in the presentation dropdown
This commit is contained in:
parent
fb7a38eb52
commit
45f5a76da6
@ -135,9 +135,7 @@ package org.bigbluebutton.core.model.users
|
||||
var temp: Array = new Array();
|
||||
for (var i:int = 0; i < _users.length; i++) {
|
||||
var user:User2x = _users.getItemAt(i) as User2x;
|
||||
if (user.presenter) {
|
||||
temp.push(user.intId);
|
||||
}
|
||||
}
|
||||
|
||||
return new ArrayCollection(temp);
|
||||
|
@ -175,7 +175,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
[Bindable] private var currentPresenterUsername: String = "";
|
||||
|
||||
[Bindable]
|
||||
private var listOfPodControls:ArrayCollection = new ArrayCollection();
|
||||
private var listOfPodControls:Array = [];
|
||||
|
||||
private var downloadMenuData:Array;
|
||||
private var downloadMenu:Menu;
|
||||
@ -223,35 +223,42 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
}
|
||||
|
||||
private function handleUserAddedToPresenterGroupEvent(event: UserJoinedEvent): void {
|
||||
var nextPresenterId:String = event.userID;
|
||||
var userName:String = UsersUtil.getUserName(nextPresenterId);
|
||||
var myUser:Boolean = LiveMeeting.inst().me.id == nextPresenterId;
|
||||
if (nextPresenterId == this.currentPresenterInPod) {
|
||||
userName = "✓ " + userName;
|
||||
}
|
||||
if (myUser) {
|
||||
userName += ' (' + ResourceUtil.getInstance().getString('bbb.users.usersGrid.nameItemRenderer.youIdentifier') + ')'
|
||||
}
|
||||
if (!StringUtils.isEmpty(UsersUtil.getUserName(nextPresenterId))) { // avoid duplication
|
||||
listOfPodControls.addItem({label: userName, type: "user", handler: requestPodPresenterChange, data: nextPresenterId, styleName: myUser ? "podCurrentUser" : ""});
|
||||
}
|
||||
populatePodDropdown();
|
||||
|
||||
}
|
||||
|
||||
private function handleUserRemovedFromPresenterGroupEvent(event: UserLeftEvent): void {
|
||||
for (var i:int = 0; i < listOfPodControls.length; i++) {
|
||||
var presenter:Object = listOfPodControls.getItemAt(i);
|
||||
if (presenter.type == "user" && presenter.data == event.userID) {
|
||||
listOfPodControls.removeItemAt(i);
|
||||
}
|
||||
}
|
||||
populatePodDropdown();
|
||||
}
|
||||
|
||||
private function populatePodDropdown():void {
|
||||
this.currentPresenterUsername = UsersUtil.getUserName(this.currentPresenterInPod);
|
||||
dispatchEvent(new Event('titleChanged'));
|
||||
|
||||
listOfPodControls = [];
|
||||
listOfPodControls.push({label: ResourceUtil.getInstance().getString('bbb.presentation.multipod.controls.newPresentationWindowOpen'), type: "action", handler: newPresentationWindowHandler});
|
||||
if (this.podId != PresentationPodManager.DEFAULT_POD_ID) {
|
||||
listOfPodControls.push({label: ResourceUtil.getInstance().getString('bbb.presentation.multipod.controls.closePresentationWindowOpen'), type: "action", handler: closePresentationWindowHandler});
|
||||
}
|
||||
var presGroup:Array = ArrayUtils.getUniqueValues(UsersUtil.getPresenterGroup().source);
|
||||
if (presGroup.length > 0 || !StringUtils.isEmpty(currentPresenterUsername)) {
|
||||
listOfPodControls.push({type: "separator", label: StringUtil.repeat("─", Math.floor(ResourceUtil.getInstance().getString('bbb.presentation.multipod.controls.newPresentationWindowOpen').length / 2) + 2)});
|
||||
listOfPodControls.push({label: ResourceUtil.getInstance().getString('bbb.presentation.multipod.itemrenderer.presenter'), type: "title", styleName: "podItemTitle"});
|
||||
for (var j:int = 0; j < presGroup.length; j++) {
|
||||
var nextPresenterId:String = presGroup[j] as String;
|
||||
var userName:String = UsersUtil.getUserName(nextPresenterId);
|
||||
var myUser:Boolean = LiveMeeting.inst().me.id == nextPresenterId;
|
||||
if (nextPresenterId == this.currentPresenterInPod) {
|
||||
userName = "✓ " + userName;
|
||||
}
|
||||
if (myUser) {
|
||||
userName += ' (' + ResourceUtil.getInstance().getString('bbb.users.usersGrid.nameItemRenderer.youIdentifier') + ')'
|
||||
}
|
||||
if (!StringUtils.isEmpty(UsersUtil.getUserName(nextPresenterId))) { // avoid duplication
|
||||
listOfPodControls.push({label: userName, type: "user", handler: requestPodPresenterChange, data: nextPresenterId, styleName: myUser ? "podCurrentUser" : ""});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function podsSelectableFunction(item:*):Boolean {
|
||||
@ -364,7 +371,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
}
|
||||
setPollMenuData();
|
||||
|
||||
populatePresenterGroupDropDown();
|
||||
}
|
||||
|
||||
private function populatePresenterGroupDropDown():void {
|
||||
|
Loading…
Reference in New Issue
Block a user