- cleanup

- add parameter to hide viewer and listeners windows. Need to make thsi more flexible later on.
This commit is contained in:
Richard Alam 2011-07-13 18:15:39 -04:00
parent d250710b28
commit cd479689a6
8 changed files with 62 additions and 41 deletions

View File

@ -32,11 +32,13 @@
uri="rtmp://HOST/bigbluebutton"
host="http://HOST/bigbluebutton/api/enter"
allowKickUser="false"
visible="true"
/>
<module name="ListenersModule" url="ListenersModule.swf?v=VERSION"
uri="rtmp://HOST/bigbluebutton"
recordingHost="http://HOST"
visible="true"
/>
<module name="DeskShareModule"

View File

@ -32,33 +32,33 @@
<![CDATA[
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.core.managers.ConfigManager2;
import mx.managers.HistoryManager;
import org.bigbluebutton.main.views.MainApplicationShell;
import org.bigbluebutton.util.i18n.ResourceUtil;
private var langResources:ResourceUtil = ResourceUtil.getInstance();
import mx.managers.HistoryManager;
/**
* Thse two lines are workaround for this. (ralam - Nov 8, 2008)
* http://gregjessup.com/flex-3-advanceddatagrid-cannot-convert-mxmanagersdragmanagerimpl-to-mxmanagersidragmanager/
* http://butterfliesandbugs.wordpress.com/2007/10/25/workaround-for-error-when-loading-popups-from-modules/
*/
import mx.managers.IDragManager;
private var iDragManager:IDragManager;
/** another workaround - for this issue: https://bugs.adobe.com/jira/browse/SDK-13121*/
private var hist:HistoryManager
private var configMgr:ConfigManager2 = BBB.initConfigManager();
private function init():void {
configMgr.loadConfig();
}
import org.bigbluebutton.main.views.MainApplicationShell;
import org.bigbluebutton.util.i18n.ResourceUtil;
private var langResources:ResourceUtil = ResourceUtil.getInstance();
/**
* Thse two lines are workaround for this. (ralam - Nov 8, 2008)
* http://gregjessup.com/flex-3-advanceddatagrid-cannot-convert-mxmanagersdragmanagerimpl-to-mxmanagersidragmanager/
* http://butterfliesandbugs.wordpress.com/2007/10/25/workaround-for-error-when-loading-popups-from-modules/
*/
import mx.managers.IDragManager;
private var iDragManager:IDragManager;
/** another workaround - for this issue: https://bugs.adobe.com/jira/browse/SDK-13121*/
private var hist:HistoryManager
private var configMgr:ConfigManager2 = BBB.initConfigManager();
private function init():void {
configMgr.loadConfig();
}
]]>
</mx:Script>
<maps:ApplicationEventMap />
<views:MainApplicationShell id="mainShell"/>
</mx:Application>

View File

@ -39,7 +39,6 @@
import org.bigbluebutton.modules.chat.events.StartChatModuleEvent;
import org.bigbluebutton.modules.chat.events.StopChatModuleEvent;
import org.bigbluebutton.modules.chat.events.TranscriptEvent;
import org.bigbluebutton.modules.chat.managers.ChatManager;
import org.bigbluebutton.modules.chat.services.PrivateChatService;
import org.bigbluebutton.modules.chat.services.PublicChatService;
import org.bigbluebutton.modules.chat.views.ChatView;
@ -48,14 +47,11 @@
<EventHandlers type="{FlexEvent.PREINITIALIZE}">
<ObjectBuilder generator="{ChatEventMapDelegate}" constructorArguments="{scope.dispatcher}"/>
<ObjectBuilder generator="{ChatManager}" />
<ObjectBuilder generator="{PublicChatService}" />
<ObjectBuilder generator="{PrivateChatService}" />
<ObjectBuilder generator="{PrivateChatService}" />
</EventHandlers>
<EventHandlers type="{StartChatModuleEvent.START_CHAT_MODULE_EVENT}">
<MethodInvoker generator="{ChatManager}" method="setModuleAttributes" arguments="{event.attributes}"/>
<MethodInvoker generator="{PublicChatService}" method="setModuleAttributes" arguments="{event.attributes}" />
<MethodInvoker generator="{PublicChatService}" method="join"/>
<MethodInvoker generator="{PrivateChatService}" method="setModuleAttributes" arguments="{event.attributes}" />
@ -85,11 +81,7 @@
<EventHandlers type="{QueryParticipantsEvent.QUERY_PARTICIPANTS_EVENT}">
<MethodInvoker generator="{PrivateChatService}" method="queryForParticipants"/>
</EventHandlers>
<EventHandlers type="{ChatEvent.CHAT_EVENT}">
<MethodInvoker generator="{ChatManager}" method="receivedGlobalMessage" />
</EventHandlers>
<EventHandlers type="{TranscriptEvent.LOAD_TRANSCRIPT}" >
<MethodInvoker generator="{PublicChatService}" method="loadTranscript" />
</EventHandlers>

View File

