diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/ExportEvent.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/ExportEvent.as
index a2351a07e6..61035df098 100644
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/ExportEvent.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/ExportEvent.as
@@ -19,6 +19,7 @@
package org.bigbluebutton.modules.present.events {
import flash.events.Event;
+ import org.bigbluebutton.modules.present.model.PresentationModel;
import org.bigbluebutton.modules.present.ui.views.models.SlideViewModel;
public class ExportEvent extends Event {
@@ -38,6 +39,8 @@ package org.bigbluebutton.modules.present.events {
public var slideModel:SlideViewModel;
+ public var presentationModel:PresentationModel;
+
public function ExportEvent(type:String) {
super(type, true, false);
}
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 591e39dc8a..a21c638aeb 100644
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/managers/PresentManager.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/managers/PresentManager.as
@@ -169,6 +169,7 @@ package org.bigbluebutton.modules.present.managers
exportWindow.numberOfPages = e.numberOfPages;
exportWindow.slidesUrl = e.slidesUrl;
exportWindow.slideModel = e.slideModel;
+ exportWindow.presentationModel = e.presentationModel;
}
}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/FileExportWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/FileExportWindow.mxml
index 7ce81b6cfc..4e325f62d4 100644
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/FileExportWindow.mxml
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/FileExportWindow.mxml
@@ -39,9 +39,9 @@ with BigBlueButton; if not, see .
.
public var slidesUrl:String;
public var slideModel:SlideViewModel;
+
+ public var presentationModel:PresentationModel;
private var _pdf:PDF;
@@ -86,7 +88,7 @@ with BigBlueButton; if not, see .
private static const LOGGER:ILogger = getClassLogger(FileExportWindow);
protected function creationCompleteHandler(event:FlexEvent):void {
- fileName = PresentationModel.getInstance().getCurrentPresentation().name;
+ fileName = presentationModel.getCurrentPresentation().name;
fileName = StringUtils.substringBeforeLast(fileName, ".");
addEventListener("pdfComplete", pdfCompleteHandler);
@@ -114,12 +116,12 @@ with BigBlueButton; if not, see .
}
protected function nextPdfPageHandler(event:Event):void {
- progressBar.label = ResourceUtil.getInstance().getString('bbb.presentationExport.converting', [PresentationModel.getInstance().getCurrentPresentation().name, _currentPage > numberOfPages ? 1 : _currentPage, numberOfPages]);
+ progressBar.label = ResourceUtil.getInstance().getString('bbb.presentationExport.converting', [presentationModel.getCurrentPresentation().name, _currentPage > numberOfPages ? 1 : _currentPage, numberOfPages]);
progressBar.setProgress(_currentPage > numberOfPages ? 0 : _currentPage, _currentPage > numberOfPages ? 1 : numberOfPages);
var pageLoader:Loader = new Loader();
pageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, function():void {
- var pagePath:String = PresentationModel.getInstance().getCurrentPresentation().id + "/" + _currentPage;
+ var pagePath:String = presentationModel.getCurrentPresentation().id + "/" + _currentPage;
LOGGER.debug(_currentPage + " - Page model path: " + pagePath);
var annotations:Array = LiveMeeting.inst().whiteboardModel.getAnnotations(pagePath);
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 d4bbe8d340..9d2027166e 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
@@ -649,11 +649,13 @@ with BigBlueButton; if not, see .
}
private function openExportWindow(firstPage:int, numberOfPages:int):void {
+ var presentationModel:PresentationModel = PresentationPodManager.getInstance().getPod(podId);
var event:ExportEvent = new ExportEvent(ExportEvent.OPEN_EXPORT_WINDOW);
event.firstPage = firstPage;
event.numberOfPages = numberOfPages;
- event.slidesUrl = StringUtils.substringBeforeLast(PresentationModel.getInstance().getCurrentPage().swfUri, "/") + "/";
+ event.slidesUrl = StringUtils.substringBeforeLast(presentationModel.getCurrentPage().swfUri, "/") + "/";
event.slideModel = slideView.slideModel;
+ event.presentationModel = presentationModel;
dispatchEvent(event);
}
@@ -693,13 +695,14 @@ with BigBlueButton; if not, see .
}
private function setDownloadMenuData():void {
+ var presentationModel:PresentationModel = PresentationPodManager.getInstance().getPod(podId);
var resourceUtil:ResourceUtil = ResourceUtil.getInstance();
downloadMenuData = [];
- if (PresentationModel.getInstance().getCurrentPresentation()) {
+ if (presentationModel.getCurrentPresentation()) {
downloadMenuData.push({label: resourceUtil.getString("bbb.presentation.downloadMenu.slideWithAnnotations"), data:"slide_annotation"});
downloadMenuData.push({label: resourceUtil.getString("bbb.presentation.downloadMenu.presentationWithAnnotations"), data:"presentation_annotation"});
}
- if (PresentationModel.getInstance().getDownloadablePresentations().length > 0){
+ if (presentationModel.getDownloadablePresentations().length > 0){
downloadMenuData.push({label: resourceUtil.getString("bbb.presentation.downloadMenu.presentations"), data:"presentations"});
}
}
@@ -813,10 +816,11 @@ with BigBlueButton; if not, see .
}
private function downloadMenuClickHandler(e:MenuEvent):void {
+ var presentationModel:PresentationModel = PresentationPodManager.getInstance().getPod(podId);
if (e.item.data == "slide_annotation") {
- openExportWindow(PresentationModel.getInstance().getCurrentPage().num, 1);
+ openExportWindow(presentationModel.getCurrentPage().num, 1);
} else if (e.item.data == "presentation_annotation") {
- openExportWindow(1, PresentationModel.getInstance().getNumberOfPages());
+ openExportWindow(1, presentationModel.getNumberOfPages());
} else if (e.item.data == "presentations") {
openDownloadWindow();
}
@@ -931,7 +935,7 @@ with BigBlueButton; if not, see .
var presentationModel:PresentationModel = PresentationPodManager.getInstance().getPod(podId);
if (presentationModel != null) {
var downloadablePresentations:ArrayCollection = presentationModel.getDownloadablePresentations();
- if ( presentOptions.enableDownload && (downloadablePresentations.length > 0 || PresentationModel.getInstance().getCurrentPresentation()) ) {
+ if ( presentOptions.enableDownload && (downloadablePresentations.length > 0 || presentationModel.getCurrentPresentation()) ) {
LOGGER.debug("Enabling download presentation button. There are {0} presentations available for downloading.", [downloadablePresentations.length]);
downloadPres.visible = true;
} else {