- open guest window when new guest joins

This commit is contained in:
Richard Alam 2017-10-31 14:31:12 -07:00
parent e665f2ac6e
commit 9ef812707c
2 changed files with 19 additions and 31 deletions

View File

@ -162,7 +162,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
private var stoppedModules:ArrayCollection; private var stoppedModules:ArrayCollection;
private var logWindow:LogWindow; private var logWindow:LogWindow;
private var waitWindow:WaitingWindow = null; private var waitWindow:WaitingWindow = null;
private var guestWindow:PendingGuestsWindow = null;
private var scWindow:ShortcutHelpWindow; private var scWindow:ShortcutHelpWindow;
private var connectionLostWindow:ConnectionLostWindow; private var connectionLostWindow:ConnectionLostWindow;
@ -347,34 +346,25 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
} }
} }
private function closeGuestWindow(e:Event = null):void {
if(guestWindow != null) {
guestWindow.closeWindow();
guestWindow = null;
}
}
private function refreshGuestView(evt:NewGuestWaitingEvent):void { private function refreshGuestView(evt:NewGuestWaitingEvent):void {
LOGGER.debug("NewGuestWaitingEvent");
// do not show the guest window if the user isn't moderator or if he's waiting for acceptance // 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) { if (!UsersUtil.amIModerator() || UsersUtil.amIWaitingForAcceptance() && usersOptions.enableGuestUI) {
closeGuestWindow();
return; return;
} }
if (guestWindow == null) { LOGGER.debug("OPENING GUEST WINDOW");
guestWindow = PopUpUtil.createModalPopUp( mdiCanvas, PendingGuestsWindow, false) as PendingGuestsWindow; var guestWindow:PendingGuestsWindow = PopUpUtil.createModalPopUp( mdiCanvas, PendingGuestsWindow, false) as PendingGuestsWindow;
guestWindow.addEventListener(Event.CLOSE, closeGuestWindow);
guestWindow.x = systemManager.screen.width - guestWindow.width - 20; guestWindow.x = systemManager.screen.width - guestWindow.width - 20;
guestWindow.y = 20; guestWindow.y = 20;
}
guestWindow.refreshGuestView(); guestWindow.refreshGuestView();
} }
public function removeGuestWindow(evt:BBBEvent):void { public function removeGuestWindow(evt:BBBEvent):void {
if (guestWindow != null) { LOGGER.debug("REMOVE GUEST WINDOW");
guestWindow.remove(evt.payload.userId); //if (guestWindow != null) {
} // guestWindow.remove(evt.payload.userId);
//}
} }
private function closeWaitWindow(e:BBBEvent):void { private function closeWaitWindow(e:BBBEvent):void {

View File

@ -37,19 +37,17 @@ $Id: $
<fx:Script> <fx:Script>
<![CDATA[ <![CDATA[
import com.asfusion.mate.events.Dispatcher; import com.asfusion.mate.events.Dispatcher;
import mx.collections.ArrayCollection;
import mx.collections.ArrayCollection; import org.bigbluebutton.core.PopUpUtil;
import mx.managers.PopUpManager; import org.bigbluebutton.core.model.LiveMeeting;
import org.bigbluebutton.core.model.users.GuestWaiting;
import org.bigbluebutton.core.model.LiveMeeting; import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.core.model.users.GuestWaiting; import org.bigbluebutton.main.events.RemoveGuestEvent;
import org.bigbluebutton.main.events.BBBEvent; import org.bigbluebutton.main.events.RemoveGuestFromViewEvent;
import org.bigbluebutton.main.events.RemoveGuestEvent; import org.bigbluebutton.main.events.ResponseModeratorEvent;
import org.bigbluebutton.main.events.RemoveGuestFromViewEvent; import org.bigbluebutton.main.model.GuestPolicy;
import org.bigbluebutton.main.events.ResponseModeratorEvent; import org.bigbluebutton.util.i18n.ResourceUtil;
import org.bigbluebutton.main.model.GuestPolicy;
import org.bigbluebutton.util.i18n.ResourceUtil;
[Bindable] [Bindable]
private var guestUsers:ArrayCollection = new ArrayCollection(); private var guestUsers:ArrayCollection = new ArrayCollection();
@ -112,7 +110,7 @@ $Id: $
} }
public function closeWindow():void { public function closeWindow():void {
PopUpManager.removePopUp(this); PopUpUtil.removePopUp(this);
} }
]]> ]]>