@ -51,18 +51,13 @@ package org.bigbluebutton.modules.chat.maps {
private function getChatOptions():void {
var cxml:XML = BBB.initConfigManager().config.getModuleConfig("ChatModule");
if (cxml != null) {
LogUtil.debug("*** CHAT Options = " + cxml.toXMLString());
chatOptions.privateEnabled = (cxml.@privateEnabled.toUpperCase() == "TRUE") ? true : false;
}
}
public function openChatWindow():void {
LogUtil.debug("**** HELP = " + BBB.initConfigManager().config.help.url);
getChatOptions();
_chatWindow.chatOptions = chatOptions;
LogUtil.debug("Opening Chat Window!!!! " + (_chatWindow != null));
_chatWindow.title = ResourceUtil.getInstance().getString("bbb.chat.title");
_chatWindow.showCloseButton = false;

View File

@ -22,7 +22,9 @@ package org.bigbluebutton.modules.listeners.managers
import org.bigbluebutton.common.events.CloseWindowEvent;
import org.bigbluebutton.common.events.OpenWindowEvent;
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.modules.listeners.events.StartListenersModuleEvent;
import org.bigbluebutton.modules.listeners.model.ListenerOptions;
import org.bigbluebutton.modules.listeners.views.ListenersWindow;
public class ListenersManager
@ -31,13 +33,24 @@ package org.bigbluebutton.modules.listeners.managers
private var dispatcher:Dispatcher;
private var listenersWindow:ListenersWindow;
[Bindable]
public var listenerOptions:ListenerOptions;
public function ListenersManager(){
dispatcher = new Dispatcher();
listenerOptions = new ListenerOptions();
var vxml:XML = BBB.initConfigManager().config.getModuleConfig("ListenersModule");
if (vxml != null) {
listenerOptions.visible = (vxml.@visible.toUpperCase() == "TRUE") ? true : false;
}
}
public function moduleStarted(event:StartListenersModuleEvent):void{
if (listenersWindow == null){
listenersWindow = new ListenersWindow();
listenersWindow.listenerOptions = listenerOptions;
var e:OpenWindowEvent = new OpenWindowEvent(OpenWindowEvent.OPEN_WINDOW_EVENT);
e.window = listenersWindow;
dispatcher.dispatchEvent(e);

View File

@ -32,6 +32,7 @@
<mx:Script>
<![CDATA[
import org.bigbluebutton.modules.listeners.model.ListenerOptions;
import flash.events.MouseEvent;
import flexlib.mdi.events.MDIWindowEvent;
@ -61,9 +62,12 @@
[Bindable] public var moderator:Boolean;
[Bindable] private var windowTitle:String = ResourceUtil.getInstance().getString('bbb.listeners.title', ["",""]);
[Bindable] public var listenerOptions:ListenerOptions;
private function onCreationComplete():void {
BindingUtils.bindSetter(updateNumberOfListeners, listeners, "length");
BindingUtils.bindSetter(updateNumberOfListeners, listeners, "length");
this.visible = listenerOptions.visible;
}
private function updateNumberOfListeners(numListeners:int):void {

View File

@ -20,12 +20,12 @@ package org.bigbluebutton.modules.viewers.managers
{
import com.asfusion.mate.events.Dispatcher;
import mx.controls.Alert;
import org.bigbluebutton.common.events.CloseWindowEvent;
import org.bigbluebutton.common.events.OpenWindowEvent;
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.modules.viewers.events.ViewersModuleEndEvent;
import org.bigbluebutton.modules.viewers.events.ViewersModuleStartedEvent;
import org.bigbluebutton.modules.viewers.model.ViewerOptions;
import org.bigbluebutton.modules.viewers.views.ViewersWindow;
public class ViewersManager
@ -34,9 +34,17 @@ package org.bigbluebutton.modules.viewers.managers
private var dispatcher:Dispatcher;
private var _module:ViewersModule;
[Bindable]
private var viewerOptions:ViewerOptions;
public function ViewersManager(){
dispatcher = new Dispatcher();
viewerOptions = new ViewerOptions();
var vxml:XML = BBB.initConfigManager().config.getModuleConfig("ViewersModule");
if (vxml != null) {
viewerOptions.visible = (vxml.@visible.toUpperCase() == "TRUE") ? true : false;
}
}
public function moduleStarted(e:ViewersModuleStartedEvent):void{
@ -44,6 +52,8 @@ package org.bigbluebutton.modules.viewers.managers
if (viewersWindow == null){
viewersWindow = new ViewersWindow();
viewersWindow.viewerOptions = viewerOptions;
var windowEvent:OpenWindowEvent = new OpenWindowEvent(OpenWindowEvent.OPEN_WINDOW_EVENT);
windowEvent.window = viewersWindow;
dispatcher.dispatchEvent(windowEvent);

View File

@ -32,6 +32,7 @@
<mx:Script>
<![CDATA[
import org.bigbluebutton.modules.viewers.model.ViewerOptions;
import com.asfusion.mate.events.Dispatcher;
import flexlib.mdi.events.MDIWindowEvent;
@ -68,6 +69,8 @@
[Bindable] public var presenterIcon : Class = images.presenter;
[Bindable] public var handIcon:Class = images.raisehand;
[Bindable] public var viewerOptions:ViewerOptions;
private var dispatcher:Dispatcher;
private function onCreationComplete():void {
@ -76,6 +79,8 @@
this.isModerator = (conference.me.role == Role.MODERATOR);
BindingUtils.bindSetter(updateNumberOfViewers, participants, "length");
dispatcher = new Dispatcher();
this.visible = viewerOptions.visible;
}
private function updateNumberOfViewers(numViewers:int):void {