Merge pull request #4644 from antobinary/guest-work
Guest Management - handle individual guests approv vs deny (client side improvements)
This commit is contained in:
commit
3dc6c183d6
@ -0,0 +1,14 @@
|
||||
package org.bigbluebutton.core.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
public class ClosePendingGuestWindow extends Event
|
||||
{
|
||||
public static const CLOSE_PENDING_GUEST_WINDOW: String = "CLOSE_PENDING_GUEST_WINDOW";
|
||||
|
||||
public function ClosePendingGuestWindow()
|
||||
{
|
||||
super(CLOSE_PENDING_GUEST_WINDOW, false, false);
|
||||
}
|
||||
}
|
||||
}
|
@ -73,6 +73,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
<mate:Listener type="{BBBEvent.WAITING_FOR_MODERATOR_ACCEPTANCE}" method="openWaitWindow" />
|
||||
<mate:Listener type="{BBBEvent.RECONNECT_DISCONNECTED_EVENT}" method="closeWaitWindow"/>
|
||||
<mate:Listener type="{RoundTripLatencyReceivedEvent.ROUND_TRIP_LATENCY_RECEIVED}" method="handleRoundTripLatencyReceivedEvent"/>
|
||||
<mate:Listener type="{ClosePendingGuestWindow.CLOSE_PENDING_GUEST_WINDOW}" method="handleClosePendingGuestWindow" />
|
||||
</fx:Declarations>
|
||||
<fx:Script>
|
||||
<![CDATA[
|
||||
@ -110,6 +111,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
import org.bigbluebutton.core.events.NewGuestWaitingEvent;
|
||||
import org.bigbluebutton.core.events.RoundTripLatencyReceivedEvent;
|
||||
import org.bigbluebutton.core.events.SwitchedLayoutEvent;
|
||||
import org.bigbluebutton.core.events.ClosePendingGuestWindow;
|
||||
import org.bigbluebutton.core.model.LiveMeeting;
|
||||
import org.bigbluebutton.core.vo.LockSettingsVO;
|
||||
import org.bigbluebutton.main.events.AppVersionEvent;
|
||||
import org.bigbluebutton.main.events.BBBEvent;
|
||||
@ -183,6 +186,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
private var resizeExecuting:Boolean = false;
|
||||
|
||||
private var _respTimer:ResponsivenessTimer;
|
||||
|
||||
private var guestWindow:PendingGuestsWindow;
|
||||
|
||||
public function getLogWindow() : LogWindow
|
||||
{
|
||||
@ -332,19 +337,30 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
}
|
||||
|
||||
private function refreshGuestView(evt:NewGuestWaitingEvent):void {
|
||||
LOGGER.debug("NewGuestWaitingEvent");
|
||||
LOGGER.debug("NewGuestWaitingEvent");
|
||||
// do not show the guest window if the user isn't moderator or if he's waiting for acceptance
|
||||
if (!UsersUtil.amIModerator() || UsersUtil.amIWaitingForAcceptance() && usersOptions.enableGuestUI) {
|
||||
return;
|
||||
}
|
||||
|
||||
LOGGER.debug("OPENING GUEST WINDOW");
|
||||
var guestWindow:PendingGuestsWindow = PopUpUtil.createModalPopUp( mdiCanvas, PendingGuestsWindow, false) as PendingGuestsWindow;
|
||||
var guestUsers:ArrayCollection = new ArrayCollection(LiveMeeting.inst().guestsWaiting.getGuests());
|
||||
|
||||
LOGGER.debug("OPENING GUEST WINDOW");
|
||||
if (guestWindow == null) {
|
||||
guestWindow = PopUpUtil.createModalPopUp( mdiCanvas, PendingGuestsWindow, false) as PendingGuestsWindow;
|
||||
guestWindow.x = systemManager.screen.width - guestWindow.width - 20;
|
||||
guestWindow.y = 20;
|
||||
}
|
||||
guestWindow.refreshGuestView();
|
||||
}
|
||||
|
||||
private function handleClosePendingGuestWindow(event: ClosePendingGuestWindow): void {
|
||||
if (guestWindow != null) {
|
||||
PopUpUtil.removePopUp(guestWindow);
|
||||
guestWindow = null;
|
||||
}
|
||||
}
|
||||
|
||||
public function removeGuestWindow(evt:BBBEvent):void {
|
||||
LOGGER.debug("REMOVE GUEST WINDOW");
|
||||
//if (guestWindow != null) {
|
||||
|
@ -32,6 +32,7 @@ $Id: $
|
||||
<fx:Declarations>
|
||||
<mate:Listener type="{BBBEvent.ACCEPT_ALL_WAITING_GUESTS}" method="acceptAllWaitingGuests" />
|
||||
<mate:Listener type="{BBBEvent.DENY_ALL_WAITING_GUESTS}" method="denyAllWaitingGuests" />
|
||||
<mate:Listener type="{GuestWaitingApprovedEvent.GUEST_WAITING_APPROVED}" method="handleGuestWaitingApprovedEvent" />
|
||||
<mate:Listener type="{RemoveGuestFromViewEvent.REMOVE_GUEST}" receive="{remove(event.userid)}" />
|
||||
</fx:Declarations>
|
||||
|
||||
@ -45,6 +46,8 @@ $Id: $
|
||||
import org.bigbluebutton.core.model.LiveMeeting;
|
||||
import org.bigbluebutton.core.model.users.GuestWaiting;
|
||||
import org.bigbluebutton.main.events.BBBEvent;
|
||||
import org.bigbluebutton.core.events.GuestWaitingApprovedEvent;
|
||||
import org.bigbluebutton.core.events.ClosePendingGuestWindow;
|
||||
import org.bigbluebutton.main.events.RemoveGuestEvent;
|
||||
import org.bigbluebutton.main.events.RemoveGuestFromViewEvent;
|
||||
import org.bigbluebutton.main.events.ResponseModeratorEvent;
|
||||
@ -90,6 +93,13 @@ $Id: $
|
||||
public function denyAllWaitingGuests(event:BBBEvent):void {
|
||||
sendResponseToAllGuests(false);
|
||||
}
|
||||
|
||||
private function handleGuestWaitingApprovedEvent(event: GuestWaitingApprovedEvent): void {
|
||||
refreshGuestView();
|
||||
if (guestUsers.length == 0) {
|
||||
closeWindow();
|
||||
}
|
||||
}
|
||||
|
||||
public function removeAllGuests():void {
|
||||
closeWindow();
|
||||
@ -108,7 +118,8 @@ $Id: $
|
||||
}
|
||||
|
||||
public function closeWindow():void {
|
||||
PopUpUtil.removePopUp(this);
|
||||
var event:ClosePendingGuestWindow = new ClosePendingGuestWindow();
|
||||
dispatcher.dispatchEvent(event);
|
||||
}
|
||||
|
||||
]]>
|
||||
|
Loading…
Reference in New Issue
Block a user