merge in r669 and r670

git-svn-id: http://bigbluebutton.googlecode.com/svn/trunk@671 af16638f-c34d-0410-8cfa-b39d5352b314
This commit is contained in:
Richard Alam 2008-11-05 19:42:07 +00:00
parent aa60de6feb
commit aa0149caac
5 changed files with 34 additions and 33 deletions

View File

@ -197,9 +197,7 @@ package org.bigbluebutton.modules.presentation.view
private function handleStartShareEvent():void
{
trace('Handle start share event');
if (! proxy.isPresenter()) {
trace('loading presentation as viewer');
proxy.loadPresentation();
}
}
@ -212,23 +210,16 @@ package org.bigbluebutton.modules.presentation.view
private function handlePresentationLoadedEvent():void
{
// Remove the uploadWindow
PopUpManager.removePopUp(_presWin.uploadWindow);
// Remove the mediator
facade.removeMediator(FileUploadWindowMediator.NAME);
_presWin.slideView.slides = proxy.slides;
if ( ! facade.hasMediator( ThumbnailViewMediator.NAME ) ) {
trace("Registering ThumbnailViewMediator");
facade.registerMediator(new ThumbnailViewMediator(_presWin.slideView ));
} else {
trace("ThumbnailViewMediator already registered");
}
_presWin.slideView.slides = proxy.slides;
_presWin.slideNumLbl.text = (_presWin.slideView.selectedSlide + 1) + " of " + _presWin.slideView.slides.length;
_presWin.slideView.visible = true;
if (proxy.isPresenter()) {
// Remove the uploadWindow
PopUpManager.removePopUp(_presWin.uploadWindow);
// Remove the mediator
facade.removeMediator(FileUploadWindowMediator.NAME);
_presWin.backButton.visible = true;
_presWin.forwardButton.visible = true;
proxy.sharePresentation(true);
@ -305,11 +296,8 @@ package org.bigbluebutton.modules.presentation.view
_presWin.uploadWindow.y = point1.y + 25;
if ( ! facade.hasMediator( FileUploadWindowMediator.NAME ) ) {
trace("Registering FileUploadMediator");
facade.registerMediator(new FileUploadWindowMediator( _presWin.uploadWindow ));
} else {
trace("FileuploadMediator already registered");
}
}
}
private function get proxy():PresentProxy {

View File

@ -20,6 +20,7 @@
package org.bigbluebutton.modules.viewers
{
import org.bigbluebutton.modules.viewers.model.vo.User;
import org.bigbluebutton.modules.viewers.view.ViewersWindowMediator;
import org.bigbluebutton.modules.viewers.view.components.ViewersWindow;
import org.puremvc.as3.multicore.interfaces.IMediator;
import org.puremvc.as3.multicore.interfaces.INotification;
@ -92,10 +93,16 @@ package org.bigbluebutton.modules.viewers
switch(notification.getName()){
case ViewersModuleConstants.LOGGED_OUT:
sendNotification(ViewersModuleConstants.CLOSE_VIEWERS_WINDOW);
if (facade.hasMediator(ViewersWindowMediator.NAME)) {
facade.removeMediator(ViewersWindowMediator.NAME);
}
sendNotification(ViewersModuleConstants.OPEN_JOIN_WINDOW);
break;
case ViewersModuleConstants.LOGGED_IN:
sendNotification(ViewersModuleConstants.CLOSE_JOIN_WINDOW);
if (! facade.hasMediator(ViewersWindowMediator.NAME)) {
facade.registerMediator(new ViewersWindowMediator());
}
sendNotification(ViewersModuleConstants.OPEN_VIEWERS_WINDOW);
break;
}

View File

@ -42,9 +42,7 @@ package org.bigbluebutton.modules.viewers.controller
facade.registerMediator(new ViewersModuleMediator(m));
facade.registerMediator(new ViewersEndpointMediator(m));
facade.registerMediator(new JoinWindowMediator(m));
facade.registerMediator(new ViewersWindowMediator());
facade.registerProxy(new ViewersProxy(m.uri));
trace('Sending MODULE_STARTED for ViewersModule');
sendNotification(ViewersModuleConstants.STARTED);
}

View File

@ -59,7 +59,8 @@ package org.bigbluebutton.modules.viewers.view
private function onViewerSelectedEvent(e:Event):void {
if (proxy.isModerator())
_viewersWindow.presentBtn.visible = true;
_viewersWindow.presentBtn.enabled = true;
_viewersWindow.presentBtn.toolTip = "Click to make " + _viewersWindow.viewersGrid.selectedItem.name + " as presenter.";
}
private function onAssignPresenter(e:AssignPresenterEvent):void {
@ -90,15 +91,7 @@ package org.bigbluebutton.modules.viewers.view
switch(notification.getName()){
case ViewersModuleConstants.OPEN_VIEWERS_WINDOW:
trace('Received request to OPEN_VIEWERS_WINDOW');
var p:ViewersProxy = facade.retrieveProxy(ViewersProxy.NAME) as ViewersProxy;
_viewersWindow.participants = p.participants;
_viewersWindow.width = 210;
_viewersWindow.height = 220;
_viewersWindow.title = "Viewers";
_viewersWindow.showCloseButton = false;
_viewersWindow.xPosition = 30;
_viewersWindow.yPosition = 30;
facade.sendNotification(ViewersModuleConstants.ADD_WINDOW, _viewersWindow);
handleOpenViewersWindow();
break;
case ViewersModuleConstants.CLOSE_VIEWERS_WINDOW:
facade.sendNotification(ViewersModuleConstants.REMOVE_WINDOW, _viewersWindow);
@ -113,6 +106,18 @@ package org.bigbluebutton.modules.viewers.view
break;
}
}
private function handleOpenViewersWindow():void {
_viewersWindow.participants = proxy.participants;
_viewersWindow.isModerator = proxy.isModerator();
_viewersWindow.width = 210;
_viewersWindow.height = 220;
_viewersWindow.title = "Viewers";
_viewersWindow.showCloseButton = false;
_viewersWindow.xPosition = 30;
_viewersWindow.yPosition = 30;
facade.sendNotification(ViewersModuleConstants.ADD_WINDOW, _viewersWindow);
}
/**
* Change the raisehand/lowerhand status

View File

@ -19,6 +19,9 @@
[Bindable]
public var participants:ArrayCollection = new ArrayCollection();
[Bindable]
public var isModerator:Boolean = false;
public var images:Images = new Images();
[Bindable]
@ -95,9 +98,9 @@
</mx:DataGrid>
<mx:ControlBar width="100%">
<mx:Button id="presentBtn" icon="{presenterIcon}" visible="false"
<mx:Button id="presentBtn" icon="{presenterIcon}" visible="{isModerator}" enabled="{viewersGrid.selectedItem != null}"
width="20" height="20"
toolTip="Click to make {viewersGrid.selectedItem.name} as presenter." click="dispatchEvent(new AssignPresenterEvent(viewersGrid.selectedItem.userid))"/>
toolTip="Select viewer and click here to make viewer the presenter." click="dispatchEvent(new AssignPresenterEvent(viewersGrid.selectedItem.userid))"/>
<mx:Spacer width="100%"/>
<!--mx:Button id="raiseHandImage" icon="{toggleIcon}" toggle="true"
width="20" height="20"