diff --git a/bigbluebutton-client/src/BigBlueButtonTest.mxml b/bigbluebutton-client/src/BigBlueButtonTest.mxml index b6a9968b73..df3eee7078 100755 --- a/bigbluebutton-client/src/BigBlueButtonTest.mxml +++ b/bigbluebutton-client/src/BigBlueButtonTest.mxml @@ -207,7 +207,6 @@ with BigBlueButton; if not, see . - diff --git a/bigbluebutton-client/src/PresentModule.mxml b/bigbluebutton-client/src/PresentModule.mxml index 0306f3f1a6..a50eac12d3 100755 --- a/bigbluebutton-client/src/PresentModule.mxml +++ b/bigbluebutton-client/src/PresentModule.mxml @@ -22,7 +22,9 @@ with BigBlueButton; if not, see . + creationComplete="onCreationComplete()" + xmlns:maps="org.bigbluebutton.modules.present.maps.*" + xmlns:maps="org.bigbluebutton.modules.present.ui.views.maps.*"> . + diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCallbacks.as b/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCallbacks.as index f1e7ce60a0..1efe0706e2 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCallbacks.as +++ b/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCallbacks.as @@ -41,7 +41,6 @@ package org.bigbluebutton.main.api import org.bigbluebutton.main.model.users.events.RoleChangeEvent; import org.bigbluebutton.modules.phone.events.CallConnectedEvent; import org.bigbluebutton.modules.phone.events.CallDisconnectedEvent; - import org.bigbluebutton.modules.present.events.QueryPresentationsListEvent; import org.bigbluebutton.modules.present.events.RemovePresentationEvent; import org.bigbluebutton.modules.present.events.UploadEvent; import org.bigbluebutton.modules.videoconf.events.ClosePublishWindowEvent; @@ -107,10 +106,11 @@ package org.bigbluebutton.main.api } private function handleQueryListsOfPresentationsRequest():void { - _dispatcher.dispatchEvent(new QueryPresentationsListEvent()); + trace(LOG + "TODO - handleQueryListsOfPresentationsRequest"); + + //_dispatcher.dispatchEvent(new QueryPresentationsListEvent()); } - - + private function handleDisplayPresentationRequest(presentationID:String):void { var readyEvent:UploadEvent = new UploadEvent(UploadEvent.PRESENTATION_READY); readyEvent.presentationName = presentationID; diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCalls.as b/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCalls.as index cb93da9274..a0cf974370 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCalls.as +++ b/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCalls.as @@ -41,7 +41,6 @@ package org.bigbluebutton.main.api import org.bigbluebutton.main.model.users.events.BroadcastStartedEvent; import org.bigbluebutton.main.model.users.events.BroadcastStoppedEvent; import org.bigbluebutton.main.model.users.events.StreamStartedEvent; - import org.bigbluebutton.modules.present.events.QueryListOfPresentationsReplyEvent; import org.bigbluebutton.modules.present.events.UploadEvent; import org.bigbluebutton.modules.videoconf.model.VideoConfOptions; @@ -391,12 +390,12 @@ package org.bigbluebutton.main.api broadcastEvent(payload); } - public function handleQueryListOfPresentationsReplyEvent(event:QueryListOfPresentationsReplyEvent):void { - var payload:Object = new Object(); - payload.eventName = EventConstants.QUERY_PRESENTATION_REPLY; - payload.presentations = event.presentations; - broadcastEvent(payload); - } +// public function handleQueryListOfPresentationsReplyEvent(event:QueryListOfPresentationsReplyEvent):void { +// var payload:Object = new Object(); +// payload.eventName = EventConstants.QUERY_PRESENTATION_REPLY; +// payload.presentations = event.presentations; +// broadcastEvent(payload); +// } private function broadcastEvent(message:Object):void { if (ExternalInterface.available) { diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/api/maps/ExternalApiEventMap.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/api/maps/ExternalApiEventMap.mxml index ca7995fedb..1123eb3c53 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/main/api/maps/ExternalApiEventMap.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/main/api/maps/ExternalApiEventMap.mxml @@ -38,7 +38,6 @@ with BigBlueButton; if not, see . import org.bigbluebutton.main.model.users.events.BroadcastStartedEvent; import org.bigbluebutton.main.model.users.events.BroadcastStoppedEvent; import org.bigbluebutton.main.model.users.events.StreamStartedEvent; - import org.bigbluebutton.modules.present.events.QueryListOfPresentationsReplyEvent; import org.bigbluebutton.modules.present.events.UploadEvent; ]]> @@ -172,7 +171,4 @@ with BigBlueButton; if not, see . - - - diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/events/BBBEvent.as b/bigbluebutton-client/src/org/bigbluebutton/main/events/BBBEvent.as index bceedc7ded..abb5689d61 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/main/events/BBBEvent.as +++ b/bigbluebutton-client/src/org/bigbluebutton/main/events/BBBEvent.as @@ -26,7 +26,6 @@ package org.bigbluebutton.main.events { public static const RECEIVED_PUBLIC_CHAT_MESSAGE_EVENT:String = 'RECEIVED_PUBLIC_CHAT_MESSAGE_EVENT'; public static const SEND_PUBLIC_CHAT_MESSAGE_EVENT:String = 'SEND_PUBLIC_CHAT_MESSAGE_EVENT'; public static const JOIN_VOICE_CONFERENCE:String = 'BBB_JOIN_VOICE_CONFERENCE'; - public static const PRESENTATION_CONVERTED:String = 'BBB_PRESENTATION_CONVERTED'; public static const START_VIDEO_CONNECTION:String = 'BBB_START_VIDEO_CONNECTION'; public static const START_VIDEO_STREAM:String = 'BBB_START_VIDEO_STREAM'; public static const VIDEO_STARTED:String = 'BBB_VIDEO_STARTED'; diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/monitoring/maps/MonitoringEventMap.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/monitoring/maps/MonitoringEventMap.mxml index 0ca1e82aee..af822b9ac9 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/monitoring/maps/MonitoringEventMap.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/monitoring/maps/MonitoringEventMap.mxml @@ -26,10 +26,6 @@ - - - - diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/business/PresentProxy.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/business/PresentProxy.as index 7c8d9d265b..26050a7da4 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/business/PresentProxy.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/business/PresentProxy.as @@ -32,7 +32,6 @@ package org.bigbluebutton.modules.present.business import org.bigbluebutton.modules.present.events.PresentModuleEvent; import org.bigbluebutton.modules.present.events.PresenterCommands; import org.bigbluebutton.modules.present.events.RemovePresentationEvent; - import org.bigbluebutton.modules.present.events.SlideEvent; import org.bigbluebutton.modules.present.events.UploadEvent; import org.bigbluebutton.modules.present.managers.PresentationSlides; import org.bigbluebutton.modules.present.model.Page; @@ -93,36 +92,7 @@ package org.bigbluebutton.modules.present.business public function gotoSlide(e:PresenterCommands):void{ sender.gotoSlide(e.slideNumber); } - - /** - * Gets the current slide number from the server, then loads the page on the local client - * @param e - * - */ - public function loadCurrentSlideLocally(e:SlideEvent):void{ - getCurrentSlideNumber(); - } - - public function getCurrentSlideNumber():void { - trace("PresentPoxy: getCurrentSlideNumber DISABLED!!!]"); - - return; -/* - var curPage:Page = presentationModel.getCurrentPage(); - if (curPage != null) { - if (curPage.num >= 0) { - var e:NavigationEvent = new NavigationEvent(NavigationEvent.GOTO_PAGE) - trace("PresentPoxy: getCurrentSlideNumber [" + curPage.num + "]"); - e.pageNumber = curPage.num; - var dispatcher:Dispatcher = new Dispatcher(); - dispatcher.dispatchEvent(e); - } - } else { - trace("PresentPoxy: getCurrentSlideNumber [No Current Page]"); - } -*/ - } - + /** * Loads a presentation from the server. creates a new PresentationService class * diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/business/PresentationService.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/business/PresentationService.as index f0f60a3bc1..eed3eed66c 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/business/PresentationService.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/business/PresentationService.as @@ -18,15 +18,12 @@ */ package org.bigbluebutton.modules.present.business { - import com.asfusion.mate.events.Dispatcher; - + import com.asfusion.mate.events.Dispatcher; import flash.events.*; import flash.net.URLLoader; - import flash.net.URLRequest; - + import flash.net.URLRequest; import mx.rpc.IResponder; - import mx.rpc.http.HTTPService; - + import mx.rpc.http.HTTPService; import org.bigbluebutton.modules.present.events.PresentationEvent; import org.bigbluebutton.modules.present.managers.PresentationSlides; import org.bigbluebutton.modules.present.managers.Slide; @@ -41,8 +38,7 @@ package org.bigbluebutton.modules.present.business * @author dev_team@bigbluebutton.org * */ - public class PresentationService implements IResponder - { + public class PresentationService implements IResponder { private var service : HTTPService; private var _slides:PresentationSlides; private var urlLoader:URLLoader; @@ -50,8 +46,7 @@ package org.bigbluebutton.modules.present.business private var dispatcher:Dispatcher; - public function PresentationService() - { + public function PresentationService() { service = new HTTPService(); dispatcher = new Dispatcher(); @@ -62,28 +57,26 @@ package org.bigbluebutton.modules.present.business * @param url * */ - public function load(url:String, slides:PresentationSlides, slideUri:String) : void - { + public function load(url:String, slides:PresentationSlides, slideUri:String):void { _slides = slides; this.slideUri = slideUri; service.url = url; urlLoader = new URLLoader(); urlLoader.addEventListener(Event.COMPLETE, handleComplete); urlLoader.addEventListener(IOErrorEvent.IO_ERROR, handleIOErrorEvent); - urlLoader.load(new URLRequest(url)); - + urlLoader.load(new URLRequest(url)); } - private function handleComplete(e:Event):void{ + private function handleComplete(e:Event):void { LogUtil.debug("Loading complete"); parse(new XML(e.target.data)); } - private function handleIOErrorEvent(e:IOErrorEvent):void{ + private function handleIOErrorEvent(e:IOErrorEvent):void { LogUtil.error(e.toString()); } - public function parse(xml:XML):void{ + public function parse(xml:XML):void { var list:XMLList = xml.presentation.slides.slide; var item:XML; LogUtil.debug("Slides: " + xml); @@ -120,8 +113,7 @@ package org.bigbluebutton.modules.present.business * @param event * */ - public function result(event : Object):void - { + public function result(event : Object):void { var xml:XML = new XML(event.result); var list:XMLList = xml.presentations; var item:XML; @@ -138,8 +130,7 @@ package org.bigbluebutton.modules.present.business * @param event * */ - public function fault(event : Object):void - { + public function fault(event : Object):void { LogUtil.debug("Got fault [" + event.fault.toString() + "]"); } diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/commands/ChangePageCommand.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/commands/ChangePageCommand.as index 5601f6d279..d80862f6e4 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/commands/ChangePageCommand.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/commands/ChangePageCommand.as @@ -4,9 +4,14 @@ package org.bigbluebutton.modules.present.commands public class ChangePageCommand extends Event { - public function ChangePageCommand(type:String, bubbles:Boolean=false, cancelable:Boolean=false) + public static const CHANGE_PAGE_COMMAND:String = "presentation change page command"; + + public var pageId:String; + + public function ChangePageCommand(pageId: String) { - super(type, bubbles, cancelable); + super(CHANGE_PAGE_COMMAND, true, false); + this.pageId = pageId; } } } \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/AddPresentationToolbarEvent.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/AddPresentationToolbarEvent.as deleted file mode 100755 index 3d18113cd4..0000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/AddPresentationToolbarEvent.as +++ /dev/null @@ -1,37 +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.present.events -{ - import flash.events.Event; - - import flexlib.containers.DockableToolBar; - - public class AddPresentationToolbarEvent extends Event - { - public static const ADD_TOOLBAR:String = "ADD_TOOLBAR"; - - public var toolbar:DockableToolBar; - - public function AddPresentationToolbarEvent(type:String) - { - super(type, true, false); - } - - } -} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/MoveEvent.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/MoveEvent.as deleted file mode 100755 index d575c5594f..0000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/MoveEvent.as +++ /dev/null @@ -1,40 +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.present.events -{ - import flash.events.Event; - - public class MoveEvent extends Event - { - public static const MOVE:String = "MOVE_SLIDE"; - public static const CUR_SLIDE_SETTING:String = "CUR_SLIDE_SETTING"; - - public var xOffset:Number; - public var yOffset:Number; - - public var slideToCanvasWidthRatio:Number; - public var slideToCanvasHeightRatio:Number; - - public function MoveEvent(type:String) - { - super(type, true, false); - } - - } -} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/PageLoadedEvent.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/PageLoadedEvent.as new file mode 100755 index 0000000000..59b8a951d6 --- /dev/null +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/PageLoadedEvent.as @@ -0,0 +1,17 @@ +package org.bigbluebutton.modules.present.events +{ + import flash.events.Event; + + public class PageLoadedEvent extends Event + { + public static const PAGE_LOADED_EVENT:String = "presentation page loaded event"; + + public var pageId: String; + + public function PageLoadedEvent(pageId: String) + { + super(PAGE_LOADED_EVENT, true, false); + this.pageId = pageId; + } + } +} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/PresentationReadyEvent.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/PresentationReadyEvent.as new file mode 100755 index 0000000000..0e54a72346 --- /dev/null +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/PresentationReadyEvent.as @@ -0,0 +1,17 @@ +package org.bigbluebutton.modules.present.events +{ + import flash.events.Event; + + public class PresentationReadyEvent extends Event + { + public static const READY_EVENT:String = "presentation ready event"; + + public var presId: String; + + public function PresentationReadyEvent(presId: String) + { + super(READY_EVENT, true, false); + this.presId = presId; + } + } +} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/QueryListOfPresentationsReplyEvent.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/QueryListOfPresentationsReplyEvent.as deleted file mode 100755 index 45d1b3ba4a..0000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/QueryListOfPresentationsReplyEvent.as +++ /dev/null @@ -1,18 +0,0 @@ -package org.bigbluebutton.modules.present.events -{ - import flash.events.Event; - - import mx.collections.ArrayCollection; - - public class QueryListOfPresentationsReplyEvent extends Event - { - public static const QUERY_LIST_OF_PRESENTATIONS_REPLY:String = "query list of presentations reply"; - - public var presentations:Array; - - public function QueryListOfPresentationsReplyEvent() - { - super(QUERY_LIST_OF_PRESENTATIONS_REPLY, true, false); - } - } -} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/QueryPresentationsListEvent.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/QueryPresentationsListEvent.as deleted file mode 100755 index 2c72ad29c4..0000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/QueryPresentationsListEvent.as +++ /dev/null @@ -1,15 +0,0 @@ -package org.bigbluebutton.modules.present.events -{ - import flash.events.Event; - - public class QueryPresentationsListEvent extends Event - { - - public static const QUERY_PRESENTATIONS_LIST:String = "queryPresentationsListEvent"; - - public function QueryPresentationsListEvent() - { - super(QUERY_PRESENTATIONS_LIST, true, false); - } - } -} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/SlideEvent.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/SlideEvent.as deleted file mode 100755 index 39eba990b9..0000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/SlideEvent.as +++ /dev/null @@ -1,41 +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.present.events -{ - import org.bigbluebutton.modules.present.managers.Slide; - import flash.events.Event; - import flash.utils.ByteArray; - - public class SlideEvent extends Event - { - public static const SLIDE_LOADED:String = "Slide Loaded"; - public static const LOAD_CURRENT_SLIDE:String = "Load Current Slide"; - - public var slideNumber:Number; - public var slide:ByteArray; - public var slideText:String; - public var page:Slide; - - public function SlideEvent(type:String) - { - super(type, true, false); - } - - } -} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/SlideResizedEvent.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/SlideResizedEvent.as deleted file mode 100755 index ad7d1aa10a..0000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/SlideResizedEvent.as +++ /dev/null @@ -1,35 +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.present.events -{ - import flash.events.Event; - - public class SlideResizedEvent extends Event - { - public static const SLIDE_RESIZED_EVENT:String = "SLIDE RESIZED EVENT"; - - public var percent:Number = 100; - - public function SlideResizedEvent() - { - super(SLIDE_RESIZED_EVENT, true, false); - } - - } -} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/ZoomEvent.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/ZoomEvent.as deleted file mode 100755 index c4644de79f..0000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/ZoomEvent.as +++ /dev/null @@ -1,52 +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.present.events -{ - import flash.events.Event; - - /** - * Several events relating to zooming the slides in an out. Note that the difference betweeen the ZOOM event and the RESIZE event. The ZOOM event increases or decreases - * the zoom value of the slide in increments, while the RESIZE event updates the zoom value of the slide in terms of the original value. So for example, a ZOOM event - * might send the message to increase the size of the slide by 10% of it's current value, while RESIZE would send a message to enlarge the slide to 300% of it's default - * size. - * @author Denis - * - */ - public class ZoomEvent extends Event - { - public static const ZOOM:String = "ZOOM"; - public static const MAXIMIZE:String = "MAXIMIZE"; - public static const RESTORE:String = "RESTORE"; - public static const RESIZE:String = "RESIZE"; - - public var zoomPercentage:Number; - - public var xOffset:Number; - public var yOffset:Number; - - public var slideToCanvasWidthRatio:Number; - public var slideToCanvasHeightRatio:Number; - - public function ZoomEvent(type:String) - { - super(type, true, false); - } - - } -} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/managers/PresentManager.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/managers/PresentManager.as index 2e230cb8ed..ca4b639083 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/managers/PresentManager.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/managers/PresentManager.as @@ -22,11 +22,9 @@ package org.bigbluebutton.modules.present.managers import flash.display.DisplayObject; import flash.geom.Point; - import mx.collections.ArrayCollection; import mx.core.*; import mx.managers.PopUpManager; - import org.bigbluebutton.common.IBbbModuleWindow; import org.bigbluebutton.common.LogUtil; import org.bigbluebutton.common.events.OpenWindowEvent; @@ -35,7 +33,6 @@ package org.bigbluebutton.modules.present.managers import org.bigbluebutton.main.model.users.Conference; import org.bigbluebutton.main.model.users.events.RoleChangeEvent; import org.bigbluebutton.modules.present.events.PresentModuleEvent; - import org.bigbluebutton.modules.present.events.QueryListOfPresentationsReplyEvent; import org.bigbluebutton.modules.present.events.RemovePresentationEvent; import org.bigbluebutton.modules.present.events.UploadEvent; import org.bigbluebutton.modules.present.model.PresentationModel; diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/managers/SlideManager.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/managers/SlideManager.as deleted file mode 100755 index 3f58ebc42b..0000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/managers/SlideManager.as +++ /dev/null @@ -1,59 +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.present.managers -{ - import com.asfusion.mate.events.Dispatcher; - - import flash.utils.ByteArray; - - import org.bigbluebutton.modules.present.events.SlideEvent; - - public class SlideManager - { - private var slides:Object; - private var dispatcher:Dispatcher; - - public function SlideManager() - { - slides = new Object(); - dispatcher = new Dispatcher(); - } - - public function load(slide:Slide):void { - if (slide == null) return; - - slides[slide.slideNumber] = slide; - slide.load(slideLoadListener); - } - - public function clear():void { - slides = null; - slides = new Object(); - } - - private function slideLoadListener(slideNum:Number, slide:ByteArray, slideText:String):void { - var e:SlideEvent = new SlideEvent(SlideEvent.SLIDE_LOADED); - e.slide = slide; - e.slideText = slideText; - e.slideNumber = slideNum; - e.page = slides[slideNum]; - dispatcher.dispatchEvent(e); - } - } -} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/maps/PresentEventMap.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/present/maps/PresentEventMap.mxml index 979aedfb29..499ba90acc 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/maps/PresentEventMap.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/maps/PresentEventMap.mxml @@ -27,15 +27,16 @@ with BigBlueButton; if not, see . import org.bigbluebutton.main.model.users.events.RoleChangeEvent; import org.bigbluebutton.modules.present.api.PresentationAPI; import org.bigbluebutton.modules.present.business.PresentProxy; + import org.bigbluebutton.modules.present.commands.ChangePageCommand; import org.bigbluebutton.modules.present.events.AddOverlayCanvasEvent; import org.bigbluebutton.modules.present.events.PresentModuleEvent; + import org.bigbluebutton.modules.present.events.PresentationChangedEvent; import org.bigbluebutton.modules.present.events.PresentationEvent; import org.bigbluebutton.modules.present.events.PresenterCommands; - import org.bigbluebutton.modules.present.events.QueryPresentationsListEvent; import org.bigbluebutton.modules.present.events.RemovePresentationEvent; - import org.bigbluebutton.modules.present.events.SlideEvent; import org.bigbluebutton.modules.present.events.UploadEvent; import org.bigbluebutton.modules.present.managers.PresentManager; + import org.bigbluebutton.modules.present.services.PageLoaderService; import org.bigbluebutton.modules.present.ui.views.PresentationWindow; import org.bigbluebutton.modules.whiteboard.events.GetCurrentPresentationInfo; @@ -106,18 +107,14 @@ with BigBlueButton; if not, see . - - + + - - - - - + @@ -125,11 +122,5 @@ with BigBlueButton; if not, see . - - - - - - diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/model/Presentation.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/model/Presentation.as index 04ef42fb63..b67fafdc0c 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/model/Presentation.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/model/Presentation.as @@ -5,13 +5,14 @@ package org.bigbluebutton.modules.present.model public class Presentation { private var _id:String; private var _name:String; - private var _current:Boolean = false; private var _pages:ArrayCollection; - + + public var current:Boolean = false; + public function Presentation(id: String, name: String, current: Boolean, pages: ArrayCollection) { _id = id; _name = name; - _current = current; + this.current = current; _pages = pages } @@ -22,9 +23,17 @@ package org.bigbluebutton.modules.present.model public function get name():String { return _name; } - - public function isCurrent():Boolean { - return _current; + + + public function getCurrentPage():Page { + for (var i: int = 0; i < _pages.length; i++) { + var p: Page = _pages.getItemAt(i) as Page; + if (p.current) { + return p; + } + } + + return null; } public function getPage(pageId:String):Page { diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/model/PresentationModel.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/model/PresentationModel.as index 465be696a8..156aa0324e 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/model/PresentationModel.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/model/PresentationModel.as @@ -1,6 +1,7 @@ package org.bigbluebutton.modules.present.model { import mx.collections.ArrayCollection; + import org.bigbluebutton.modules.present.model.Page; import org.bigbluebutton.modules.present.model.Presentation; @@ -56,7 +57,7 @@ package org.bigbluebutton.modules.present.model public function getCurrentPresentationName():String { for (var i:int = 0; i < _presentations.length; i++) { var pres: Presentation = _presentations.getItemAt(i) as Presentation; - if (pres.isCurrent()) return pres.id; + if (pres.current) return pres.id; } return null; @@ -76,12 +77,20 @@ package org.bigbluebutton.modules.present.model public function getCurrentPresentation():Presentation { for (var i:int = 0; i < _presentations.length; i++) { var pres: Presentation = _presentations.getItemAt(i) as Presentation; - if (pres.isCurrent()) return pres; + if (pres.current) return pres; } return null; } + public function getCurrentPage():Page { + var pres:Presentation = getCurrentPresentation(); + if (pres != null) { + return pres.getCurrentPage(); + } + return null; + } + public function getPage(id: String):Page { var ids:Array = id.split("/"); if (ids.length > 1) { diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/Constants.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/Constants.as index f6be2b0afb..68717fa2da 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/Constants.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/Constants.as @@ -2,15 +2,15 @@ package org.bigbluebutton.modules.present.services { public class Constants { - private static const OFFICE_DOC_CONVERSION_SUCCESS_KEY:String = "OFFICE_DOC_CONVERSION_SUCCESS"; - private static const OFFICE_DOC_CONVERSION_FAILED_KEY:String = "OFFICE_DOC_CONVERSION_FAILED"; - private static const SUPPORTED_DOCUMENT_KEY:String = "SUPPORTED_DOCUMENT"; - private static const UNSUPPORTED_DOCUMENT_KEY:String = "UNSUPPORTED_DOCUMENT"; - private static const PAGE_COUNT_FAILED_KEY:String = "PAGE_COUNT_FAILED"; - private static const PAGE_COUNT_EXCEEDED_KEY:String = "PAGE_COUNT_EXCEEDED"; - private static const GENERATED_SLIDE_KEY:String = "GENERATED_SLIDE"; - private static const GENERATING_THUMBNAIL_KEY:String = "GENERATING_THUMBNAIL"; - private static const GENERATED_THUMBNAIL_KEY:String = "GENERATED_THUMBNAIL"; - private static const CONVERSION_COMPLETED_KEY:String = "CONVERSION_COMPLETED"; + public static const OFFICE_DOC_CONVERSION_SUCCESS_KEY:String = "OFFICE_DOC_CONVERSION_SUCCESS"; + public static const OFFICE_DOC_CONVERSION_FAILED_KEY:String = "OFFICE_DOC_CONVERSION_FAILED"; + public static const SUPPORTED_DOCUMENT_KEY:String = "SUPPORTED_DOCUMENT"; + public static const UNSUPPORTED_DOCUMENT_KEY:String = "UNSUPPORTED_DOCUMENT"; + public static const PAGE_COUNT_FAILED_KEY:String = "PAGE_COUNT_FAILED"; + public static const PAGE_COUNT_EXCEEDED_KEY:String = "PAGE_COUNT_EXCEEDED"; + public static const GENERATED_SLIDE_KEY:String = "GENERATED_SLIDE"; + public static const GENERATING_THUMBNAIL_KEY:String = "GENERATING_THUMBNAIL"; + public static const GENERATED_THUMBNAIL_KEY:String = "GENERATED_THUMBNAIL"; + public static const CONVERSION_COMPLETED_KEY:String = "CONVERSION_COMPLETED"; } } \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/PageLoaderService.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/PageLoaderService.as index e4e698c800..a205e0a3d7 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/PageLoaderService.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/PageLoaderService.as @@ -1,9 +1,25 @@ package org.bigbluebutton.modules.present.services { + import org.bigbluebutton.modules.present.events.PageLoadedEvent; + import org.bigbluebutton.modules.present.model.Page; + import org.bigbluebutton.modules.present.model.PresentationModel; + public class PageLoaderService { - public function PageLoaderService() - { + + public function loadPage(pageId: String):void { + var page:Page = PresentationModel.getInstance().getPage(pageId); + page.loadSwf(pageLoadedListener); + } + + public function pageLoadedListener(pageId: String):void { + var page: Page = PresentationModel.getInstance().getPage(pageId); + if (page != null) { + if (page.current) { + // The page has been loaded and still the current displayed page. + var event: PageLoadedEvent = new PageLoadedEvent(page.id); + } + } } } } \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/PresentationService.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/PresentationService.as index b42e8ff95f..43700780ba 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/PresentationService.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/PresentationService.as @@ -4,6 +4,7 @@ package org.bigbluebutton.modules.present.services import mx.collections.ArrayCollection; + import org.bigbluebutton.modules.present.commands.ChangePageCommand; import org.bigbluebutton.modules.present.events.CursorEvent; import org.bigbluebutton.modules.present.events.PageChangedEvent; import org.bigbluebutton.modules.present.events.PageMovedEvent; @@ -16,6 +17,7 @@ package org.bigbluebutton.modules.present.services import org.bigbluebutton.modules.present.services.messages.PresentationVO; import org.bigbluebutton.modules.present.services.messaging.MessageReceiver; import org.bigbluebutton.modules.present.services.messaging.MessageSender; + import org.bigbluebutton.modules.whiteboard.events.GetCurrentPresentationInfo; public class PresentationService { @@ -40,6 +42,10 @@ package org.bigbluebutton.modules.present.services public function pageChanged(page: PageVO):void { var np: Page = model.getPage(page.id); if (np != null) { + + var oldPage: Page = PresentationModel.getInstance().getCurrentPage(); + if (oldPage != null) oldPage.current = false; + np.current = page.current; np.xOffset = page.xOffset; np.yOffset = page.yOffset; @@ -48,10 +54,23 @@ package org.bigbluebutton.modules.present.services var event: PageChangedEvent = new PageChangedEvent(np.id); dispatcher.dispatchEvent(event); - } - + } } + + public function pageMoved(page: PageVO):void { + var np: Page = model.getPage(page.id); + if (np != null) { + np.current = page.current; + np.xOffset = page.xOffset; + np.yOffset = page.yOffset; + np.widthRatio = page.widthRatio; + np.heightRatio = page.heightRatio; + var event: PageChangedEvent = new PageChangedEvent(np.id); + dispatcher.dispatchEvent(event); + } + } + private function copyPageVOToPage(p: PageVO):Page { var page:Page = new Page(p.id, p.num, p.current, p.swfUri, p.thumbUri, p.txtUri, @@ -61,6 +80,13 @@ package org.bigbluebutton.modules.present.services } public function changePresentation(pres: PresentationVO):void { + + // We've switched presentations. Mark the old presentation as not current. + var curPres:Presentation = PresentationModel.getInstance().getCurrentPresentation(); + if (curPres != null) { + curPres.current = false; + } + var presoPages:ArrayCollection = new ArrayCollection(); var pages:ArrayCollection = pres.getPages() as ArrayCollection; for (var k:int = 0; k < pages.length; k++) { @@ -69,13 +95,16 @@ package org.bigbluebutton.modules.present.services presoPages.addItem(pg); } - var presentation: Presentation = new Presentation(pres.id, pres.name, pres.isCurrent(), presoPages); - + var presentation: Presentation = new Presentation(pres.id, pres.name, pres.isCurrent(), presoPages); model.addPresentation(presentation); var event: PresentationChangedEvent = new PresentationChangedEvent(presentation.id); dispatcher.dispatchEvent(event); + var curPage:Page = presentation.getCurrentPage(); + var changePageCommand: ChangePageCommand = new ChangePageCommand(curPage.id); + dispatcher.dispatchEvent(changePageCommand); + } } } \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/messaging/MessageReceiver.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/messaging/MessageReceiver.as index f85570abf4..dc2701d642 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/messaging/MessageReceiver.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/messaging/MessageReceiver.as @@ -32,7 +32,6 @@ package org.bigbluebutton.modules.present.services.messaging import org.bigbluebutton.main.model.users.Conference; import org.bigbluebutton.main.model.users.IMessageListener; import org.bigbluebutton.modules.present.events.CursorEvent; - import org.bigbluebutton.modules.present.events.MoveEvent; import org.bigbluebutton.modules.present.events.NavigationEvent; import org.bigbluebutton.modules.present.events.PageChangedEvent; import org.bigbluebutton.modules.present.events.RemovePresentationEvent; @@ -41,20 +40,22 @@ package org.bigbluebutton.modules.present.services.messaging import org.bigbluebutton.modules.present.model.Presentation; import org.bigbluebutton.modules.present.model.PresentationModel; import org.bigbluebutton.modules.present.model.Presenter; + import org.bigbluebutton.modules.present.services.Constants; import org.bigbluebutton.modules.present.services.PresentationService; import org.bigbluebutton.modules.present.services.messages.CursorMovedMessage; import org.bigbluebutton.modules.present.services.messages.PageVO; import org.bigbluebutton.modules.present.services.messages.PresentationVO; - public class MessageReceiver implements IMessageListener - { + public class MessageReceiver implements IMessageListener { private static const LOG:String = "Present::MessageReceiver - "; private var service:PresentationService; + private var dispatcher:Dispatcher; public function MessageReceiver(service: PresentationService) { this.service = service; BBB.initConnectionManager().addMessageListener(this); + dispatcher = new Dispatcher(); } public function onMessage(messageName:String, message:Object):void { @@ -110,8 +111,7 @@ package org.bigbluebutton.modules.present.services.messaging } private function handlePresentationCursorUpdateCommand(msg:Object):void { -// trace(LOG + "*** handlePresentationCursorUpdateCommand " + msg.msg + " **** \n"); - +// trace(LOG + "*** handlePresentationCursorUpdateCommand " + msg.msg + " **** \n"); var map:Object = JSON.parse(msg.msg); if (map.hasOwnProperty("xPercent") && map.hasOwnProperty("yPercent")) { service.cursorMoved(map.xPercent, map.yPercent); @@ -121,14 +121,12 @@ package org.bigbluebutton.modules.present.services.messaging private function handleGotoSlideCallback(msg:Object) : void { trace(LOG + "*** handleGotoSlideCallback " + msg.msg + " **** \n"); var map:Object = JSON.parse(msg.msg); - if (map.hasOwnProperty("id") && map.hasOwnProperty("num") && map.hasOwnProperty("current") && map.hasOwnProperty("swfUri") && map.hasOwnProperty("txtUri") && map.hasOwnProperty("pngUri") && map.hasOwnProperty("thumbUri") && map.hasOwnProperty("xOffset") && map.hasOwnProperty("yOffset") && map.hasOwnProperty("widthRatio") && map.hasOwnProperty("heightRatio")) { var page:PageVO = extractPage(map); - service.pageChanged(page); } } @@ -159,14 +157,6 @@ package org.bigbluebutton.modules.present.services.messaging && map.hasOwnProperty("heightRatio")) { service.pageChanged(extractPage(map)); } - - trace(LOG + "TODO: handleMoveCallback [" + msg.xOffset + "," + msg.yOffset + "][" + msg.widthRatio + "," + msg.heightRatio + "]"); -// var e:MoveEvent = new MoveEvent(MoveEvent.MOVE); -// e.xOffset = map.xOffset; -// e.yOffset = map.yOffset; -// e.slideToCanvasWidthRatio = map.widthRatio; - // e.slideToCanvasHeightRatio = map.heightRatio; -// dispatcher.dispatchEvent(e); } private function handleSharePresentationCallback(msg:Object):void { @@ -195,21 +185,16 @@ package org.bigbluebutton.modules.present.services.messaging } private function handleConversionCompletedUpdateMessageCallback(msg:Object) : void { - trace(LOG + "*** handleConversionCompletedUpdateMessageCallback " + msg.msg + " **** \n"); - + trace(LOG + "*** handleConversionCompletedUpdateMessageCallback " + msg.msg + " **** \n"); var map:Object = JSON.parse(msg.msg); var presVO: PresentationVO = pocessUploadedPresentation(map) service.changePresentation(presVO); -// var uploadEvent:UploadEvent = new UploadEvent(UploadEvent.CONVERT_SUCCESS); -// uploadEvent.data = CONVERSION_COMPLETED_KEY; -// uploadEvent.presentationName = map.id; -// dispatcher.dispatchEvent(uploadEvent); + var uploadEvent:UploadEvent = new UploadEvent(UploadEvent.CONVERT_SUCCESS); + uploadEvent.data = Constants.CONVERSION_COMPLETED_KEY; + uploadEvent.presentationName = map.id; + dispatcher.dispatchEvent(uploadEvent); -// dispatcher.dispatchEvent(new BBBEvent(BBBEvent.PRESENTATION_CONVERTED)); -// var readyEvent:UploadEvent = new UploadEvent(UploadEvent.PRESENTATION_READY); -// readyEvent.presentationName = map.id; -// dispatcher.dispatchEvent(readyEvent); } private function pocessUploadedPresentation(presentation:Object):PresentationVO { @@ -230,59 +215,58 @@ package org.bigbluebutton.modules.present.services.messaging trace(LOG + "*** handleGeneratedSlideUpdateMessageCallback " + msg.msg + " **** \n"); var map:Object = JSON.parse(msg.msg); -// var uploadEvent:UploadEvent = new UploadEvent(UploadEvent.CONVERT_UPDATE); -// uploadEvent.totalSlides = map.numberOfPages as Number; -// uploadEvent.completedSlides = msg.pagesCompleted as Number; -// dispatcher.dispatchEvent(uploadEvent); + var uploadEvent:UploadEvent = new UploadEvent(UploadEvent.CONVERT_UPDATE); + uploadEvent.totalSlides = map.numberOfPages as Number; + uploadEvent.completedSlides = msg.pagesCompleted as Number; + dispatcher.dispatchEvent(uploadEvent); } private function handlePageCountExceededUpdateMessageCallback(msg:Object) : void { - trace(LOG + "*** handlePageCountExceededUpdateMessageCallback " + msg.msg + " **** \n"); - + trace(LOG + "*** handlePageCountExceededUpdateMessageCallback " + msg.msg + " **** \n"); var map:Object = JSON.parse(msg.msg); -// var uploadEvent:UploadEvent = new UploadEvent(UploadEvent.PAGE_COUNT_EXCEEDED); -//// uploadEvent.maximumSupportedNumberOfSlides = map.maxNumberPages as Number; - // dispatcher.dispatchEvent(uploadEvent); + var uploadEvent:UploadEvent = new UploadEvent(UploadEvent.PAGE_COUNT_EXCEEDED); + uploadEvent.maximumSupportedNumberOfSlides = map.maxNumberPages as Number; + dispatcher.dispatchEvent(uploadEvent); } private function handleConversionUpdateMessageCallback(msg:Object) : void { trace(LOG + "*** handleConversionUpdateMessageCallback " + msg.msg + " **** \n"); var map:Object = JSON.parse(msg.msg); -/* + var uploadEvent:UploadEvent; switch (map.messageKey) { - case OFFICE_DOC_CONVERSION_SUCCESS_KEY : + case Constants.OFFICE_DOC_CONVERSION_SUCCESS_KEY : uploadEvent = new UploadEvent(UploadEvent.OFFICE_DOC_CONVERSION_SUCCESS); dispatcher.dispatchEvent(uploadEvent); break; - case OFFICE_DOC_CONVERSION_FAILED_KEY : + case Constants.OFFICE_DOC_CONVERSION_FAILED_KEY : uploadEvent = new UploadEvent(UploadEvent.OFFICE_DOC_CONVERSION_FAILED); dispatcher.dispatchEvent(uploadEvent); break; - case SUPPORTED_DOCUMENT_KEY : + case Constants.SUPPORTED_DOCUMENT_KEY : uploadEvent = new UploadEvent(UploadEvent.SUPPORTED_DOCUMENT); dispatcher.dispatchEvent(uploadEvent); break; - case UNSUPPORTED_DOCUMENT_KEY : + case Constants.UNSUPPORTED_DOCUMENT_KEY : uploadEvent = new UploadEvent(UploadEvent.UNSUPPORTED_DOCUMENT); dispatcher.dispatchEvent(uploadEvent); break; - case GENERATING_THUMBNAIL_KEY : + case Constants.GENERATING_THUMBNAIL_KEY : dispatcher.dispatchEvent(new UploadEvent(UploadEvent.THUMBNAILS_UPDATE)); break; - case PAGE_COUNT_FAILED_KEY : + case Constants.PAGE_COUNT_FAILED_KEY : uploadEvent = new UploadEvent(UploadEvent.PAGE_COUNT_FAILED); dispatcher.dispatchEvent(uploadEvent); break; - case GENERATED_THUMBNAIL_KEY : + case Constants.GENERATED_THUMBNAIL_KEY : break; default: break; } -*/ + } private var currentSlide:Number = -1; 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 89cc977b3d..53303471df 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 @@ -46,11 +46,9 @@ with BigBlueButton; if not, see . - - - + + - @@ -87,22 +85,21 @@ with BigBlueButton; if not, see . import org.bigbluebutton.common.Images; import org.bigbluebutton.common.LogUtil; import org.bigbluebutton.common.events.LocaleChangeEvent; + import org.bigbluebutton.core.UsersUtil; import org.bigbluebutton.main.events.MadePresenterEvent; import org.bigbluebutton.main.events.ShortcutEvent; import org.bigbluebutton.main.views.MainCanvas; import org.bigbluebutton.modules.present.events.AddOverlayCanvasEvent; import org.bigbluebutton.modules.present.events.DisplaySlideEvent; - import org.bigbluebutton.modules.present.events.MoveEvent; import org.bigbluebutton.modules.present.events.NavigationEvent; + import org.bigbluebutton.modules.present.events.PresentationChangedEvent; import org.bigbluebutton.modules.present.events.PresentationEvent; import org.bigbluebutton.modules.present.events.PresenterCommands; - import org.bigbluebutton.modules.present.events.SlideEvent; - import org.bigbluebutton.modules.present.events.SlideResizedEvent; import org.bigbluebutton.modules.present.events.UploadEvent; import org.bigbluebutton.modules.present.events.WindowResizedEvent; - import org.bigbluebutton.modules.present.events.ZoomEvent; import org.bigbluebutton.modules.present.managers.Slide; import org.bigbluebutton.modules.present.managers.SlideManager; + import org.bigbluebutton.modules.present.model.Page; import org.bigbluebutton.modules.present.model.PresentationModel; import org.bigbluebutton.modules.present.ui.views.PresentOptions; import org.bigbluebutton.modules.whiteboard.events.WhiteboardButtonEvent; @@ -136,8 +133,7 @@ with BigBlueButton; if not, see . private var currentSlideHeight:Number = DEFAULT_WINDOW_HEIGHT; private var mouseDown:Boolean = false; - [Bindable] private var isPresenter:Boolean = false; - [Bindable] private var presentationLoaded:Boolean = false; + [Bindable] private var currentPresentation:String = ""; [Bindable] private var baseIndex:int; @@ -174,12 +170,12 @@ with BigBlueButton; if not, see . t.start(); } - private function addWhiteboardToolbar(event:TimerEvent):void { - // Tell the WhiteboardManager to add the toolbar - var e:WhiteboardButtonEvent = new WhiteboardButtonEvent(WhiteboardButtonEvent.WHITEBOARD_ADDED_TO_PRESENTATION); - e.window = this; - dispatchEvent(e); - } + private function addWhiteboardToolbar(event:TimerEvent):void { + // Tell the WhiteboardManager to add the toolbar + var e:WhiteboardButtonEvent = new WhiteboardButtonEvent(WhiteboardButtonEvent.WHITEBOARD_ADDED_TO_PRESENTATION); + e.window = this; + dispatchEvent(e); + } private function hotkeyCapture():void{ LogUtil.debug("Entering hotkeyCapture"); @@ -268,16 +264,7 @@ with BigBlueButton; if not, see . /* * Notify the slide container telling it the available dimensions to display the slide. */ - private function sendWindowResizedEvent(parentWidth:Number, parentHeight:Number):void { - var dispatcher:Dispatcher = new Dispatcher(); - var dispEvent:WindowResizedEvent = new WindowResizedEvent(WindowResizedEvent.PRESENTATION_WINDOW_RESIZED_EVENT); - dispEvent.width = parentWidth; - dispEvent.height = parentHeight; - dispEvent.fitToPage = fitToPage; - dispEvent.old_width = this.slideView.width; - dispEvent.old_height = this.slideView.height; - dispatcher.dispatchEvent(dispEvent); - + private function sendWindowResizedEvent(parentWidth:Number, parentHeight:Number):void { slideView.onParentResized(parentWidth, parentHeight); } @@ -287,15 +274,15 @@ with BigBlueButton; if not, see . fitSlideToWindowMaintainingAspectRatio(); } - private function bindToKeyboardEvents(event:NavigationEvent):void { - if (event.bindToKeyboard) { - LogUtil.debug("******************************************** Binding to keyboard events ********************"); - bindKeyboardEvents(); - } else { - LogUtil.debug("********************************************* Unbinding to keyboard events *****************"); - unbindKeyboardEvents(); - } - } + private function bindToKeyboardEvents(event:NavigationEvent):void { + if (event.bindToKeyboard) { + trace("******************************************** Binding to keyboard events ********************"); + bindKeyboardEvents(); + } else { + LogUtil.debug("********************************************* Unbinding to keyboard events *****************"); + unbindKeyboardEvents(); + } + } private function unbindKeyboardEvents():void { stage.removeEventListener(KeyboardEvent.KEY_UP, onKeyUp); @@ -343,11 +330,7 @@ with BigBlueButton; if not, see . zoomSlider.value = 100; slideView.onZoomSlide(zoomSlider.value); } - - private function handleSlideResizedEvent(e:SlideResizedEvent):void{ - zoomSlider.value = e.percent; - } - + private function becomePresenter(e:MadePresenterEvent):void{ setupPresenter(true, e.presenterName); addContextMenuItems(); @@ -363,30 +346,25 @@ with BigBlueButton; if not, see . } private function setupPresenter(isPresenter:Boolean, presentersName:String):void { - this.isPresenter = isPresenter; uploadPres.visible = isPresenter; - if (presentationLoaded) { - displaySlideNumber(slideView.getSelectedSlide() + 1); - displaySlideNavigationControls(isPresenter); - } + var page:Page = PresentationModel.getInstance().getCurrentPage(); + displaySlideNumber(page.num); + displaySlideNavigationControls(isPresenter); } - private function handlePresentationLoadedEvent(e:PresentationEvent):void { - var newPresName = PresentationModel.getInstance().getCurrentPresentationName(); + private function handlePresentationChangedEvent(e:PresentationChangedEvent):void { + var newPresName:String = PresentationModel.getInstance().getCurrentPresentationName(); - if (newPresName == currentPresentation) return; - presentationLoaded = true; - slideView.setSlides(e.slides.slides); + slideView.setSlides(); slideView.visible = true; - - if (slideManager != null) slideManager.clear(); - displaySlideNumber(slideView.getSelectedSlide() + 1); - if (isPresenter) { + var page:Page = PresentationModel.getInstance().getCurrentPage(); + displaySlideNumber(page.num); + + if (UsersUtil.amIPresenter()) { displaySlideNavigationControls(true); - notifyOthersOfSharingPresentation(newPresName); } else { - dispatchEvent(new SlideEvent(SlideEvent.LOAD_CURRENT_SLIDE)); + displaySlideNavigationControls(false) } onResetZoom(); } @@ -449,34 +427,7 @@ with BigBlueButton; if not, see . shareEvent.share = true; dispatchEvent(shareEvent); } - - private function gotoPage(e:NavigationEvent):void{ - trace("PresentationWindow:gotoPage page[" + e.pageNumber + "]"); - loadPage(e.pageNumber); - } - - public function loadPage(pageNumber:int):void{ - // using zero-based index. So we need to subtract 1. - slideView.setSelectedSlide(pageNumber - 1); - - if (validPageNumber(pageNumber)) { - loadSlide(pageNumber); - disableSlideNavigationButtons(pageNumber); - displaySlideNumber(pageNumber); - } else { - trace("PresentationWindow:loadPage - not valid page number [" + pageNumber + "]"); - } - } - - private function loadSlide(page:int):void { - // subtract 1 as this is an array which is zero-based. - slideManager.load(slideView.slides.getItemAt(page-1) as Slide); - } - - private function validPageNumber(pageNumber:int):Boolean { - return (pageNumber <= slideView.slides.length && pageNumber > 0) - } - + private function disableSlideNavigationButtons(pageNumber:int):void { if (pageNumber == 1) { backButton.enabled = false; @@ -499,6 +450,7 @@ with BigBlueButton; if not, see . btnSlideNum.label = "" + currentSlide + '/' + slideView.slides.length; } + private function clearPresentation(e:UploadEvent):void{ slideView.visible = false; slideView.slideLoader.source = null; diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/SlideView.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/SlideView.mxml index e9caa94138..abe7af0103 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/SlideView.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/SlideView.mxml @@ -24,18 +24,17 @@ with BigBlueButton; if not, see . xmlns:mate="http://mate.asfusion.com/" xmlns:local="*" xmlns:fimage="org.bigbluebutton.common.model.*" - width="{slideModel.viewportW}" height="{slideModel.viewportH}" + width="{slideModel.viewportW}" height="{slideModel.viewportH}" x="{slideModel.viewportX}" y="{slideModel.viewportY}" - creationComplete="onCreationComplete()" + creationComplete="onCreationComplete()" verticalScrollPolicy="off" horizontalScrollPolicy="off" - rollOut="hideCursor()" styleName="presentationSlideViewStyle" - xmlns:views="org.bigbluebutton.modules.present.views.*" - implements="org.bigbluebutton.common.IBbbCanvas"> - - - - + rollOut="hideCursor()" styleName="presentationSlideViewStyle" + xmlns:views="org.bigbluebutton.modules.present.views.*" + implements="org.bigbluebutton.common.IBbbCanvas"> + + + @@ -43,34 +42,35 @@ with BigBlueButton; if not, see . . private var whiteboardCanvasHolder:Canvas = new Canvas(); private var whiteboardCanvas:IBbbCanvas; - [Bindable] public var slides:ArrayCollection = new ArrayCollection(); +// [Bindable] public var slides:ArrayCollection = new ArrayCollection(); private var _selectedSlide:int=0; [Bindable] private var lateComerSynched:Boolean = false; @@ -121,14 +121,11 @@ with BigBlueButton; if not, see . whiteboardCanvasHolder.x = 0; whiteboardCanvasHolder.y = 0; - this.setChildIndex(thumbnailView, this.numChildren - 1); - - dispatcher.dispatchEvent(new GetCurrentPresentationInfo()); + this.setChildIndex(thumbnailView, this.numChildren - 1); } - public function setSlides(slides:ArrayCollection):void { - this.slides = slides; - thumbnailView.dataProvider = this.slides.toArray(); + public function setSlides():void { + thumbnailView.dataProvider = PresentationModel.getInstance().getCurrentPresentation().getPages(); } public function setSelectedSlide(slideNum:int):void { @@ -142,9 +139,9 @@ with BigBlueButton; if not, see . private function changeSlide():void { if (thumbnailView.selectedIndex != _selectedSlide) { - // We need to add 1 as the thumbnail view is zero based. - dispatchEvent(new PresenterCommands(PresenterCommands.GOTO_SLIDE, thumbnailView.selectedIndex)); - thumbnailView.visible = false; + var data:Page = thumbnailView.selectedItem as Page; + dispatchEvent(new ChangePageCommand(data.id)); + thumbnailView.visible = false; } } @@ -277,52 +274,45 @@ with BigBlueButton; if not, see . // If delta is negative, the presenter is zooming-out of the presentation. return delta < 0; } - + /** * Handles notification from presenter that the slide has moved. */ - private function handleCurSlideSettingEvent(e:MoveEvent):void{ + private function handlePageChangedEvent(e:PageChangedEvent):void{ if (UserManager.getInstance().getConference().amIPresenter) { return; } + + var page:Page = PresentationModel.getInstance().getPage(e.pageId); + if (page != null) { + presenterViewedRegionX = page.xOffset; + presenterViewedRegionY = page.yOffset; + presenterViewedRegionW = page.widthRatio; + presenterViewedRegionH = page.heightRatio; + + slideModel.saveViewedRegion(page.xOffset, page.yOffset, page.widthRatio, page.heightRatio); + slideModel.calculateViewportNeededForRegion(page.xOffset, page.yOffset, page.widthRatio, page.heightRatio); + slideModel.displayViewerRegion(page.xOffset, page.yOffset, page.widthRatio, page.heightRatio); + slideModel.calculateViewportXY(); + slideModel.displayPresenterView(); + slideModel.printViewedRegion(); + fitSlideToLoader(); + } - presenterViewedRegionX = e.xOffset; - presenterViewedRegionY = e.yOffset; - presenterViewedRegionW = e.slideToCanvasWidthRatio; - presenterViewedRegionH = e.slideToCanvasHeightRatio; } - - /** - * Handles notification from presenter that the slide has moved. - */ - private function handleMoveEvent(e:MoveEvent):void{ - if (UserManager.getInstance().getConference().amIPresenter) { - return; - } - - presenterViewedRegionX = e.xOffset; - presenterViewedRegionY = e.yOffset; - presenterViewedRegionW = e.slideToCanvasWidthRatio; - presenterViewedRegionH = e.slideToCanvasHeightRatio; - - slideModel.saveViewedRegion(e.xOffset, e.yOffset, e.slideToCanvasWidthRatio, e.slideToCanvasHeightRatio); - slideModel.calculateViewportNeededForRegion(e.xOffset, e.yOffset, e.slideToCanvasWidthRatio, e.slideToCanvasHeightRatio); - slideModel.displayViewerRegion(e.xOffset, e.yOffset, e.slideToCanvasWidthRatio, e.slideToCanvasHeightRatio); - slideModel.calculateViewportXY(); - slideModel.displayPresenterView(); - slideModel.printViewedRegion(); - fitSlideToLoader(); - } - - /** - * Handle notification from loader that a slide has been loaded. - */ - private function handleSlideLoadedEvent(e:SlideEvent):void{ - slideLoader.source = e.slide; - //slideLoader.accessibilityProperties.description = "Slide text start: " + e.slideText + " Slide text end"; - slideLoader.accessibilityDescription = ResourceUtil.getInstance().getString("bbb.presentation.slideloader.starttext") + e.slideText + ResourceUtil.getInstance().getString("bbb.presentation.slideloader.endtext"); - slideLoader.accessibilityName = ResourceUtil.getInstance().getString("bbb.presentation.slideloader.starttext") + e.slideText + ResourceUtil.getInstance().getString("bbb.presentation.slideloader.endtext"); - LogUtil.debug(e.slideText); + + private function handleSlideLoadedEvent(e:PageLoadedEvent):void{ + var page:Page = PresentationModel.getInstance().getPage(e.pageId); + if (page != null) { + slideLoader.source = page.swfData; + //slideLoader.accessibilityProperties.description = "Slide text start: " + e.slideText + " Slide text end"; +// slideLoader.accessibilityDescription = ResourceUtil.getInstance().getString("bbb.presentation.slideloader.starttext") + +// page.txtData + ResourceUtil.getInstance().getString("bbb.presentation.slideloader.endtext"); +// slideLoader.accessibilityName = ResourceUtil.getInstance().getString("bbb.presentation.slideloader.starttext") + +// page.txtData + ResourceUtil.getInstance().getString("bbb.presentation.slideloader.endtext"); + + + } } /** diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/maps/PresentationViewMap.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/maps/PresentationViewMap.mxml new file mode 100755 index 0000000000..365ad6ee2e --- /dev/null +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/maps/PresentationViewMap.mxml @@ -0,0 +1,8 @@ + + + + + + diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageReceiver.as b/bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageReceiver.as index 43c94c133a..e506ac98e2 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageReceiver.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageReceiver.as @@ -18,9 +18,7 @@ */ package org.bigbluebutton.modules.users.services { - - import com.asfusion.mate.events.Dispatcher; - + import com.asfusion.mate.events.Dispatcher; import org.bigbluebutton.common.LogUtil; import org.bigbluebutton.core.BBB; import org.bigbluebutton.core.EventConstants; @@ -43,7 +41,6 @@ package org.bigbluebutton.modules.users.services import org.bigbluebutton.main.model.users.events.RoleChangeEvent; import org.bigbluebutton.main.model.users.events.UsersConnectionEvent; import org.bigbluebutton.modules.present.events.CursorEvent; - import org.bigbluebutton.modules.present.events.MoveEvent; import org.bigbluebutton.modules.present.events.NavigationEvent; import org.bigbluebutton.modules.present.events.RemovePresentationEvent; import org.bigbluebutton.modules.present.events.UploadEvent; diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/WhiteboardToolbar.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/WhiteboardToolbar.mxml index be116fdf00..e37531cf6a 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/WhiteboardToolbar.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/WhiteboardToolbar.mxml @@ -37,9 +37,9 @@ with BigBlueButton; if not, see . - - - + + + .colorPickerStyle { @@ -82,7 +82,6 @@ with BigBlueButton; if not, see . import org.bigbluebutton.modules.present.events.DisplaySlideEvent; import org.bigbluebutton.modules.present.events.PresentationEvent; import org.bigbluebutton.modules.present.events.NavigationEvent; - import org.bigbluebutton.modules.present.events.SlideEvent; import org.bigbluebutton.modules.present.events.UploadEvent; import org.bigbluebutton.modules.present.ui.views.PresentationWindow; import org.bigbluebutton.modules.present.ui.views.SlideView; diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/maps/WhiteboardCanvasEventMap.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/maps/WhiteboardCanvasEventMap.mxml index 38ea7e7c5d..18dae42f14 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/maps/WhiteboardCanvasEventMap.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/maps/WhiteboardCanvasEventMap.mxml @@ -121,10 +121,6 @@ with BigBlueButton; if not, see . - - - -