diff --git a/bigbluebutton-client/branding/default/style/css/BBBDefault.css b/bigbluebutton-client/branding/default/style/css/BBBDefault.css index fdda4d8cc1..c01fee75e8 100755 --- a/bigbluebutton-client/branding/default/style/css/BBBDefault.css +++ b/bigbluebutton-client/branding/default/style/css/BBBDefault.css @@ -1043,6 +1043,11 @@ PollChoicesModal { fontFamily: Arial; } +.chatMessageListStyle { + rollOverColor: #ffffff; + selectionColor: #f3f3f3; +} + EmojiGrid { backgroundColor: #ffffff; horizontalAlign: center; diff --git a/bigbluebutton-client/resources/prod/lib/3rd-party.js b/bigbluebutton-client/resources/prod/lib/3rd-party.js index b9ac5e738f..b60b84af62 100755 --- a/bigbluebutton-client/resources/prod/lib/3rd-party.js +++ b/bigbluebutton-client/resources/prod/lib/3rd-party.js @@ -29,20 +29,24 @@ var registerListeners = function() { console.log("AmISharingCamQueryResponse [isPublishing=" + bbbEvent2.isPublishing + ",camIndex=" + bbbEvent2.camIndex + "]"); }); BBB.amISharingWebcam(); + BBB.amISharingWebcam(function(bbbEvent3) { - console.log("amISharingWebcam [isPublishing=" + bbbEvent3.isPublishing - + ",camIndex=" + bbbEvent3.camIndex - + ",camWidth=" + bbbEvent3.camWidth - + ",camHeight=" + bbbEvent3.camHeight - + ",camKeyFrameInterval=" + bbbEvent3.camKeyFrameInterval - + ",camModeFps=" + bbbEvent3.camModeFps - + ",camQualityBandwidth=" + bbbEvent3.camQualityBandwidth - + ",camQualityPicture=" + bbbEvent3.camQualityPicture - + "]"); - if (bbbEvent3.isPublishing) { - CAM_PREVIEW.stopPreviewCamera(bbbEvent3.avatarURL); - CAM_PREVIEW.previewCamera(bbbEvent3.camIndex, bbbEvent3.camWidth, bbbEvent3.camHeight, bbbEvent3.camKeyFrameInterval, - bbbEvent3.camModeFps, bbbEvent3.camQualityBandwidth, bbbEvent3.camQualityPicture, bbbEvent3.avatarURL); + var cameras = bbbEvent3.cameras; + for(var aCamera in cameras){ + console.log("amISharingWebcam [isPublishing=" + aCamera.isPublishing + + ",camIndex=" + aCamera.camIndex + + ",camWidth=" + aCamera.camWidth + + ",camHeight=" + aCamera.camHeight + + ",camKeyFrameInterval=" + aCamera.camKeyFrameInterval + + ",camModeFps=" + aCamera.camModeFps + + ",camQualityBandwidth=" + aCamera.camQualityBandwidth + + ",camQualityPicture=" + aCamera.camQualityPicture + + "]"); + if (aCamera.isPublishing) { + CAM_PREVIEW.stopPreviewCamera(aCamera.avatarURL); + CAM_PREVIEW.previewCamera(aCamera.camIndex, aCamera.camWidth, aCamera.camHeight, aCamera.camKeyFrameInterval, + aCamera.camModeFps, aCamera.camQualityBandwidth, aCamera.camQualityPicture, aCamera.avatarURL); + } } }); } else { diff --git a/bigbluebutton-client/src/org/bigbluebutton/common/events/DragWindowEvent.as b/bigbluebutton-client/src/org/bigbluebutton/common/events/DragWindowEvent.as deleted file mode 100755 index 32ddd0b0e9..0000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/common/events/DragWindowEvent.as +++ /dev/null @@ -1,44 +0,0 @@ -/** -* 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 . -* -*/ -package org.bigbluebutton.common.events -{ - import flash.events.Event; - import flash.geom.Point; - import mx.core.UIComponent; - import flexlib.mdi.containers.*; - - public class DragWindowEvent extends Event - { - public static const DRAG_WINDOW_EVENT:String = "DRAG_WINDOW_EVENT"; - public static const DRAG_START:String = "DRAG_START"; - public static const DRAG_END:String = "DRAG_END"; - public static const DRAG:String = "DRAG"; - - public var mouseGlobal:Point; - public var window:MDIWindow; - public var mode:String; - - public function DragWindowEvent(mode:String, type:String = DRAG_WINDOW_EVENT) - { - super(type, true, false); - this.mode = mode; - } - - } -} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/core/PopUpUtil.as b/bigbluebutton-client/src/org/bigbluebutton/core/PopUpUtil.as new file mode 100644 index 0000000000..d500bd937b --- /dev/null +++ b/bigbluebutton-client/src/org/bigbluebutton/core/PopUpUtil.as @@ -0,0 +1,92 @@ +/** + * BigBlueButton open source conferencing system - http://www.bigbluebutton.org/ + * + * Copyright (c) 2017 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 . + * + */ +package org.bigbluebutton.core { + import flash.display.DisplayObject; + import flash.utils.Dictionary; + import flash.utils.getQualifiedClassName; + + import mx.core.FlexGlobals; + import mx.core.IChildList; + import mx.core.IFlexDisplayObject; + import mx.core.IUIComponent; + import mx.managers.PopUpManager; + import mx.managers.SystemManager; + + import org.as3commons.logging.api.ILogger; + import org.as3commons.logging.api.getClassLogger; + + public final class PopUpUtil { + + private static const LOGGER:ILogger = getClassLogger(PopUpUtil); + + private static var popUpDict:Dictionary = new Dictionary(true); + + public static function createNonModelPopUp(parent:DisplayObject, className:Class, center:Boolean = true):IFlexDisplayObject { + if (!checkPopUpExists(className)) { + return addPopUpToStage(parent, className, false, center); + } + return null; + } + + public static function createModalPopUp(parent:DisplayObject, className:Class, center:Boolean = true):IFlexDisplayObject { + if (!checkPopUpExists(className)) { + return addPopUpToStage(parent, className, true, center); + } + return null; + } + + public static function removePopUp(classOrInstance:*):void { + var fqcn:String = getQualifiedClassName(classOrInstance); + if (popUpDict[fqcn] != undefined) { + PopUpManager.removePopUp(popUpDict[fqcn]) + delete popUpDict[fqcn]; + LOGGER.debug("Removed PopUp with type [{0}]", [fqcn]); + } + } + + private static function checkPopUpExists(className:Class):Boolean { + LOGGER.debug("Checking if [{0}] exists as a PopUp", [className]); + var systemManager:SystemManager = FlexGlobals.topLevelApplication.systemManager; + + var childList:IChildList = systemManager.rawChildren; + for (var i:int = childList.numChildren - 1; i >= 0; i--) { + var childObject:IUIComponent = childList.getChildAt(i) as IUIComponent; + // PopUp already exists + if (childObject is className && childObject.isPopUp) { + LOGGER.debug("PopUp with type [{0}] found", [className]); + return true; + } + } + LOGGER.debug("No PopUp with type [{0}] not found", [className]); + return false; + } + + private static function addPopUpToStage(parent:DisplayObject, className:Class, modal:Boolean = false, center:Boolean = true):IFlexDisplayObject { + var popUp:IFlexDisplayObject = PopUpManager.createPopUp(parent, className, modal); + if (center) { + PopUpManager.centerPopUp(popUp) + } + popUpDict[getQualifiedClassName(className)] = popUp; + + LOGGER.debug("Created PopUp with type [{0}]", [className]); + + return popUp; + } + } +} diff --git a/bigbluebutton-client/src/org/bigbluebutton/core/UsersUtil.as b/bigbluebutton-client/src/org/bigbluebutton/core/UsersUtil.as index 8887e7ab68..b3c8da63cc 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/core/UsersUtil.as +++ b/bigbluebutton-client/src/org/bigbluebutton/core/UsersUtil.as @@ -71,18 +71,18 @@ package org.bigbluebutton.core return UserManager.getInstance().getConference().record; } - public static function amIPublishing():CameraSettingsVO { - return UserManager.getInstance().getConference().amIPublishing(); + public static function amIPublishing():ArrayCollection { + return UserManager.getInstance().getConference().amIPublishing() as ArrayCollection; } - - public static function setIAmPublishing(publishing:Boolean):void { - UserManager.getInstance().getConference().setCamPublishing(publishing); + + public static function addCameraSettings(camSettings:CameraSettingsVO):void { + UserManager.getInstance().getConference().addCameraSettings(camSettings); } - - public static function setCameraSettings(camSettings:CameraSettingsVO):void { - UserManager.getInstance().getConference().setCameraSettings(camSettings); + + public static function removeCameraSettings(camIndex:int):void { + UserManager.getInstance().getConference().removeCameraSettings(camIndex); } - + public static function hasWebcamStream(userID:String):Boolean { var u:BBBUser = getUser(userID); if (u != null) { diff --git a/bigbluebutton-client/src/org/bigbluebutton/core/managers/ReconnectionManager.as b/bigbluebutton-client/src/org/bigbluebutton/core/managers/ReconnectionManager.as old mode 100755 new mode 100644 index e96b3e54f8..054a49cc43 --- a/bigbluebutton-client/src/org/bigbluebutton/core/managers/ReconnectionManager.as +++ b/bigbluebutton-client/src/org/bigbluebutton/core/managers/ReconnectionManager.as @@ -18,25 +18,26 @@ */ package org.bigbluebutton.core.managers { - import com.asfusion.mate.events.Dispatcher; + import com.asfusion.mate.events.Dispatcher; + import flash.display.DisplayObject; import flash.events.TimerEvent; import flash.utils.Dictionary; - import flash.utils.Timer; + import flash.utils.Timer; + import mx.collections.ArrayCollection; import mx.core.FlexGlobals; - import mx.core.IFlexDisplayObject; - import mx.managers.PopUpManager; + import org.as3commons.logging.api.ILogger; import org.as3commons.logging.api.getClassLogger; + import org.bigbluebutton.core.PopUpUtil; import org.bigbluebutton.core.UsersUtil; - import org.bigbluebutton.main.api.JSLog; import org.bigbluebutton.main.events.BBBEvent; import org.bigbluebutton.main.events.ClientStatusEvent; import org.bigbluebutton.main.events.LogoutEvent; import org.bigbluebutton.main.model.users.AutoReconnect; import org.bigbluebutton.main.views.ReconnectionPopup; - import org.bigbluebutton.util.i18n.ResourceUtil; + import org.bigbluebutton.util.i18n.ResourceUtil; public class ReconnectionManager { @@ -52,7 +53,6 @@ package org.bigbluebutton.core.managers private var _reconnectTimer:Timer = new Timer(10000, 1); private var _reconnectTimeout:Timer = new Timer(15000, 1); private var _dispatcher:Dispatcher = new Dispatcher(); - private var _popup:IFlexDisplayObject = null; private var _canceled:Boolean = false; public function ReconnectionManager() { @@ -97,8 +97,7 @@ package org.bigbluebutton.core.managers _connections[type] = obj; if (!_reconnectTimer.running) { - _popup = PopUpManager.createPopUp(FlexGlobals.topLevelApplication as DisplayObject, ReconnectionPopup, true); - PopUpManager.centerPopUp(_popup); + PopUpUtil.createModalPopUp(FlexGlobals.topLevelApplication as DisplayObject, ReconnectionPopup, true); _reconnectTimer.reset(); _reconnectTimer.start(); @@ -163,8 +162,8 @@ package org.bigbluebutton.core.managers msg, 'bbb.connection.reestablished')); _reconnectTimeout.reset(); - removePopUp(); - } + PopUpUtil.removePopUp(ReconnectionPopup); + } } public function onCancelReconnection():void { @@ -172,15 +171,8 @@ package org.bigbluebutton.core.managers for (var type:Object in _connections) delete _connections[type]; - removePopUp(); - } - - private function removePopUp():void { - if (_popup != null) { - PopUpManager.removePopUp(_popup); - _popup = null; - } - } + PopUpUtil.removePopUp(ReconnectionPopup); + } private function connectionReestablishedMessage():String { var msg:String = ""; diff --git a/bigbluebutton-client/src/org/bigbluebutton/core/vo/LockSettingsVO.as b/bigbluebutton-client/src/org/bigbluebutton/core/vo/LockSettingsVO.as index 308874e607..8f89969a2f 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/core/vo/LockSettingsVO.as +++ b/bigbluebutton-client/src/org/bigbluebutton/core/vo/LockSettingsVO.as @@ -18,9 +18,6 @@ */ package org.bigbluebutton.core.vo { - import org.bigbluebutton.core.UsersUtil; - import org.bigbluebutton.main.model.users.BBBUser; - public class LockSettingsVO { private var lockOnJoinConfigurable:Boolean; diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCallbacks.as b/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCallbacks.as index f8f1e8d5c0..d3862708b5 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCallbacks.as +++ b/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCallbacks.as @@ -19,7 +19,8 @@ package org.bigbluebutton.main.api { import com.asfusion.mate.events.Dispatcher; - + import mx.collections.ArrayCollection; + import flash.external.ExternalInterface; import org.bigbluebutton.core.BBB; import org.as3commons.logging.api.ILogger; @@ -48,7 +49,7 @@ package org.bigbluebutton.main.api import org.bigbluebutton.modules.videoconf.events.ClosePublishWindowEvent; import org.bigbluebutton.modules.videoconf.events.ShareCameraRequestEvent; import org.bigbluebutton.modules.videoconf.model.VideoConfOptions; - import org.bigbluebutton.util.SessionTokenUtil; + import org.bigbluebutton.util.SessionTokenUtil; public class ExternalApiCallbacks { private static const LOGGER:ILogger = getClassLogger(ExternalApiCallbacks); @@ -188,17 +189,26 @@ package org.bigbluebutton.main.api private function handleAmISharingCameraRequestSync():Object { var obj:Object = new Object(); - var camSettings:CameraSettingsVO = UsersUtil.amIPublishing(); - obj.isPublishing = camSettings.isPublishing; - obj.camIndex = camSettings.camIndex; - obj.camWidth = camSettings.videoProfile.width; - obj.camHeight = camSettings.videoProfile.height; - obj.camKeyFrameInterval = camSettings.videoProfile.keyFrameInterval; - obj.camModeFps = camSettings.videoProfile.modeFps; - obj.camQualityBandwidth = camSettings.videoProfile.qualityBandwidth; - obj.camQualityPicture = camSettings.videoProfile.qualityPicture; - obj.avatarURL = UsersUtil.getAvatarURL(); - + var camArray: ArrayCollection = new ArrayCollection(); + + var camSettingsArray:ArrayCollection = UsersUtil.amIPublishing(); + for (var i:int = 0; i < camSettingsArray.length; i++) { + var camSettings:CameraSettingsVO = camSettingsArray.getItemAt(i) as CameraSettingsVO; + var cam:Object = new Object(); + + cam.isPublishing = camSettings.isPublishing; + cam.camIndex = camSettings.camIndex; + cam.camWidth = camSettings.videoProfile.width; + cam.camHeight = camSettings.videoProfile.height; + cam.camKeyFrameInterval = camSettings.videoProfile.keyFrameInterval; + cam.camModeFps = camSettings.videoProfile.modeFps; + cam.camQualityBandwidth = camSettings.videoProfile.qualityBandwidth; + cam.camQualityPicture = camSettings.videoProfile.qualityPicture; + cam.avatarURL = UsersUtil.getAvatarURL(); + camArray.addItem(cam); + } + + obj.cameras = camArray; return obj; } diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCalls.as b/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCalls.as index a6bd4d1d86..2387f26724 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCalls.as +++ b/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCalls.as @@ -19,6 +19,7 @@ package org.bigbluebutton.main.api { import flash.external.ExternalInterface; + import mx.collections.ArrayCollection; import org.as3commons.logging.api.ILogger; import org.as3commons.logging.api.getClassLogger; @@ -158,21 +159,28 @@ package org.bigbluebutton.main.api } public function handleAmISharingCamQueryEvent(event:AmISharingWebcamQueryEvent):void { - var camSettings:CameraSettingsVO = UsersUtil.amIPublishing(); - + var camSettingsArray:ArrayCollection = UsersUtil.amIPublishing(); var payload:Object = new Object(); + var camArray: ArrayCollection = new ArrayCollection(); + for (var i:int = 0; i < camSettingsArray.length; i++) { + var camSettings:CameraSettingsVO = camSettingsArray.getItemAt(i) as CameraSettingsVO; + + var cam:Object = new Object(); + cam.isPublishing = camSettings.isPublishing; + cam.camIndex = camSettings.camIndex; + cam.camWidth = camSettings.videoProfile.width; + cam.camHeight = camSettings.videoProfile.height; + cam.camKeyFrameInterval = camSettings.videoProfile.keyFrameInterval; + cam.camModeFps = camSettings.videoProfile.modeFps; + cam.camQualityBandwidth = camSettings.videoProfile.qualityBandwidth; + cam.camQualityPicture = camSettings.videoProfile.qualityPicture; + cam.avatarURL = UsersUtil.getAvatarURL(); + camArray.addItem(cam); + } payload.eventName = EventConstants.AM_I_SHARING_CAM_RESP; - payload.isPublishing = camSettings.isPublishing; - payload.camIndex = camSettings.camIndex; - payload.camWidth = camSettings.videoProfile.width; - payload.camHeight = camSettings.videoProfile.height; - payload.camKeyFrameInterval = camSettings.videoProfile.keyFrameInterval; - payload.camModeFps = camSettings.videoProfile.modeFps; - payload.camQualityBandwidth = camSettings.videoProfile.qualityBandwidth; - payload.camQualityPicture = camSettings.videoProfile.qualityPicture; - payload.avatarURL = UsersUtil.getAvatarURL(); - - broadcastEvent(payload); + payload.cameras = camArray; + + broadcastEvent(payload); } 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 e81a281a23..6b0706299d 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/main/model/users/Conference.as +++ b/bigbluebutton-client/src/org/bigbluebutton/main/model/users/Conference.as @@ -64,7 +64,7 @@ package org.bigbluebutton.main.model.users { private var lockSettings:LockSettingsVO; - private var _myCamSettings:CameraSettingsVO = new CameraSettingsVO(); + private var _myCamSettings:ArrayCollection = null; [Bindable] private var me:BBBUser = null; @@ -90,6 +90,7 @@ package org.bigbluebutton.main.model.users { users.sort = sort; users.refresh(); breakoutRooms = new ArrayCollection(); + _myCamSettings = new ArrayCollection(); } // Custom sort function for the users ArrayCollection. Need to put dial-in users at the very bottom. @@ -152,19 +153,28 @@ package org.bigbluebutton.main.model.users { users.addItem(newuser); users.refresh(); } - - public function setCamPublishing(publishing:Boolean):void { - _myCamSettings.isPublishing = publishing; + + public function addCameraSettings(camSettings: CameraSettingsVO): void { + if(!_myCamSettings.contains(camSettings)) { + _myCamSettings.addItem(camSettings); + } } - - public function setCameraSettings(camSettings:CameraSettingsVO):void { - _myCamSettings = camSettings; + + public function removeCameraSettings(camIndex:int): void { + if (camIndex != -1) { + for(var i:int = 0; i < _myCamSettings.length; i++) { + if (_myCamSettings.getItemAt(i) != null && _myCamSettings.getItemAt(i).camIndex == camIndex) { + _myCamSettings.removeItemAt(i); + return; + } + } + } } - - public function amIPublishing():CameraSettingsVO { + + public function amIPublishing():ArrayCollection { return _myCamSettings; } - + public function setDefaultLayout(defaultLayout:String):void { this.defaultLayout = defaultLayout; } diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/model/users/events/BroadcastStartedEvent.as b/bigbluebutton-client/src/org/bigbluebutton/main/model/users/events/BroadcastStartedEvent.as index b3a40e2dfe..14b06222ea 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/main/model/users/events/BroadcastStartedEvent.as +++ b/bigbluebutton-client/src/org/bigbluebutton/main/model/users/events/BroadcastStartedEvent.as @@ -29,7 +29,7 @@ public var stream:String; public var userid:String; public var isPresenter:Boolean; - public var camSettings:CameraSettingsVO; + public var camSettings:CameraSettingsVO; public function BroadcastStartedEvent(type:String = BROADCAST_STARTED_EVENT) { super(type, true, false); diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/AudioSelectionWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/views/AudioSelectionWindow.mxml index 0e11ba544f..91274f99c4 100644 --- a/bigbluebutton-client/src/org/bigbluebutton/main/views/AudioSelectionWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/main/views/AudioSelectionWindow.mxml @@ -34,10 +34,9 @@ with BigBlueButton; if not, see . . dispatcher.dispatchEvent(command); } - PopUpManager.removePopUp(this); + PopUpUtil.removePopUp(this); } private function onListenClick():void { @@ -109,7 +108,7 @@ with BigBlueButton; if not, see . command.mic = false; dispatcher.dispatchEvent(command); - PopUpManager.removePopUp(this); + PopUpUtil.removePopUp(this); } private function onCancelClicked():void { @@ -117,7 +116,7 @@ with BigBlueButton; if not, see . var dispatcher:Dispatcher = new Dispatcher(); dispatcher.dispatchEvent(new AudioSelectionWindowEvent(AudioSelectionWindowEvent.CLOSED_AUDIO_SELECTION)); - PopUpManager.removePopUp(this); + PopUpUtil.removePopUp(this); } private function handleBecomePresenter(e:MadePresenterEvent):void { diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/CameraDisplaySettings.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/views/CameraDisplaySettings.mxml old mode 100755 new mode 100644 index 790fec496e..094aa05056 --- a/bigbluebutton-client/src/org/bigbluebutton/main/views/CameraDisplaySettings.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/main/views/CameraDisplaySettings.mxml @@ -34,11 +34,11 @@ with BigBlueButton; if not, see . import mx.collections.ArrayCollection; import mx.collections.ArrayList; import mx.events.CloseEvent; - import mx.managers.PopUpManager; import org.bigbluebutton.common.Images; import org.bigbluebutton.common.Media; import org.bigbluebutton.core.BBB; + import org.bigbluebutton.core.PopUpUtil; import org.bigbluebutton.core.model.VideoProfile; import org.bigbluebutton.main.events.BBBEvent; import org.bigbluebutton.util.i18n.ResourceUtil; @@ -211,7 +211,7 @@ with BigBlueButton; if not, see . var event:BBBEvent = new BBBEvent(BBBEvent.CAM_SETTINGS_CLOSED); event.payload['clicked'] = payload; dispatchEvent(event); - PopUpManager.removePopUp(this); + PopUpUtil.removePopUp(this); } ]]> diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/ChromeMicPermissionImage.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/views/ChromeMicPermissionImage.mxml old mode 100755 new mode 100644 index 51e6d1d7ce..2c15ebb807 --- a/bigbluebutton-client/src/org/bigbluebutton/main/views/ChromeMicPermissionImage.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/main/views/ChromeMicPermissionImage.mxml @@ -39,22 +39,21 @@ with BigBlueButton; if not, see . diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/ChromeWebcamPermissionImage.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/views/ChromeWebcamPermissionImage.mxml old mode 100755 new mode 100644 index c37f21dc7a..f06d72a60a --- a/bigbluebutton-client/src/org/bigbluebutton/main/views/ChromeWebcamPermissionImage.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/main/views/ChromeWebcamPermissionImage.mxml @@ -38,18 +38,17 @@ with BigBlueButton; if not, see . diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/ClientStatusWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/views/ClientStatusWindow.mxml old mode 100755 new mode 100644 index 39e7bbb725..e2cce80b7d --- a/bigbluebutton-client/src/org/bigbluebutton/main/views/ClientStatusWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/main/views/ClientStatusWindow.mxml @@ -28,8 +28,7 @@ with BigBlueButton; if not, see . creationComplete="onCreationComplete();"> . } private function handleCloseButtonClick():void { - PopUpManager.removePopUp(this); + PopUpUtil.removePopUp(this); } ]]> diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/ConnectionLostWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/views/ConnectionLostWindow.mxml old mode 100755 new mode 100644 index 62eea23e5c..d272e2e977 --- a/bigbluebutton-client/src/org/bigbluebutton/main/views/ConnectionLostWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/main/views/ConnectionLostWindow.mxml @@ -26,14 +26,13 @@ with BigBlueButton; if not, see . diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/FirefoxMicPermissionImage.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/views/FirefoxMicPermissionImage.mxml old mode 100755 new mode 100644 index a528a89b45..47f88d9576 --- a/bigbluebutton-client/src/org/bigbluebutton/main/views/FirefoxMicPermissionImage.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/main/views/FirefoxMicPermissionImage.mxml @@ -39,24 +39,22 @@ with BigBlueButton; if not, see . diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/FlashMicSettings.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/views/FlashMicSettings.mxml old mode 100755 new mode 100644 index ac461d3506..5d3c7c2d8c --- a/bigbluebutton-client/src/org/bigbluebutton/main/views/FlashMicSettings.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/main/views/FlashMicSettings.mxml @@ -39,17 +39,18 @@ with BigBlueButton; if not, see . import com.asfusion.mate.events.Dispatcher; import flash.ui.Keyboard; - import org.bigbluebutton.core.UsersUtil; + import mx.controls.sliderClasses.Slider; import mx.events.CloseEvent; import mx.events.SliderEvent; - import mx.managers.PopUpManager; import org.as3commons.logging.api.ILogger; import org.as3commons.logging.api.getClassLogger; import org.bigbluebutton.common.Images; import org.bigbluebutton.common.Media; import org.bigbluebutton.core.BBB; + import org.bigbluebutton.core.PopUpUtil; + import org.bigbluebutton.core.UsersUtil; import org.bigbluebutton.modules.phone.events.AudioSelectionWindowEvent; import org.bigbluebutton.modules.phone.events.FlashEchoTestFailedEvent; import org.bigbluebutton.modules.phone.events.FlashEchoTestHasAudioEvent; @@ -241,7 +242,7 @@ with BigBlueButton; if not, see . } private function handleFlashJoinedVoiceConferenceEvent(event:FlashJoinedVoiceConferenceEvent):void { - PopUpManager.removePopUp(this); + PopUpUtil.removePopUp(this); } private function echoTestButtonClickHandler():void { @@ -263,7 +264,7 @@ with BigBlueButton; if not, see . stopEchoTest(); var dispatcher:Dispatcher = new Dispatcher(); dispatcher.dispatchEvent(new AudioSelectionWindowEvent(AudioSelectionWindowEvent.CLOSED_AUDIO_SELECTION)); - PopUpManager.removePopUp(this); + PopUpUtil.removePopUp(this); } private function stopEchoTest():void { @@ -307,7 +308,7 @@ with BigBlueButton; if not, see . dispatchEvent(new FlashEchoTestHasAudioEvent()); var dispatcher:Dispatcher = new Dispatcher(); dispatcher.dispatchEvent(new AudioSelectionWindowEvent(AudioSelectionWindowEvent.CLOSED_AUDIO_SELECTION)); - PopUpManager.removePopUp(this); + PopUpUtil.removePopUp(this); } private function noButtonClicked():void { diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/LockSettings.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/views/LockSettings.mxml old mode 100755 new mode 100644 index cbec69caf6..a02ed94f2b --- a/bigbluebutton-client/src/org/bigbluebutton/main/views/LockSettings.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/main/views/LockSettings.mxml @@ -22,7 +22,6 @@ with BigBlueButton; if not, see . xmlns:mate="http://mate.asfusion.com/" xmlns:common="org.bigbluebutton.common.*" width="300" height="400" - creationComplete="creationCompleteHandler(event)" styleName="lockSettingsWindowStyle" showCloseButton="false" close="onCancelClicked()" @@ -30,20 +29,14 @@ with BigBlueButton; if not, see . . this.dispatchEvent(new CloseEvent(CloseEvent.CLOSE)); } } - - + private function onSaveClicked():void { var event:LockControlEvent = new LockControlEvent(LockControlEvent.SAVE_LOCK_SETTINGS); var lockSettings:LockSettingsVO = new LockSettingsVO(chkDisableWebcam.selected, chkDisableMicrophone.selected, chkDisablePrivateChat.selected, chkDisablePublicChat.selected, chkDisableLayout.selected, chkLockOnJoin.selected, lockOnJoinConfigurable); event.payload = lockSettings.toMap(); dispatchEvent(event); - PopUpManager.removePopUp(this); + PopUpUtil.removePopUp(this); } private function onCancelClicked():void { - PopUpManager.removePopUp(this); - } - - protected function creationCompleteHandler(event:FlexEvent):void - { - + PopUpUtil.removePopUp(this); } ]]> diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/LoggedOutWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/views/LoggedOutWindow.mxml old mode 100755 new mode 100644 index 5254556d82..14e5beefd3 --- a/bigbluebutton-client/src/org/bigbluebutton/main/views/LoggedOutWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/main/views/LoggedOutWindow.mxml @@ -28,19 +28,20 @@ with BigBlueButton; if not, see . . } private function handleComplete(e:Event):void { - PopUpManager.removePopUp(this); + PopUpUtil.removePopUp(this); exitApplication(); } @@ -79,13 +80,13 @@ with BigBlueButton; if not, see . logData.tags = ["logout"]; logData.message = "Log out redirection returned with error."; LOGGER.error(JSON.stringify(logData)); - PopUpManager.removePopUp(this); + PopUpUtil.removePopUp(this); exitApplication(); } private function onUserLoggedOutWindowClose(e:Event):void { LOGGER.debug("Closing UserLoggedOutWindow"); - PopUpManager.removePopUp(this); + PopUpUtil.removePopUp(this); } public function setReason(reason:String):void { diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/MainApplicationShell.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/views/MainApplicationShell.mxml index dbe533c19a..05dc0be8ae 100644 --- a/bigbluebutton-client/src/org/bigbluebutton/main/views/MainApplicationShell.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/main/views/MainApplicationShell.mxml @@ -86,7 +86,6 @@ with BigBlueButton; if not, see . import mx.core.IFlexDisplayObject; import mx.core.UIComponent; import mx.events.FlexEvent; - import mx.managers.PopUpManager; import flexlib.mdi.effects.effectsLib.MDIVistaEffects; @@ -99,6 +98,7 @@ with BigBlueButton; if not, see . import org.bigbluebutton.common.events.OpenWindowEvent; import org.bigbluebutton.common.events.ToolbarButtonEvent; import org.bigbluebutton.core.BBB; + import org.bigbluebutton.core.PopUpUtil; import org.bigbluebutton.core.UsersUtil; import org.bigbluebutton.core.events.LockControlEvent; import org.bigbluebutton.core.managers.UserManager; @@ -133,7 +133,6 @@ with BigBlueButton; if not, see . private var stoppedModules:ArrayCollection; private var logWindow:LogWindow; private var scWindow:ShortcutHelpWindow; - private var logoutWindow:LoggedOutWindow; private var connectionLostWindow:ConnectionLostWindow; // LIVE or PLAYBACK @@ -165,7 +164,6 @@ with BigBlueButton; if not, see . [Bindable] private var isTunneling:Boolean = false; private var confirmingLogout:Boolean = false; - private var chromeBrowser:ChromeWebcamPermissionImage = null; public function getLogWindow() : LogWindow { @@ -408,141 +406,151 @@ with BigBlueButton; if not, see . if (version != localeVersion) wrongLocaleVersion(); } } + private function handleFlashMicSettingsEvent(event:FlashMicSettingsEvent):void { + /** + * There is a bug in Flex SDK 4.14 where the screen stays blurry if a + * pop-up is opened from another pop-up. I delayed the second open to + * avoid this case. - Chad + */ + this.callLater(function():void { + var micSettings:FlashMicSettings = PopUpUtil.createModalPopUp(mdiCanvas, FlashMicSettings, false) as FlashMicSettings; + if (micSettings) { + micSettings.addEventListener(FlexEvent.CREATION_COMPLETE, function(e:Event):void { + var point1:Point = new Point(); + // Calculate position of TitleWindow in Application's coordinates. + point1.x = width / 2; + point1.y = height / 2; + micSettings.x = point1.x - (micSettings.width / 2); + micSettings.y = point1.y - (micSettings.height / 2); + }); + } + }); + } - private function handleFlashMicSettingsEvent(event:FlashMicSettingsEvent):void { - /** - * There is a bug in Flex SDK 4.14 where the screen stays blurry if a - * pop-up is opened from another pop-up. I delayed the second open to - * avoid this case. - Chad - */ - this.callLater( function():void { - var micSettings:FlashMicSettings = PopUpManager.createPopUp(mdiCanvas, FlashMicSettings, true) as FlashMicSettings; - micSettings.addEventListener(FlexEvent.CREATION_COMPLETE, function(e:Event):void { - var point1:Point = new Point(); - // Calculate position of TitleWindow in Application's coordinates. - point1.x = width/2; - point1.y = height/2; - micSettings.x = point1.x - (micSettings.width/2); - micSettings.y = point1.y - (micSettings.height/2); - }); - }); - } - - private function openVideoPreviewWindow(event:BBBEvent):void { - var camSettings:CameraDisplaySettings = CameraDisplaySettings(PopUpManager.createPopUp(mdiCanvas, CameraDisplaySettings, true)); - camSettings.defaultCamera = event.payload.defaultCamera; - camSettings.camerasArray = event.payload.camerasArray; - camSettings.publishInClient = event.payload.publishInClient; - camSettings.chromePermissionDenied = event.payload.chromePermissionDenied; - - var point1:Point = new Point(); - // Calculate position of TitleWindow in Application's coordinates. - point1.x = width/2; - point1.y = height/2; - camSettings.x = point1.x - (camSettings.width/2); - camSettings.y = point1.y - (camSettings.height/2); - } - - private function wrongLocaleVersion():void { - var localeWindow:OldLocaleWarnWindow = OldLocaleWarnWindow(PopUpManager.createPopUp(mdiCanvas, OldLocaleWarnWindow, false)); + private function openVideoPreviewWindow(event:BBBEvent):void { + var camSettings:CameraDisplaySettings = PopUpUtil.createModalPopUp(mdiCanvas, CameraDisplaySettings, true) as CameraDisplaySettings; + if (camSettings) { + camSettings.defaultCamera = event.payload.defaultCamera; + camSettings.camerasArray = event.payload.camerasArray; + camSettings.publishInClient = event.payload.publishInClient; + camSettings.chromePermissionDenied = event.payload.chromePermissionDenied; - var point1:Point = new Point(); - // Calculate position of TitleWindow in Application's coordinates. - point1.x = width/2; - point1.y = height/2; - localeWindow.x = point1.x - (localeWindow.width/2); - localeWindow.y = point1.y - (localeWindow.height/2); - } + var point1:Point = new Point(); + // Calculate position of TitleWindow in Application's coordinates. + point1.x = width / 2; + point1.y = height / 2; + camSettings.x = point1.x - (camSettings.width / 2); + camSettings.y = point1.y - (camSettings.height / 2); + } + } - private function handleShowAudioSelectionWindowEvent(event:AudioSelectionWindowEvent):void { - var audioSelection:IFlexDisplayObject = PopUpManager.createPopUp(mdiCanvas, AudioSelectionWindow, true); - PopUpManager.centerPopUp(audioSelection); - } - - private function handleWebRTCMediaRequestEvent(event:WebRTCMediaEvent):void { - var browser:String = ExternalInterface.call("determineBrowser")[0]; - if (browser == "Firefox") { - var ffBrowser:FirefoxMicPermissionImage = PopUpManager.createPopUp(mdiCanvas, FirefoxMicPermissionImage, true) as FirefoxMicPermissionImage; - ffBrowser.addEventListener(FlexEvent.CREATION_COMPLETE, function(e:Event):void { - ffBrowser.x = 100; - ffBrowser.y = 150; - }); - } else if (browser == "Chrome") { - var chromeBrowser:ChromeMicPermissionImage = PopUpManager.createPopUp(mdiCanvas, ChromeMicPermissionImage, true) as ChromeMicPermissionImage; - chromeBrowser.addEventListener(FlexEvent.CREATION_COMPLETE, function(e:Event):void { - chromeBrowser.x = 20; - chromeBrowser.y = 130; - }); - } - } - - private function handleWebRTCEchoTestConnectingEvent(event:WebRTCEchoTestEvent):void { - var webRTCEchoTest:WebRTCEchoTest = PopUpManager.createPopUp(mdiCanvas, WebRTCEchoTest, true) as WebRTCEchoTest; - webRTCEchoTest.addEventListener(FlexEvent.CREATION_COMPLETE, function(e:Event):void { - var point1:Point = new Point(); - // Calculate position of TitleWindow in Application's coordinates. - point1.x = width/2; - point1.y = height/2; - webRTCEchoTest.x = point1.x - (webRTCEchoTest.width/2); - webRTCEchoTest.y = point1.y - (webRTCEchoTest.height/2); - }); - } + private function wrongLocaleVersion():void { + var localeWindow:OldLocaleWarnWindow = PopUpUtil.createNonModelPopUp(mdiCanvas, OldLocaleWarnWindow, false) as OldLocaleWarnWindow; + if (localeWindow) { + var point1:Point = new Point(); + // Calculate position of TitleWindow in Application's coordinates. + point1.x = width / 2; + point1.y = height / 2; + localeWindow.x = point1.x - (localeWindow.width / 2); + localeWindow.y = point1.y - (localeWindow.height / 2); + } + } - private function handleShareCameraRequestEvent(event:ShareCameraRequestEvent):void { - if (ExternalInterface.call("determineBrowser")[0] == "Chrome" && chromeBrowser == null ) { - chromeBrowser = PopUpManager.createPopUp(mdiCanvas, ChromeWebcamPermissionImage , true) as ChromeWebcamPermissionImage; - chromeBrowser.addEventListener(FlexEvent.CREATION_COMPLETE, function(e:Event):void { - var point1:Point = new Point(); - // Calculate position of TitleWindow in Application's coordinates. - point1.x = width/2; - point1.y = height/2; - if (Capabilities.os.indexOf("Mac") >= 0) { - chromeBrowser.x = (mdiCanvas.width - chromeBrowser.width); - } - else { - chromeBrowser.x = 20; - } - chromeBrowser.y = 20; - }); - } - } - - private function handleMeetingNotFoundEvent(e:MeetingNotFoundEvent):void { - showlogoutWindow(ResourceUtil.getInstance().getString('bbb.mainshell.meetingNotFound')); - } + private function handleShowAudioSelectionWindowEvent(event:AudioSelectionWindowEvent):void { + PopUpUtil.createModalPopUp(mdiCanvas, AudioSelectionWindow, true); + } - private function showlogoutWindow(reason:String):void { - if (layoutOptions!= null && layoutOptions.showLogoutWindow) { - if (UserManager.getInstance().getConference().iAskedToLogout) { - handleExitApplicationEvent(); - return; - } - if (logoutWindow != null) return; - logoutWindow = LoggedOutWindow(PopUpManager.createPopUp( mdiCanvas, LoggedOutWindow, true)); - - var point1:Point = new Point(); - // Calculate position of TitleWindow in Application's coordinates. - point1.x = width/2; - point1.y = height/2; - logoutWindow.x = point1.x - (logoutWindow.width/2); - logoutWindow.y = point1.y - (logoutWindow.height/2); - - logoutWindow.setReason(reason); - mdiCanvas.removeAllPopUps(); - removeToolBars(); - } else { - mdiCanvas.removeAllPopUps(); - removeToolBars(); - var pageHost:String = FlexGlobals.topLevelApplication.url.split("/")[0]; - var pageURL:String = FlexGlobals.topLevelApplication.url.split("/")[2]; - LOGGER.debug("SingOut to [{0}//{1}/bigbluebutton/api/signOut]", [pageHost, pageURL]); - var request:URLRequest = new URLRequest(pageHost + "//" + pageURL + "/bigbluebutton/api/signOut"); - var urlLoader:URLLoader = new URLLoader(); - urlLoader.addEventListener(Event.COMPLETE, handleLogoutComplete); - urlLoader.addEventListener(IOErrorEvent.IO_ERROR, handleLogoutError); - urlLoader.load(request); - } - } + private function handleWebRTCMediaRequestEvent(event:WebRTCMediaEvent):void { + var browser:String = ExternalInterface.call("determineBrowser")[0]; + if (browser == "Firefox") { + var ffBrowser:FirefoxMicPermissionImage = PopUpUtil.createModalPopUp(mdiCanvas, FirefoxMicPermissionImage, false) as FirefoxMicPermissionImage; + if (ffBrowser) { + ffBrowser.addEventListener(FlexEvent.CREATION_COMPLETE, function(e:Event):void { + ffBrowser.x = 100; + ffBrowser.y = 150; + }); + } + } else if (browser == "Chrome") { + var chromeBrowser:ChromeMicPermissionImage = PopUpUtil.createModalPopUp(mdiCanvas, ChromeMicPermissionImage, false) as ChromeMicPermissionImage; + if (chromeBrowser) { + chromeBrowser.addEventListener(FlexEvent.CREATION_COMPLETE, function(e:Event):void { + chromeBrowser.x = 20; + chromeBrowser.y = 130; + }); + } + } + } + + private function handleWebRTCEchoTestConnectingEvent(event:WebRTCEchoTestEvent):void { + var webRTCEchoTest:WebRTCEchoTest = PopUpUtil.createModalPopUp(mdiCanvas, WebRTCEchoTest, false) as WebRTCEchoTest; + if (webRTCEchoTest) { + webRTCEchoTest.addEventListener(FlexEvent.CREATION_COMPLETE, function(e:Event):void { + var point1:Point = new Point(); + // Calculate position of TitleWindow in Application's coordinates. + point1.x = width / 2; + point1.y = height / 2; + webRTCEchoTest.x = point1.x - (webRTCEchoTest.width / 2); + webRTCEchoTest.y = point1.y - (webRTCEchoTest.height / 2); + }); + } + } + + private function handleShareCameraRequestEvent(event:ShareCameraRequestEvent):void { + if (ExternalInterface.call("determineBrowser")[0] == "Chrome") { + var chromeWebcmPermissionImg : ChromeWebcamPermissionImage = PopUpUtil.createModalPopUp(mdiCanvas, ChromeWebcamPermissionImage, false) as ChromeWebcamPermissionImage; + if (chromeWebcmPermissionImg) { + chromeWebcmPermissionImg.addEventListener(FlexEvent.CREATION_COMPLETE, function(e:Event):void { + var point1:Point = new Point(); + // Calculate position of TitleWindow in Application's coordinates. + point1.x = width / 2; + point1.y = height / 2; + if (Capabilities.os.indexOf("Mac") >= 0) { + chromeWebcmPermissionImg.x = (mdiCanvas.width - chromeWebcmPermissionImg.width); + } else { + chromeWebcmPermissionImg.x = 20; + } + chromeWebcmPermissionImg.y = 20; + }); + } + } + } + + private function handleMeetingNotFoundEvent(e:MeetingNotFoundEvent):void { + showlogoutWindow(ResourceUtil.getInstance().getString('bbb.mainshell.meetingNotFound')); + } + + private function showlogoutWindow(reason:String):void { + if (layoutOptions != null && layoutOptions.showLogoutWindow) { + if (UserManager.getInstance().getConference().iAskedToLogout) { + handleExitApplicationEvent(); + return; + } + var logoutWindow:LoggedOutWindow = PopUpUtil.createModalPopUp(mdiCanvas, LoggedOutWindow, false) as LoggedOutWindow; + if (logoutWindow) { + var point1:Point = new Point(); + // Calculate position of TitleWindow in Application's coordinates. + point1.x = width / 2; + point1.y = height / 2; + logoutWindow.x = point1.x - (logoutWindow.width / 2); + logoutWindow.y = point1.y - (logoutWindow.height / 2); + + logoutWindow.setReason(reason); + mdiCanvas.removeAllPopUps(); + removeToolBars(); + } + } else { + mdiCanvas.removeAllPopUps(); + removeToolBars(); + var pageHost:String = FlexGlobals.topLevelApplication.url.split("/")[0]; + var pageURL:String = FlexGlobals.topLevelApplication.url.split("/")[2]; + LOGGER.debug("SingOut to [{0}//{1}/bigbluebutton/api/signOut]", [pageHost, pageURL]); + var request:URLRequest = new URLRequest(pageHost + "//" + pageURL + "/bigbluebutton/api/signOut"); + var urlLoader:URLLoader = new URLLoader(); + urlLoader.addEventListener(Event.COMPLETE, handleLogoutComplete); + urlLoader.addEventListener(IOErrorEvent.IO_ERROR, handleLogoutError); + urlLoader.load(request); + } + } /** * Removes toolbars from the display list. @@ -635,33 +643,36 @@ with BigBlueButton; if not, see . private function closeNetworkStatsWindow(e:Event = null):void { networkStatsWindow.disappear(); } - - private function openLockSettingsWindow(event:LockControlEvent):void { - var conference:Conference = UserManager.getInstance().getConference(); - var lsv:LockSettingsVO = conference.getLockSettings(); - - var popUp:IFlexDisplayObject = PopUpManager.createPopUp(mdiCanvas, LockSettings, true); - var ls:LockSettings = LockSettings(popUp); - ls.disableCam = lsv.getDisableCam(); - ls.disableMic = lsv.getDisableMic(); - ls.disablePrivChat = lsv.getDisablePrivateChat(); - ls.disablePubChat = lsv.getDisablePublicChat(); - ls.lockedLayout = lsv.getLockedLayout(); - ls.lockOnJoin = lsv.getLockOnJoin(); - ls.lockOnJoinConfigurable = lsv.getLockOnJoinConfigurable(); - - var point1:Point = new Point(); - point1.x = width/2; - point1.y = height/2; - ls.x = point1.x - (ls.width/2); - ls.y = point1.y - (ls.height/2); - } - - private function openBreakoutRoomsWindow(e:BreakoutRoomEvent):void { - var popUp:IFlexDisplayObject = PopUpManager.createPopUp(mdiCanvas, BreakoutRoomSettings, true); - PopUpManager.centerPopUp(popUp); - BreakoutRoomSettings(popUp).initCreateBreakoutRooms(e.joinMode, e.record); - } + + private function openLockSettingsWindow(event:LockControlEvent):void { + var conference:Conference = UserManager.getInstance().getConference(); + var lsv:LockSettingsVO = conference.getLockSettings(); + + var popUp:IFlexDisplayObject = PopUpUtil.createModalPopUp(mdiCanvas, LockSettings, false); + if (popUp) { + var ls:LockSettings = LockSettings(popUp); + ls.disableCam = lsv.getDisableCam(); + ls.disableMic = lsv.getDisableMic(); + ls.disablePrivChat = lsv.getDisablePrivateChat(); + ls.disablePubChat = lsv.getDisablePublicChat(); + ls.lockedLayout = lsv.getLockedLayout(); + ls.lockOnJoin = lsv.getLockOnJoin(); + ls.lockOnJoinConfigurable = lsv.getLockOnJoinConfigurable(); + + var point1:Point = new Point(); + point1.x = width / 2; + point1.y = height / 2; + ls.x = point1.x - (ls.width / 2); + ls.y = point1.y - (ls.height / 2); + } + } + + private function openBreakoutRoomsWindow(e:BreakoutRoomEvent):void { + var popUp:IFlexDisplayObject = PopUpUtil.createModalPopUp(mdiCanvas, BreakoutRoomSettings, true); + if (popUp != null) { + BreakoutRoomSettings(popUp).initCreateBreakoutRooms(e.joinMode, e.record); + } + } private function onFooterLinkClicked(e:TextEvent):void{ if (ExternalInterface.available) { diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/MainCanvas.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/views/MainCanvas.mxml index 955661182a..d78828d0c6 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/main/views/MainCanvas.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/main/views/MainCanvas.mxml @@ -81,6 +81,7 @@ with BigBlueButton; if not, see . /** * Removes all display list containers created using PopUpManager + * @fixme: move to PopUpUtil and improve */ public function removeAllPopUps():void{ for (var i:int = systemManager.numChildren-1; i>0; i-=1){ diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/MainToolbar.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/views/MainToolbar.mxml index 5de3612151..c42ee071fb 100644 --- a/bigbluebutton-client/src/org/bigbluebutton/main/views/MainToolbar.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/main/views/MainToolbar.mxml @@ -76,6 +76,8 @@ with BigBlueButton; if not, see . [Bindable] private var showToolbar:Boolean = false; [Bindable] public var toolbarOptions:LayoutOptions = new LayoutOptions(); [Bindable] private var numButtons:int; + + private var logoutAlert:Alert; /* * Because of the de-centralized way buttons are added to the toolbar, there is a large gap between the tab indexes of the main buttons @@ -215,25 +217,24 @@ with BigBlueButton; if not, see . LOGGER.debug("Received end meeting event."); doLogout(); } - - - private function confirmLogout():void { - if (toolbarOptions.confirmLogout){ - // Confirm logout using built-in alert - var alert:Alert = Alert.show(ResourceUtil.getInstance().getString('bbb.logout.confirm.message'), ResourceUtil.getInstance().getString('bbb.logout.confirm.title'), Alert.YES | Alert.NO, this, alertLogout, null, Alert.YES); - - var newX:Number = btnLogout.x + btnLogout.width - alert.width; - var newY:Number = btnLogout.y + btnLogout.height + 5; - alert.validateNow(); - alert.move(newX, newY); - //Accessibility.updateProperties(); - } - else{ - doLogout(); - } - } - + private function confirmLogout():void { + if (toolbarOptions.confirmLogout) { + if (logoutAlert == null) { + // Confirm logout using built-in alert + logoutAlert = Alert.show(ResourceUtil.getInstance().getString('bbb.logout.confirm.message'), ResourceUtil.getInstance().getString('bbb.logout.confirm.title'), Alert.YES | Alert.NO, this, alertLogout, null, Alert.YES); + + var newX:Number = btnLogout.x + btnLogout.width - logoutAlert.width; + var newY:Number = btnLogout.y + btnLogout.height + 5; + + logoutAlert.validateNow(); + logoutAlert.move(newX, newY); + } + } else { + doLogout(); + } + } + private function alertLogout(e:CloseEvent):void { // Check to see if the YES button was pressed. if (e.detail==Alert.YES) { @@ -247,6 +248,7 @@ with BigBlueButton; if not, see . */ callLater(doLogout); } + logoutAlert = null; } private function doLogout():void { diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/MicWarning.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/views/MicWarning.mxml deleted file mode 100755 index e2f913b871..0000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/main/views/MicWarning.mxml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/OldLocaleWarnWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/views/OldLocaleWarnWindow.mxml old mode 100755 new mode 100644 index 2598a1f870..f30a111116 --- a/bigbluebutton-client/src/org/bigbluebutton/main/views/OldLocaleWarnWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/main/views/OldLocaleWarnWindow.mxml @@ -25,17 +25,17 @@ with BigBlueButton; if not, see . x="168" y="86" layout="vertical" width="400" height="150" horizontalAlign="center"> . if ((reminder2 == null) || (reminder2 == "")) oldLocalesReminder2 = reminder2Default; else oldLocalesReminder2 = reminder2; } - - private function redirect():void { - var logoutURL:String = BBB.getLogoutURL(); - var request:URLRequest = new URLRequest(logoutURL); - LOGGER.debug("Log out url: " + logoutURL); - request.method = URLRequestMethod.GET; - var urlLoader:URLLoader = new URLLoader(); - urlLoader.addEventListener(Event.COMPLETE, handleComplete); - urlLoader.load(request); - } - + + private function redirect():void { + var logoutURL:String = BBB.getLogoutURL(); + var request:URLRequest = new URLRequest(logoutURL); + LOGGER.debug("Log out url: " + logoutURL); + request.method = URLRequestMethod.GET; + var urlLoader:URLLoader = new URLLoader(); + urlLoader.addEventListener(Event.COMPLETE, handleComplete); + urlLoader.load(request); + } + private function handleComplete(e:Event):void { var request:URLRequest = new URLRequest(BBB.getLogoutURL()); navigateToURL(request, '_self'); - PopUpManager.removePopUp(this); + PopUpUtil.removePopUp(this); } private function onUserLoggedOutWindowClose(e:Event):void { - PopUpManager.removePopUp(this); + PopUpUtil.removePopUp(this); } ]]> @@ -82,4 +82,4 @@ with BigBlueButton; if not, see . - \ No newline at end of file + \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/WarningButton.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/views/WarningButton.mxml index 5001325095..507d5d47b2 100644 --- a/bigbluebutton-client/src/org/bigbluebutton/main/views/WarningButton.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/main/views/WarningButton.mxml @@ -36,14 +36,14 @@ with BigBlueButton; if not, see . import flash.globalization.DateTimeFormatter; import flash.globalization.DateTimeStyle; import flash.globalization.LocaleID; - + import mx.controls.ToolTip; import mx.core.FlexGlobals; - import mx.managers.PopUpManager; import mx.managers.ToolTipManager; import org.as3commons.logging.api.ILogger; import org.as3commons.logging.api.getClassLogger; + import org.bigbluebutton.core.PopUpUtil; import org.bigbluebutton.main.events.ClientStatusEvent; import org.bigbluebutton.util.i18n.ResourceUtil; @@ -124,15 +124,16 @@ with BigBlueButton; if not, see . } return -1; } - - private function handleButtonClick():void { - hideNotification(); - - var clientStatusWindow:ClientStatusWindow = PopUpManager.createPopUp(FlexGlobals.topLevelApplication as DisplayObject, ClientStatusWindow, true) as ClientStatusWindow; - clientStatusWindow.setMessages(messages); - PopUpManager.centerPopUp(clientStatusWindow); - } - + + private function handleButtonClick():void { + hideNotification(); + + var clientStatusWindow:ClientStatusWindow = PopUpUtil.createModalPopUp(FlexGlobals.topLevelApplication as DisplayObject, ClientStatusWindow, true) as ClientStatusWindow + if (clientStatusWindow) { + clientStatusWindow.setMessages(messages); + } + } + private function handleMove():void { if (notification) { var location:Point = localToGlobal(new Point(0,0)); diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/WebRTCEchoTest.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/views/WebRTCEchoTest.mxml old mode 100755 new mode 100644 index 4435fe9a5c..a5dc0f7c1f --- a/bigbluebutton-client/src/org/bigbluebutton/main/views/WebRTCEchoTest.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/main/views/WebRTCEchoTest.mxml @@ -24,8 +24,7 @@ with BigBlueButton; if not, see . creationComplete="onCreationComplete()" styleName="micSettingsWindowStyle" showCloseButton="false" - close="onCancelClicked()" - keyDown="handleKeyDown(event)"> + close="onCancelClicked()"> @@ -41,13 +40,11 @@ with BigBlueButton; if not, see . . import org.bigbluebutton.modules.phone.events.WebRTCJoinedVoiceConferenceEvent; import org.bigbluebutton.modules.phone.models.Constants; import org.bigbluebutton.util.i18n.ResourceUtil; - + private static const LOGGER:ILogger = getClassLogger(WebRTCEchoTest); private static var DEFAULT_HELP_URL:String = "http://www.bigbluebutton.org/content/videos"; @@ -65,28 +62,24 @@ with BigBlueButton; if not, see . override public function move(x:Number, y:Number):void { return; } - - private function onCancelClicked():void { - if (dotTimer) dotTimer.stop(); - PopUpManager.removePopUp(this); - } - - private function handleKeyDown(event:KeyboardEvent):void { - - } - - private function onCreationComplete():void { - setCurrentState("connecting"); - lblConnectMessage.text = lblConnectMessageMock.text = ResourceUtil.getInstance().getString('bbb.micSettings.webrtc.connecting'); - dotTimer = new Timer(200, 0); - dotTimer.addEventListener(TimerEvent.TIMER, dotAnimate); - dotTimer.start(); - - var testState:String = PhoneModel.getInstance().webRTCModel.state; - if (testState == Constants.DO_ECHO_TEST) { - webRTCEchoTestStarted(); - } + private function onCancelClicked():void { + if (dotTimer) + dotTimer.stop(); + PopUpUtil.removePopUp(this); + } + + private function onCreationComplete():void { + setCurrentState("connecting"); + lblConnectMessage.text = lblConnectMessageMock.text = ResourceUtil.getInstance().getString('bbb.micSettings.webrtc.connecting'); + dotTimer = new Timer(200, 0); + dotTimer.addEventListener(TimerEvent.TIMER, dotAnimate); + dotTimer.start(); + + var testState:String = PhoneModel.getInstance().webRTCModel.state; + if (testState == Constants.DO_ECHO_TEST) { + webRTCEchoTestStarted(); + } } private function dotAnimate(e:TimerEvent):void { diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/AdvancedList.as b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/AdvancedList.as index 1225327016..7dcda88dba 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/AdvancedList.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/AdvancedList.as @@ -37,22 +37,6 @@ package org.bigbluebutton.modules.chat.views { super(); } - - override protected function drawSelectionIndicator(indicator:Sprite, x:Number, y:Number, width:Number, height:Number, color:uint, itemRenderer:IListItemRenderer):void { - var g:Graphics = Sprite(indicator).graphics; - g.clear(); - //g.beginFill(color); - g.lineStyle(1, color, 1.0, true, "normal", CapsStyle.SQUARE, JointStyle.MITER); - g.drawRect(0, 0, width-2, height); - //g.endFill(); - - indicator.x = x; - indicator.y = y; - } - - override protected function drawHighlightIndicator(indicator:Sprite, x:Number, y:Number, width:Number, height:Number, color:uint, itemRenderer:IListItemRenderer):void { - - } override protected function measure():void { diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatBox.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatBox.mxml index 2818e5c671..facc384988 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatBox.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatBox.mxml @@ -566,7 +566,7 @@ with BigBlueButton; if not, see . . . _presentationWindow.slideView.onZoomSlide(100); var dispatcher:Dispatcher = new Dispatcher(); dispatchEvent(new StartCustomPollEvent("Custom", answers)); - PopUpManager.removePopUp(this); + PopUpUtil.removePopUp(this); } } @@ -83,7 +82,7 @@ with BigBlueButton; if not, see . - diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/PollResultsModal.as b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/PollResultsModal.as old mode 100755 new mode 100644 index b18ba6a137..0a1e850931 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/PollResultsModal.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/PollResultsModal.as @@ -14,8 +14,8 @@ package org.bigbluebutton.modules.polling.views import mx.controls.Label; import mx.controls.TextArea; import mx.core.ScrollPolicy; - import mx.managers.PopUpManager; + import org.bigbluebutton.core.PopUpUtil; import org.bigbluebutton.modules.polling.events.PollStoppedEvent; import org.bigbluebutton.modules.polling.events.PollVotedEvent; import org.bigbluebutton.modules.polling.events.ShowPollResultEvent; @@ -193,7 +193,7 @@ package org.bigbluebutton.modules.polling.views _stopPollListener.method = null; _stopPollListener = null; - PopUpManager.removePopUp(this); + PopUpUtil.removePopUp(this); } private function dotAnimate(e:TimerEvent):void { diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/managers/PresentManager.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/managers/PresentManager.as old mode 100755 new mode 100644 index 31d1645957..c7fad768e6 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/managers/PresentManager.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/managers/PresentManager.as @@ -24,10 +24,10 @@ package org.bigbluebutton.modules.present.managers import flash.geom.Point; import mx.core.FlexGlobals; - import mx.managers.PopUpManager; import org.bigbluebutton.common.IBbbModuleWindow; import org.bigbluebutton.common.events.OpenWindowEvent; + import org.bigbluebutton.core.PopUpUtil; import org.bigbluebutton.modules.present.events.PresentModuleEvent; import org.bigbluebutton.modules.present.events.UploadEvent; import org.bigbluebutton.modules.present.ui.views.FileUploadWindow; @@ -36,7 +36,6 @@ package org.bigbluebutton.modules.present.managers public class PresentManager { private var globalDispatcher:Dispatcher; - private var uploadWindow:FileUploadWindow; private var presentWindow:PresentationWindow; public function PresentManager() { @@ -62,24 +61,23 @@ package org.bigbluebutton.modules.present.managers event.window = window; globalDispatcher.dispatchEvent(event); } - - public function handleOpenUploadWindow(e:UploadEvent):void{ - if (uploadWindow != null) return; - uploadWindow = FileUploadWindow(PopUpManager.createPopUp(FlexGlobals.topLevelApplication as DisplayObject, FileUploadWindow, true)); - uploadWindow.maxFileSize = e.maxFileSize; - - var point1:Point = new Point(); - point1.x = FlexGlobals.topLevelApplication.width / 2; - point1.y = FlexGlobals.topLevelApplication.height / 2; - - uploadWindow.x = point1.x - (uploadWindow.width/2); - uploadWindow.y = point1.y - (uploadWindow.height/2); + public function handleOpenUploadWindow(e:UploadEvent):void{ + var uploadWindow : FileUploadWindow = PopUpUtil.createModalPopUp(FlexGlobals.topLevelApplication as DisplayObject, FileUploadWindow, false) as FileUploadWindow; + if (uploadWindow) { + uploadWindow.maxFileSize = e.maxFileSize; + + var point1:Point = new Point(); + point1.x = FlexGlobals.topLevelApplication.width / 2; + point1.y = FlexGlobals.topLevelApplication.height / 2; + + uploadWindow.x = point1.x - (uploadWindow.width/2); + uploadWindow.y = point1.y - (uploadWindow.height/2); + } } public function handleCloseUploadWindow():void{ - PopUpManager.removePopUp(uploadWindow); - uploadWindow = null; + PopUpUtil.removePopUp(FileUploadWindow); } } -} \ No newline at end of file +} diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/GotoPageDialog.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/GotoPageDialog.mxml deleted file mode 100755 index fbf635d6ec..0000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/GotoPageDialog.mxml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - 0 && page <= totalSlides ){ - dispatchEvent(new PresenterCommands(PresenterCommands.GOTO_SLIDE, page)); - } - } - PopUpManager.removePopUp(this); - - } - - private function onCreationComplete():void{ - txtPageNum.setFocus(); - } - - private function onKeyDown(e:KeyboardEvent):void{ - if (e.keyCode == Keyboard.ENTER){ - closeDialog(); - } - } - ]]> - - - - - - - - diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/PresentationWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/PresentationWindow.mxml index 3cd45ba848..7a61d2bf89 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/PresentationWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/PresentationWindow.mxml @@ -81,6 +81,7 @@ with BigBlueButton; if not, see . import org.bigbluebutton.common.events.LocaleChangeEvent; import org.bigbluebutton.core.BBB; import org.bigbluebutton.core.KeyboardUtil; + import org.bigbluebutton.core.PopUpUtil; import org.bigbluebutton.core.UsersUtil; import org.bigbluebutton.main.events.MadePresenterEvent; import org.bigbluebutton.main.events.ShortcutEvent; @@ -107,13 +108,12 @@ with BigBlueButton; if not, see . private static const LOGGER:ILogger = getClassLogger(PresentationWindow); - public static const TITLE:String = "Presentation"; + public static const TITLE:String = "Presentation"; private static const GOTO_PAGE_BUTTON:String = "Go to Page..."; [Bindable] - private var thumbY:Number; + private var thumbY:Number; public var uploadWindow:FileUploadWindow = null; - private var pageDialog:GotoPageDialog; [Bindable] private var DEFAULT_X_POSITION:Number = 237; [Bindable] private var DEFAULT_Y_POSITION:Number = 0; @@ -142,9 +142,6 @@ with BigBlueButton; if not, see . private var pollMenuData:Array; private var pollMenu:Menu; - private var pollResultsPopUp:PollResultsModal - private var pollChoicesPopUp:PollChoicesModal - [Embed(source="../../../polling/sounds/Poll.mp3")] private var noticeSoundClass:Class; private var noticeSound:Sound = new noticeSoundClass() as Sound; @@ -639,15 +636,16 @@ with BigBlueButton; if not, see . pollMenu.show(); } - - private function sendStartCustomPollEvent(pollType:String):void { - // Let's reset the page to display full size so we can display the result - // on the bottom right-corner. - pollChoicesPopUp = PopUpManager.createPopUp(this, PollChoicesModal, true) as PollChoicesModal; - pollChoicesPopUp.setPresentationWindow(this); - PopUpManager.centerPopUp(pollChoicesPopUp); - } - + + private function sendStartCustomPollEvent(pollType:String):void { + // Let's reset the page to display full size so we can display the result + // on the bottom right-corner. + var pollChoicesPopUp:PollChoicesModal = PopUpUtil.createModalPopUp(this, PollChoicesModal, true) as PollChoicesModal; + if (pollChoicesPopUp) { + pollChoicesPopUp.setPresentationWindow(this); + } + } + private function sendStartPollEvent(pollType:String):void { // Let's reset the page to display full size so we can display the result // on the bottom right-corner. @@ -703,9 +701,10 @@ with BigBlueButton; if not, see . // the event for this doesn't exist yet if (UsersUtil.amIPresenter()) { // display the results view - pollResultsPopUp = PopUpManager.createPopUp(this, PollResultsModal, true) as PollResultsModal; - pollResultsPopUp.setPoll(e.poll); - PopUpManager.centerPopUp(pollResultsPopUp); + var pollResultsPopUp : PollResultsModal = PopUpUtil.createModalPopUp(this, PollResultsModal, true) as PollResultsModal; + if (pollResultsPopUp) { + pollResultsPopUp.setPoll(e.poll); + } } else { //switch to vote state setControlBarState("vote"); @@ -769,7 +768,7 @@ with BigBlueButton; if not, see . private function pollStoppedHandler(e:PollStoppedEvent):void { setControlBarState("presenter"); - PopUpManager.removePopUp(pollResultsPopUp); + PopUpUtil.removePopUp(PollResultsModal); } private function pollShowResultHandler(e:PollShowResultEvent):void { diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/BreakoutRoomSettings.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/BreakoutRoomSettings.mxml old mode 100755 new mode 100644 index 99e641f550..7148f74a81 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/BreakoutRoomSettings.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/BreakoutRoomSettings.mxml @@ -36,8 +36,8 @@ with BigBlueButton; if not, see . import mx.collections.ArrayCollection; import mx.controls.Alert; - import mx.managers.PopUpManager; + import org.bigbluebutton.core.PopUpUtil; import org.bigbluebutton.core.managers.UserManager; import org.bigbluebutton.main.events.BreakoutRoomEvent; import org.bigbluebutton.main.model.users.BBBUser; @@ -57,7 +57,7 @@ with BigBlueButton; if not, see . private static var assignement : Dictionary; private function onCloseClicked():void { - PopUpManager.removePopUp(this); + PopUpUtil.removePopUp(this); } /** @@ -88,7 +88,7 @@ with BigBlueButton; if not, see . event.record = recordCheckbox.selected; dispatcher.dispatchEvent(event); storeAssignement(); - PopUpManager.removePopUp(this); + PopUpUtil.removePopUp(this); } else { Alert.show(ResourceUtil.getInstance().getString('bbb.users.breakout.insufficientUsers')); } @@ -115,7 +115,7 @@ with BigBlueButton; if not, see . } } if (usersInvited) { - PopUpManager.removePopUp(this); + PopUpUtil.removePopUp(this); } else { Alert.show(ResourceUtil.getInstance().getString('bbb.users.breakout.insufficientUsers')); } diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/EmojiGrid.as b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/EmojiGrid.as old mode 100755 new mode 100644 index 79aacc9b0e..7749b72bb0 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/EmojiGrid.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/EmojiGrid.as @@ -23,15 +23,14 @@ package org.bigbluebutton.modules.users.views { import flash.events.MouseEvent; import mx.containers.HBox; - import mx.containers.Tile; import mx.containers.VBox; import mx.controls.Button; import mx.controls.Label; import mx.core.ScrollPolicy; import mx.events.FlexMouseEvent; - import mx.managers.PopUpManager; import org.bigbluebutton.common.Images; + import org.bigbluebutton.core.PopUpUtil; import org.bigbluebutton.core.managers.UserManager; import org.bigbluebutton.main.model.users.events.EmojiStatusEvent; import org.bigbluebutton.util.i18n.ResourceUtil; @@ -121,7 +120,7 @@ package org.bigbluebutton.modules.users.views { * Hides the menu */ public function hide():void { - PopUpManager.removePopUp(this); + PopUpUtil.removePopUp(this); } } } diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/UsersWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/UsersWindow.mxml index 5fc53f98f0..b398bc5dd5 100644 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/UsersWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/UsersWindow.mxml @@ -65,6 +65,7 @@ import org.bigbluebutton.common.Images; import org.bigbluebutton.common.events.LocaleChangeEvent; import org.bigbluebutton.core.KeyboardUtil; + import org.bigbluebutton.core.PopUpUtil; import org.bigbluebutton.core.TimerUtil; import org.bigbluebutton.core.UsersUtil; import org.bigbluebutton.core.events.LockControlEvent; @@ -259,12 +260,12 @@ dispatcher.dispatchEvent(rollEvent); } - private function openEmojiStatusMenu():void { - var grid:EmojiGrid = PopUpManager.createPopUp(DisplayObject(FlexGlobals.topLevelApplication), EmojiGrid, false) as EmojiGrid; - var menuXY:Point = emojiStatusBtn.localToGlobal(new Point(emojiStatusBtn.width + 2, emojiStatusBtn.height - grid.height)); - grid.x = menuXY.x; - grid.y = menuXY.y; - } + private function openEmojiStatusMenu():void { + var grid:EmojiGrid = PopUpUtil.createNonModelPopUp(DisplayObject(FlexGlobals.topLevelApplication), EmojiGrid, false) as EmojiGrid; + var menuXY:Point = emojiStatusBtn.localToGlobal(new Point(emojiStatusBtn.width + 2, emojiStatusBtn.height - grid.height)); + grid.x = menuXY.x; + grid.y = menuXY.y; + } private function openSettings():void { paramsMenuData = []; @@ -370,50 +371,11 @@ private function removeJoinAlert():void { if (joinAlert != null) { + // @todo: any way using PopUpUtil ? PopUpManager.removePopUp(joinAlert); } } - /*private function unlockAll():void { - LogUtil.traceObject("Action: unlockAll"); - if (amIModerator) { - if (roomLocked) { - var unlockCommand:LockControlEvent = new LockControlEvent(LockControlEvent.UNLOCK_ALL); - dispatchEvent(unlockCommand); - roomLocked = false; - } else { - LogUtil.error("Action: unlockAll, but room is not locked"); - } - } - } - - private function lockAll():void { - LogUtil.traceObject("Action: lockAll"); - if (amIModerator) { - if (!roomLocked) { - var lockCommand:LockControlEvent = new LockControlEvent(LockControlEvent.LOCK_ALL); - dispatchEvent(lockCommand); - roomLocked = true; - } else { - LogUtil.error("Action: lockAll, but room is already locked"); - } - } - } - - private function lockAlmostAll():void { - LogUtil.traceObject("Action: lockAlmostAll"); - - if (amIModerator) { - if (!roomLocked) { - var lockCommand:LockControlEvent = new LockControlEvent(LockControlEvent.LOCK_ALMOST_ALL); - dispatchEvent(lockCommand); - roomLocked = true; - } else { - LogUtil.error("Action: lockAlmostAll, but room is already locked"); - } - } - } - */ private function handleMeetingMuted(e:MeetingMutedEvent):void { roomMuted = MeetingModel.getInstance().meetingMuted; } diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/maps/VideoEventMapDelegate.as b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/maps/VideoEventMapDelegate.as index d4f148cbd1..32c88f2475 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/maps/VideoEventMapDelegate.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/maps/VideoEventMapDelegate.as @@ -60,8 +60,8 @@ package org.bigbluebutton.modules.videoconf.maps public class VideoEventMapDelegate { - private static const LOGGER:ILogger = getClassLogger(VideoEventMapDelegate); - private static var PERMISSION_DENIED_ERROR:String = "PermissionDeniedError"; + private static const LOGGER:ILogger = getClassLogger(VideoEventMapDelegate); + private static var PERMISSION_DENIED_ERROR:String = "PermissionDeniedError"; private var options:VideoConfOptions = new VideoConfOptions(); private var uri:String; @@ -71,7 +71,6 @@ package org.bigbluebutton.modules.videoconf.maps private var _dispatcher:IEventDispatcher; private var _ready:Boolean = false; - private var _isPublishing:Boolean = false; private var _isPreviewWebcamOpen:Boolean = false; private var _isWaitingActivation:Boolean = false; private var _chromeWebcamPermissionDenied:Boolean = false; @@ -79,18 +78,17 @@ package org.bigbluebutton.modules.videoconf.maps private var _videoDock:VideoDock; private var _graphics:GraphicsWrapper = new GraphicsWrapper(); private var streamList:ArrayList = new ArrayList(); - private var numberOfWindows:Object = new Object(); - private var _restream:Boolean = false; - private var _cameraIndex:int; - private var _videoProfile:VideoProfile; - - private var globalDispatcher:Dispatcher; - + private var _restream:Boolean = false; + private var _myCamSettings:ArrayCollection = null; + + private var globalDispatcher:Dispatcher; + public function VideoEventMapDelegate(dispatcher:IEventDispatcher) { _dispatcher = dispatcher; - globalDispatcher = new Dispatcher(); + globalDispatcher = new Dispatcher(); + _myCamSettings = new ArrayCollection(); } private function get me():String { @@ -119,14 +117,14 @@ package org.bigbluebutton.modules.videoconf.maps } } - public function handleStreamStoppedEvent(event:StreamStoppedEvent):void { - if (UserManager.getInstance().getConference().amIThisUser(event.userId)) { - closePublishWindowByStream(event.streamId); - } else { - closeViewWindowWithStream(event.userId, event.streamId); - } - } - + public function handleStreamStoppedEvent(event:StreamStoppedEvent):void { + if (UserManager.getInstance().getConference().amIThisUser(event.userId)) { + closePublishWindowByStream(event.streamId); + } else { + closeViewWindowWithStream(event.userId, event.streamId); + } + } + public function handleUserLeftEvent(event:UserLeftEvent):void { LOGGER.debug("VideoEventMapDelegate:: [{0}] handleUserLeftEvent. ready = [{1}]", [me, _ready]); @@ -136,7 +134,7 @@ package org.bigbluebutton.modules.videoconf.maps } public function handleUserJoinedEvent(event:UserJoinedEvent):void { - LOGGER.debug("VideoEventMapDelegate:: [{0}] handleUserJoinedEvent. ready = [{1}]", [me, _ready]); + LOGGER.debug("VideoEventMapDelegate:: [{0}] handleUserJoinedEvent. ready = [{1}]", [me, _ready]); if (!_ready) return; @@ -165,7 +163,7 @@ package org.bigbluebutton.modules.videoconf.maps var event:ToolbarButtonEvent = new ToolbarButtonEvent(ToolbarButtonEvent.ADD); event.button = button; - event.module="Webcam"; + event.module="Webcam"; _dispatcher.dispatchEvent(event); } } @@ -221,7 +219,7 @@ package org.bigbluebutton.modules.videoconf.maps } private function openWebcamWindows():void { - LOGGER.debug("VideoEventMapDelegate:: [{0}] openWebcamWindows. ready = [{1}]", [me, _ready]); + LOGGER.debug("VideoEventMapDelegate:: [{0}] openWebcamWindows. ready = [{1}]", [me, _ready]); var uids:ArrayCollection = UsersUtil.getUserIDs(); @@ -308,45 +306,42 @@ package org.bigbluebutton.modules.videoconf.maps public function connectToVideoApp():void { proxy = new VideoProxy(uri); - proxy.reconnectWhenDisconnected(true); + proxy.reconnectWhenDisconnected(true); proxy.connect(); } public function startPublishing(e:StartBroadcastEvent):void{ - LOGGER.debug("VideoEventMapDelegate:: [{0}] startPublishing:: Publishing stream to: {1}/{2}", [me, proxy.connection.uri, e.stream]); + LOGGER.debug("VideoEventMapDelegate:: [{0}] startPublishing:: Publishing stream to: {1}/{2}", [me, proxy.connection.uri, e.stream]); proxy.startPublishing(e); - _isWaitingActivation = false; - _isPublishing = true; - UsersUtil.setIAmPublishing(true); + _isWaitingActivation = false; - var broadcastEvent:BroadcastStartedEvent = new BroadcastStartedEvent(); - streamList.addItem(e.stream); - broadcastEvent.stream = e.stream; - broadcastEvent.userid = UsersUtil.getMyUserID(); - broadcastEvent.isPresenter = UsersUtil.amIPresenter(); - broadcastEvent.camSettings = UsersUtil.amIPublishing(); + var arr: ArrayCollection = UsersUtil.amIPublishing(); + for (var i:int = 0; i < arr.length; i++) { + var broadcastEvent:BroadcastStartedEvent = new BroadcastStartedEvent(); + streamList.addItem(e.stream); + broadcastEvent.stream = e.stream; + broadcastEvent.userid = UsersUtil.getMyUserID(); + broadcastEvent.isPresenter = UsersUtil.amIPresenter(); + broadcastEvent.camSettings = arr.getItemAt(i) as CameraSettingsVO; - _dispatcher.dispatchEvent(broadcastEvent); - if (proxy.videoOptions.showButton) { - button.callLater(button.publishingStatus, [button.START_PUBLISHING]); - } + _dispatcher.dispatchEvent(broadcastEvent); + } + + if (proxy.videoOptions.showButton) { + button.callLater(button.publishingStatus, [button.START_PUBLISHING]); + } } public function stopPublishing(e:StopBroadcastEvent):void{ LOGGER.debug("VideoEventMapDelegate:: [{0}] Stop publishing. ready = [{1}]", [me, _ready]); - checkLastBroadcasting(); + UsersUtil.removeCameraSettings(e.camId); + streamList.removeItem(e.stream); stopBroadcasting(e.stream); button.setCamAsInactive(e.camId); } - private function checkLastBroadcasting():void { - LOGGER.debug("[VideoEventMapDelegate:checkLastBroadcasting]"); - _isPublishing = streamList.length > 0; - UsersUtil.setIAmPublishing(streamList.length > 0); - } - private function stopBroadcasting(stream:String = ""):void { if (stream == null) stream = ""; LOGGER.debug("Stopping broadcast{0}", [(stream.length > 0? " of stream [" + stream + "]": "")]); @@ -383,18 +378,18 @@ package org.bigbluebutton.modules.videoconf.maps public function handleClosePublishWindowEvent(event:ClosePublishWindowEvent):void { LOGGER.debug("Closing publish window"); - if (_isPublishing || _chromeWebcamPermissionDenied) { + if (_myCamSettings.length > 0 || _chromeWebcamPermissionDenied) { stopBroadcasting(); } } public function handleShareCameraRequestEvent(event:ShareCameraRequestEvent):void { - LOGGER.debug("[VideoEventMapDelegate:handleShareCameraRequestEvent]"); - if (options.skipCamSettingsCheck) { - skipCameraSettingsCheck(); - } else { - openWebcamPreview(event.publishInClient, event.defaultCamera, event.camerasArray); - } + LOGGER.debug("[VideoEventMapDelegate:handleShareCameraRequestEvent] {0} {1}", [options.skipCamSettingsCheck, event.toString()]); + if (options.skipCamSettingsCheck) { + skipCameraSettingsCheck(); + } else { + openWebcamPreview(event.publishInClient, event.defaultCamera, event.camerasArray); + } } public function handleStopAllShareCameraRequestEvent(event:StopShareCameraRequestEvent):void { @@ -407,12 +402,15 @@ package org.bigbluebutton.modules.videoconf.maps var userID:String = UsersUtil.getMyUserID(); var camIndex:int = event.camId; + // remove the camera from the settings so it does not resume sharing on refresh + removeCamera(camIndex); + _graphics.removeVideoByCamIndex(userID, camIndex); } - public function handleCamSettingsClosedEvent(event:BBBEvent):void{ - _isPreviewWebcamOpen = false; - } + public function handleCamSettingsClosedEvent(event:BBBEvent):void{ + _isPreviewWebcamOpen = false; + } private function openWebcamPreview(publishInClient:Boolean, defaultCamera:String, camerasArray:Object):void { var openEvent:BBBEvent = new BBBEvent(BBBEvent.OPEN_WEBCAM_PREVIEW); @@ -421,7 +419,7 @@ package org.bigbluebutton.modules.videoconf.maps openEvent.payload.camerasArray = camerasArray; openEvent.payload.chromePermissionDenied = _chromeWebcamPermissionDenied; - _isPreviewWebcamOpen = true; + _isPreviewWebcamOpen = true; _dispatcher.dispatchEvent(openEvent); } @@ -432,13 +430,13 @@ package org.bigbluebutton.modules.videoconf.maps var event:CloseWindowEvent = new CloseWindowEvent(CloseWindowEvent.CLOSE_WINDOW_EVENT); event.window = _videoDock; globalDispatcher.dispatchEvent(event); - proxy.reconnectWhenDisconnected(false); + proxy.reconnectWhenDisconnected(false); proxy.disconnect(); } private function closeAllWindows():void { LOGGER.debug("VideoEventMapDelegate:: closing all windows"); - if (_isPublishing) { + if (_myCamSettings.length > 0) { stopBroadcasting(); } @@ -459,7 +457,7 @@ package org.bigbluebutton.modules.videoconf.maps if (options.showButton){ LOGGER.debug("****************** Switching to viewer. Show video button?=[{0}]", [UsersUtil.amIPresenter()]); displayToolbarButton(); - if (_isPublishing && options.presenterShareOnly) { + if (_myCamSettings.length > 0 && options.presenterShareOnly) { stopBroadcasting(); } } @@ -478,33 +476,58 @@ package org.bigbluebutton.modules.videoconf.maps openWebcamWindows(); } - public function handleCameraSetting(event:BBBEvent):void { - _cameraIndex = event.payload.cameraIndex; - _videoProfile = event.payload.videoProfile; - _restream = event.payload.restream; - LOGGER.debug("VideoEventMapDelegate::handleCameraSettings [{0},{1}]", [_cameraIndex, _videoProfile.id]); - initCameraWithSettings(_cameraIndex, _videoProfile); + private function addCamera(camIndex:int, videoProfile:VideoProfile):void { + var camSettings:CameraSettingsVO = new CameraSettingsVO(); + camSettings.camIndex = camIndex; + camSettings.videoProfile = videoProfile; + camSettings.isPublishing = true; + + if(!_myCamSettings.contains(camSettings)) { + _myCamSettings.addItem(camSettings); + } + } + + private function removeCamera(camIndex:int):void { + for(var i:int = 0; i < _myCamSettings.length; i++) { + if (_myCamSettings.getItemAt(i) != null && _myCamSettings.getItemAt(i).camIndex == camIndex) { + _myCamSettings.removeItemAt(i); + } + } + } + + public function handleCameraSetting(event:BBBEvent):void { + var camIndex:int = event.payload.cameraIndex; + var videoProfile:VideoProfile = event.payload.videoProfile; + + addCamera(camIndex, videoProfile); + + _restream = event.payload.restream; + LOGGER.debug("VideoEventMapDelegate::handleCameraSettings [{0},{1}] _restream={2}", [camIndex, videoProfile.id, _restream]); + initCameraWithSettings(camIndex, videoProfile); + } + + public function handleEraseCameraSetting(event:BBBEvent):void { + _myCamSettings = new ArrayCollection(); + + LOGGER.debug("VideoEventMapDelegate::handleEraseCameraSetting [{0}]", [event.toString()]); + _restream = event.payload.restream; + } + + private function handleRestream():void { + if(_restream){ + for each(var aCamSettings:CameraSettingsVO in _myCamSettings) { + LOGGER.debug("VideoEventMapDelegate::handleRestream [{0},{1}]", [aCamSettings.camIndex, aCamSettings.videoProfile.id]); + initCameraWithSettings(aCamSettings.camIndex, aCamSettings.videoProfile); + } + } } - public function handleEraseCameraSetting(event:BBBEvent):void { - _cameraIndex = -1; - _videoProfile = null; - _restream = event.payload.restream; - } - - private function handleRestream():void { - if(_restream){ - LOGGER.debug("VideoEventMapDelegate::handleRestream [{0},{1}]", [_cameraIndex, _videoProfile.id]); - initCameraWithSettings(_cameraIndex, _videoProfile); - } - } - private function initCameraWithSettings(camIndex:int, videoProfile:VideoProfile):void { var camSettings:CameraSettingsVO = new CameraSettingsVO(); camSettings.camIndex = camIndex; camSettings.videoProfile = videoProfile; - - UsersUtil.setCameraSettings(camSettings); + camSettings.isPublishing = true; + UsersUtil.addCameraSettings(camSettings); _isWaitingActivation = true; button.setCamAsActive(camIndex); diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/model/PublishingModel.as b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/model/PublishingModel.as deleted file mode 100755 index 7c08aced36..0000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/model/PublishingModel.as +++ /dev/null @@ -1,33 +0,0 @@ -/** - * 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 . - * - */ -package org.bigbluebutton.modules.videoconf.model -{ - public class PublishingModel - { - public var streamName; - public var camIndex:int; - public var camWidth:int; - public var camHeight:int; - public var isPublishing:Boolean = false; - - public function PublishingModel() - { - } - } -} \ No newline at end of file diff --git a/record-and-playback/presentation/playback/presentation/0.9.0/lib/popcorn.chattimeline.js b/record-and-playback/presentation/playback/presentation/0.9.0/lib/popcorn.chattimeline.js index 015c2ce3e1..0838bd9268 100755 --- a/record-and-playback/presentation/playback/presentation/0.9.0/lib/popcorn.chattimeline.js +++ b/record-and-playback/presentation/playback/presentation/0.9.0/lib/popcorn.chattimeline.js @@ -58,18 +58,11 @@ i++; - // Default to empty if not used - //options.innerHTML = options.innerHTML || ""; + contentDiv.innerHTML = "" + options.name + ":" + options.message; //If chat message contains a link, we add to it a target attribute //So when the user clicks on it, it opens in a new tab - if($(options.message).attr('href')) { - var tempHtml = $('
',{html:options.message}); - $(tempHtml).find('a').attr("target","_blank"); - options.message = tempHtml.html(); - } - - contentDiv.innerHTML = "" + options.name + ":" + options.message; + $(contentDiv).find('a').attr('target', '_blank'); return {