Merge branch 'pods_vol4' of https://github.com/antobinary/bigbluebutton into antobinary-pods_vol4
This commit is contained in:
commit
ffab469980
@ -1,35 +0,0 @@
|
|||||||
//package org.bigbluebutton.core.apps.presentation
|
|
||||||
//
|
|
||||||
//import org.bigbluebutton.common2.msgs._
|
|
||||||
//import org.bigbluebutton.common2.domain.PresentationVO
|
|
||||||
//import org.bigbluebutton.core.apps.Presentation
|
|
||||||
//import org.bigbluebutton.core.bus.MessageBus
|
|
||||||
//import org.bigbluebutton.core.running.{ LiveMeeting, OutMsgRouter }
|
|
||||||
//
|
|
||||||
//trait GetPresentationInfoReqMsgHdlr {
|
|
||||||
// this: PresentationApp2x =>
|
|
||||||
//
|
|
||||||
// def handle(
|
|
||||||
// msg: GetPresentationInfoReqMsg,
|
|
||||||
// liveMeeting: LiveMeeting, bus: MessageBus
|
|
||||||
// ): Unit = {
|
|
||||||
// log.debug("Received GetPresentationInfoReqMsg")
|
|
||||||
//
|
|
||||||
// def broadcastEvent(msg: GetPresentationInfoReqMsg, presentations: Vector[Presentation]): Unit = {
|
|
||||||
// val routing = Routing.addMsgToClientRouting(MessageTypes.DIRECT, liveMeeting.props.meetingProp.intId, msg.header.userId)
|
|
||||||
// val envelope = BbbCoreEnvelope(GetPresentationInfoRespMsg.NAME, routing)
|
|
||||||
// val header = BbbClientMsgHeader(GetPresentationInfoRespMsg.NAME, liveMeeting.props.meetingProp.intId, msg.header.userId)
|
|
||||||
//
|
|
||||||
// val presVOs = presentations.map { p =>
|
|
||||||
// PresentationVO(p.id, p.name, p.current, p.pages.values.toVector, p.downloadable)
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// val body = GetPresentationInfoRespMsgBody(presVOs)
|
|
||||||
// val event = GetPresentationInfoRespMsg(header, body)
|
|
||||||
// val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
|
|
||||||
// bus.outGW.send(msgEvent)
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// broadcastEvent(msg, getPresentationInfo(liveMeeting)) //
|
|
||||||
// }
|
|
||||||
//}
|
|
@ -9,7 +9,6 @@ import org.bigbluebutton.core.running.LiveMeeting
|
|||||||
class PresentationApp2x(implicit val context: ActorContext)
|
class PresentationApp2x(implicit val context: ActorContext)
|
||||||
extends NewPresentationMsgHdlr
|
extends NewPresentationMsgHdlr
|
||||||
with ResizeAndMovePagePubMsgHdlr
|
with ResizeAndMovePagePubMsgHdlr
|
||||||
with RemovePresentationPubMsgHdlr
|
|
||||||
with PresentationUploadTokenReqMsgHdlr
|
with PresentationUploadTokenReqMsgHdlr
|
||||||
with PreuploadedPresentationsPubMsgHdlr
|
with PreuploadedPresentationsPubMsgHdlr
|
||||||
with PresentationConversionUpdatePubMsgHdlr
|
with PresentationConversionUpdatePubMsgHdlr
|
||||||
|
@ -1,32 +0,0 @@
|
|||||||
package org.bigbluebutton.core.apps.presentation
|
|
||||||
|
|
||||||
import org.bigbluebutton.common2.msgs._
|
|
||||||
import org.bigbluebutton.core.bus.MessageBus
|
|
||||||
import org.bigbluebutton.core.running.{ LiveMeeting }
|
|
||||||
|
|
||||||
trait RemovePresentationPubMsgHdlr {
|
|
||||||
this: PresentationApp2x =>
|
|
||||||
|
|
||||||
def handle(
|
|
||||||
msg: RemovePresentationPubMsg,
|
|
||||||
liveMeeting: LiveMeeting, bus: MessageBus
|
|
||||||
): Unit = {
|
|
||||||
|
|
||||||
def broadcastEvent(msg: RemovePresentationPubMsg): Unit = {
|
|
||||||
val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, liveMeeting.props.meetingProp.intId, msg.header.userId)
|
|
||||||
val envelope = BbbCoreEnvelope(RemovePresentationEvtMsg.NAME, routing)
|
|
||||||
val header = BbbClientMsgHeader(RemovePresentationEvtMsg.NAME, liveMeeting.props.meetingProp.intId, msg.header.userId)
|
|
||||||
|
|
||||||
val body = RemovePresentationEvtMsgBody(msg.body.presentationId)
|
|
||||||
val event = RemovePresentationEvtMsg(header, body)
|
|
||||||
val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
|
|
||||||
bus.outGW.send(msgEvent)
|
|
||||||
}
|
|
||||||
|
|
||||||
for {
|
|
||||||
presentation <- removePresentation(liveMeeting, msg.body.presentationId)
|
|
||||||
} yield {
|
|
||||||
broadcastEvent(msg)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,33 +0,0 @@
|
|||||||
//package org.bigbluebutton.core.apps.presentation
|
|
||||||
//
|
|
||||||
//import org.bigbluebutton.common2.msgs._
|
|
||||||
//import org.bigbluebutton.core.bus.MessageBus
|
|
||||||
//import org.bigbluebutton.core.running.LiveMeeting
|
|
||||||
//
|
|
||||||
//trait SetCurrentPresentationPubMsgHdlr {
|
|
||||||
// this: PresentationApp2x =>
|
|
||||||
//
|
|
||||||
// def handle(
|
|
||||||
// msg: SetCurrentPresentationPubMsg,
|
|
||||||
// liveMeeting: LiveMeeting, bus: MessageBus
|
|
||||||
// ): Unit = {
|
|
||||||
//
|
|
||||||
// def broadcastEvent(msg: SetCurrentPresentationPubMsg): Unit = {
|
|
||||||
// val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, liveMeeting.props.meetingProp.intId, msg.header.userId)
|
|
||||||
// val envelope = BbbCoreEnvelope(SetCurrentPresentationEvtMsg.NAME, routing)
|
|
||||||
// val header = BbbClientMsgHeader(SetCurrentPresentationEvtMsg.NAME, liveMeeting.props.meetingProp.intId, msg.header.userId)
|
|
||||||
//
|
|
||||||
// val body = SetCurrentPresentationEvtMsgBody(msg.body.podId, msg.body.presentationId)
|
|
||||||
// val event = SetCurrentPresentationEvtMsg(header, body)
|
|
||||||
// val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
|
|
||||||
// bus.outGW.send(msgEvent)
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// for {
|
|
||||||
//// pod <- getPr
|
|
||||||
// presentation <- setCurrentPresentation(liveMeeting, msg.body.presentationId)
|
|
||||||
// } yield {
|
|
||||||
// broadcastEvent(msg)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
@ -11,6 +11,7 @@ class PresentationPodHdlrs(implicit val context: ActorContext)
|
|||||||
with PresentationConversionCompletedSysPubMsgHdlr
|
with PresentationConversionCompletedSysPubMsgHdlr
|
||||||
with SetCurrentPagePubMsgHdlr
|
with SetCurrentPagePubMsgHdlr
|
||||||
with SetPresenterInPodReqMsgHdlr
|
with SetPresenterInPodReqMsgHdlr
|
||||||
|
with RemovePresentationPubMsgHdlr
|
||||||
with RemovePresentationPodPubMsgHdlr {
|
with RemovePresentationPodPubMsgHdlr {
|
||||||
|
|
||||||
val log = Logging(context.system, getClass)
|
val log = Logging(context.system, getClass)
|
||||||
|
@ -0,0 +1,50 @@
|
|||||||
|
package org.bigbluebutton.core.apps.presentationpod
|
||||||
|
|
||||||
|
import org.bigbluebutton.common2.msgs._
|
||||||
|
import org.bigbluebutton.core.bus.MessageBus
|
||||||
|
import org.bigbluebutton.core.domain.MeetingState2x
|
||||||
|
import org.bigbluebutton.core.running.LiveMeeting
|
||||||
|
|
||||||
|
trait RemovePresentationPubMsgHdlr {
|
||||||
|
this: PresentationPodHdlrs =>
|
||||||
|
|
||||||
|
def handle(
|
||||||
|
msg: RemovePresentationPubMsg, state: MeetingState2x,
|
||||||
|
liveMeeting: LiveMeeting, bus: MessageBus
|
||||||
|
): MeetingState2x = {
|
||||||
|
|
||||||
|
def broadcastRemovePresentationEvtMsg(podId: String, userId: String, presentationId: String): Unit = {
|
||||||
|
val routing = Routing.addMsgToClientRouting(
|
||||||
|
MessageTypes.BROADCAST_TO_MEETING,
|
||||||
|
liveMeeting.props.meetingProp.intId, userId
|
||||||
|
)
|
||||||
|
val envelope = BbbCoreEnvelope(RemovePresentationEvtMsg.NAME, routing)
|
||||||
|
val header = BbbClientMsgHeader(RemovePresentationEvtMsg.NAME, liveMeeting.props.meetingProp.intId, userId)
|
||||||
|
|
||||||
|
val body = RemovePresentationEvtMsgBody(podId, presentationId)
|
||||||
|
val event = RemovePresentationEvtMsg(header, body)
|
||||||
|
val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
|
||||||
|
bus.outGW.send(msgEvent)
|
||||||
|
}
|
||||||
|
|
||||||
|
val podId = msg.body.podId
|
||||||
|
val presentationId = msg.body.presentationId
|
||||||
|
|
||||||
|
val newState = for {
|
||||||
|
pod <- PresentationPodsApp.getPresentationPod(state, podId)
|
||||||
|
} yield {
|
||||||
|
broadcastRemovePresentationEvtMsg(pod.id, msg.header.userId, presentationId)
|
||||||
|
|
||||||
|
val pods = state.presentationPodManager.removePresentationInPod(pod.id, presentationId)
|
||||||
|
log.warning("_____ RemovePresentationPubMsgHdlr _ " + pods.printPods())
|
||||||
|
state.update(pods)
|
||||||
|
}
|
||||||
|
|
||||||
|
newState match {
|
||||||
|
case Some(ns) => ns
|
||||||
|
case None => state
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -132,6 +132,19 @@ case class PresentationPodManager(presentationPods: collection.immutable.Map[Str
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def removePresentationInPod(podId: String, presentationId: String): PresentationPodManager = {
|
||||||
|
val updatedManager = for {
|
||||||
|
pod <- getPod(podId)
|
||||||
|
} yield {
|
||||||
|
updatePresentationPod(pod.removePresentation(presentationId))
|
||||||
|
}
|
||||||
|
|
||||||
|
updatedManager match {
|
||||||
|
case Some(ns) => ns
|
||||||
|
case None => this
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
def printPods(): String = {
|
def printPods(): String = {
|
||||||
var a = s"printPods (${presentationPods.values.size}):"
|
var a = s"printPods (${presentationPods.values.size}):"
|
||||||
presentationPods.values.foreach(pod => a = a.concat(pod.printPod()))
|
presentationPods.values.foreach(pod => a = a.concat(pod.printPod()))
|
||||||
|
@ -286,7 +286,6 @@ class MeetingActor(
|
|||||||
|
|
||||||
// Presentation
|
// Presentation
|
||||||
case m: ResizeAndMovePagePubMsg => presentationApp2x.handle(m, liveMeeting, msgBus)
|
case m: ResizeAndMovePagePubMsg => presentationApp2x.handle(m, liveMeeting, msgBus)
|
||||||
case m: RemovePresentationPubMsg => presentationApp2x.handle(m, liveMeeting, msgBus)
|
|
||||||
case m: PresentationUploadTokenReqMsg => presentationApp2x.handle(m, liveMeeting, msgBus)
|
case m: PresentationUploadTokenReqMsg => presentationApp2x.handle(m, liveMeeting, msgBus)
|
||||||
case m: PreuploadedPresentationsSysPubMsg => presentationApp2x.handle(m, liveMeeting, msgBus)
|
case m: PreuploadedPresentationsSysPubMsg => presentationApp2x.handle(m, liveMeeting, msgBus)
|
||||||
case m: PresentationConversionUpdateSysPubMsg => presentationApp2x.handle(m, liveMeeting, msgBus)
|
case m: PresentationConversionUpdateSysPubMsg => presentationApp2x.handle(m, liveMeeting, msgBus)
|
||||||
@ -303,6 +302,7 @@ class MeetingActor(
|
|||||||
case m: PresentationConversionCompletedSysPubMsg => state = presentationPodsApp.handle(m, state, liveMeeting, msgBus)
|
case m: PresentationConversionCompletedSysPubMsg => state = presentationPodsApp.handle(m, state, liveMeeting, msgBus)
|
||||||
case m: SetCurrentPagePubMsg => state = presentationPodsApp.handle(m, state, liveMeeting, msgBus)
|
case m: SetCurrentPagePubMsg => state = presentationPodsApp.handle(m, state, liveMeeting, msgBus)
|
||||||
case m: SetPresenterInPodReqMsg => state = presentationPodsApp.handle(m, state, liveMeeting, msgBus)
|
case m: SetPresenterInPodReqMsg => state = presentationPodsApp.handle(m, state, liveMeeting, msgBus)
|
||||||
|
case m: RemovePresentationPubMsg => state = presentationPodsApp.handle(m, state, liveMeeting, msgBus)
|
||||||
|
|
||||||
// Caption
|
// Caption
|
||||||
case m: EditCaptionHistoryPubMsg => captionApp2x.handle(m, liveMeeting, msgBus)
|
case m: EditCaptionHistoryPubMsg => captionApp2x.handle(m, liveMeeting, msgBus)
|
||||||
|
@ -12,9 +12,6 @@ object ResizeAndMovePagePubMsg { val NAME = "ResizeAndMovePagePubMsg"}
|
|||||||
case class ResizeAndMovePagePubMsg(header: BbbClientMsgHeader, body: ResizeAndMovePagePubMsgBody) extends StandardMsg
|
case class ResizeAndMovePagePubMsg(header: BbbClientMsgHeader, body: ResizeAndMovePagePubMsgBody) extends StandardMsg
|
||||||
case class ResizeAndMovePagePubMsgBody(presentationId: String, pageId: String, xOffset: Double, yOffset: Double, widthRatio: Double, heightRatio: Double)
|
case class ResizeAndMovePagePubMsgBody(presentationId: String, pageId: String, xOffset: Double, yOffset: Double, widthRatio: Double, heightRatio: Double)
|
||||||
|
|
||||||
object RemovePresentationPubMsg { val NAME = "RemovePresentationPubMsg"}
|
|
||||||
case class RemovePresentationPubMsg(header: BbbClientMsgHeader, body: RemovePresentationPubMsgBody) extends StandardMsg
|
|
||||||
case class RemovePresentationPubMsgBody(presentationId: String)
|
|
||||||
// ------------ client to akka-apps ------------
|
// ------------ client to akka-apps ------------
|
||||||
|
|
||||||
|
|
||||||
@ -46,10 +43,6 @@ object ResizeAndMovePageEvtMsg { val NAME = "ResizeAndMovePageEvtMsg"}
|
|||||||
case class ResizeAndMovePageEvtMsg(header: BbbClientMsgHeader, body: ResizeAndMovePageEvtMsgBody) extends BbbCoreMsg
|
case class ResizeAndMovePageEvtMsg(header: BbbClientMsgHeader, body: ResizeAndMovePageEvtMsgBody) extends BbbCoreMsg
|
||||||
case class ResizeAndMovePageEvtMsgBody(presentationId: String, pageId: String, xOffset: Double, yOffset: Double, widthRatio: Double, heightRatio: Double)
|
case class ResizeAndMovePageEvtMsgBody(presentationId: String, pageId: String, xOffset: Double, yOffset: Double, widthRatio: Double, heightRatio: Double)
|
||||||
|
|
||||||
object RemovePresentationEvtMsg { val NAME = "RemovePresentationEvtMsg"}
|
|
||||||
case class RemovePresentationEvtMsg(header: BbbClientMsgHeader, body: RemovePresentationEvtMsgBody) extends BbbCoreMsg
|
|
||||||
case class RemovePresentationEvtMsgBody(presentationId: String)
|
|
||||||
|
|
||||||
|
|
||||||
// html5 client only
|
// html5 client only
|
||||||
object SyncGetPresentationInfoRespMsg { val NAME = "SyncGetPresentationInfoRespMsg"}
|
object SyncGetPresentationInfoRespMsg { val NAME = "SyncGetPresentationInfoRespMsg"}
|
||||||
|
@ -31,6 +31,10 @@ case class SetCurrentPagePubMsgBody(podId: String, presentationId: String, pageI
|
|||||||
object SetPresenterInPodReqMsg { val NAME = "SetPresenterInPodReqMsg"}
|
object SetPresenterInPodReqMsg { val NAME = "SetPresenterInPodReqMsg"}
|
||||||
case class SetPresenterInPodReqMsg(header: BbbClientMsgHeader, body: SetPresenterInPodReqMsgBody) extends StandardMsg
|
case class SetPresenterInPodReqMsg(header: BbbClientMsgHeader, body: SetPresenterInPodReqMsgBody) extends StandardMsg
|
||||||
case class SetPresenterInPodReqMsgBody(podId: String, nextPresenterId: String)
|
case class SetPresenterInPodReqMsgBody(podId: String, nextPresenterId: String)
|
||||||
|
|
||||||
|
object RemovePresentationPubMsg { val NAME = "RemovePresentationPubMsg"}
|
||||||
|
case class RemovePresentationPubMsg(header: BbbClientMsgHeader, body: RemovePresentationPubMsgBody) extends StandardMsg
|
||||||
|
case class RemovePresentationPubMsgBody(podId: String, presentationId: String)
|
||||||
// ------------ client to akka-apps ------------
|
// ------------ client to akka-apps ------------
|
||||||
|
|
||||||
|
|
||||||
@ -112,6 +116,10 @@ case class SetCurrentPageEvtMsgBody(podId: String, presentationId: String, pageI
|
|||||||
object SetPresenterInPodRespMsg { val NAME = "SetPresenterInPodRespMsg"}
|
object SetPresenterInPodRespMsg { val NAME = "SetPresenterInPodRespMsg"}
|
||||||
case class SetPresenterInPodRespMsg(header: BbbClientMsgHeader, body: SetPresenterInPodRespMsgBody) extends StandardMsg
|
case class SetPresenterInPodRespMsg(header: BbbClientMsgHeader, body: SetPresenterInPodRespMsgBody) extends StandardMsg
|
||||||
case class SetPresenterInPodRespMsgBody(podId: String, nextPresenterId: String)
|
case class SetPresenterInPodRespMsgBody(podId: String, nextPresenterId: String)
|
||||||
|
|
||||||
|
object RemovePresentationEvtMsg { val NAME = "RemovePresentationEvtMsg"}
|
||||||
|
case class RemovePresentationEvtMsg(header: BbbClientMsgHeader, body: RemovePresentationEvtMsgBody) extends BbbCoreMsg
|
||||||
|
case class RemovePresentationEvtMsgBody(podId: String, presentationId: String)
|
||||||
// ------------ akka-apps to client ------------
|
// ------------ akka-apps to client ------------
|
||||||
|
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ package org.bigbluebutton.main.api
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function handleDeletePresentationRequest(presentationID:String):void {
|
private function handleDeletePresentationRequest(presentationID:String):void {
|
||||||
var rEvent:RemovePresentationEvent = new RemovePresentationEvent(RemovePresentationEvent.REMOVE_PRESENTATION_EVENT);
|
var rEvent:RemovePresentationEvent = new RemovePresentationEvent(RemovePresentationEvent.REMOVE_PRESENTATION_EVENT, "unknown");
|
||||||
rEvent.presentationName = presentationID;
|
rEvent.presentationName = presentationID;
|
||||||
_dispatcher.dispatchEvent(rEvent);
|
_dispatcher.dispatchEvent(rEvent);
|
||||||
}
|
}
|
||||||
|
@ -252,7 +252,7 @@ package org.bigbluebutton.modules.present.business
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function removePresentation(e:RemovePresentationEvent):void {
|
public function removePresentation(e:RemovePresentationEvent):void {
|
||||||
sender.removePresentation(e.presentationName);
|
sender.removePresentation(e.podId, e.presentationName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -47,10 +47,11 @@ package org.bigbluebutton.modules.present.events
|
|||||||
public var presentationName:String;
|
public var presentationName:String;
|
||||||
public var podId: String;
|
public var podId: String;
|
||||||
|
|
||||||
public function PresenterCommands(type:String, slideNumber:Number = 0)
|
public function PresenterCommands(type:String, _podId: String, slideNumber:Number = 0)
|
||||||
{
|
{
|
||||||
this.slideNumber = slideNumber;
|
|
||||||
super(type, true, false);
|
super(type, true, false);
|
||||||
|
this.podId = _podId;
|
||||||
|
this.slideNumber = slideNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -32,10 +32,12 @@ package org.bigbluebutton.modules.present.events
|
|||||||
public static const UPDATE_DOWNLOADABLE_FILES_EVENT:String = "Update Downloadable Files Event";
|
public static const UPDATE_DOWNLOADABLE_FILES_EVENT:String = "Update Downloadable Files Event";
|
||||||
|
|
||||||
public var presentationName:String;
|
public var presentationName:String;
|
||||||
|
public var podId: String;
|
||||||
|
|
||||||
public function RemovePresentationEvent(type:String, bubbles:Boolean=true, cancelable:Boolean=false)
|
public function RemovePresentationEvent(type:String, _podId: String, bubbles:Boolean=true, cancelable:Boolean=false)
|
||||||
{
|
{
|
||||||
super(type, bubbles, cancelable);
|
super(type, bubbles, cancelable);
|
||||||
|
this.podId = _podId;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -144,25 +144,25 @@ package org.bigbluebutton.modules.present.services
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function removeAllPresentations():void {
|
public function removeAllPresentations(podId: String):void {
|
||||||
// model.removeAllPresentations();
|
podManager.getPod(podId).removeAllPresentations();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function removePresentation(presentationID:String):void {
|
public function removePresentation(podId: String, presentationID:String):void {
|
||||||
// var removedEvent:RemovePresentationEvent = new RemovePresentationEvent(RemovePresentationEvent.PRESENTATION_REMOVED_EVENT);
|
var removedEvent:RemovePresentationEvent = new RemovePresentationEvent(RemovePresentationEvent.PRESENTATION_REMOVED_EVENT, podId);
|
||||||
// removedEvent.presentationName = presentationID;
|
removedEvent.presentationName = presentationID;
|
||||||
// dispatcher.dispatchEvent(removedEvent);
|
dispatcher.dispatchEvent(removedEvent);
|
||||||
//
|
|
||||||
// var currPresentation:Presentation = model.getCurrentPresentation();
|
var currPresentation:Presentation = podManager.getPod(podId).getCurrentPresentation();
|
||||||
//
|
|
||||||
// if(currPresentation && presentationID == currPresentation.id) {
|
if(currPresentation && presentationID == currPresentation.id) {
|
||||||
// var uploadEvent:UploadEvent = new UploadEvent(UploadEvent.CLEAR_PRESENTATION);
|
var uploadEvent:UploadEvent = new UploadEvent(UploadEvent.CLEAR_PRESENTATION);
|
||||||
// dispatcher.dispatchEvent(uploadEvent);
|
dispatcher.dispatchEvent(uploadEvent);
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// model.removePresentation(presentationID);
|
podManager.getPod(podId).removePresentation(presentationID);
|
||||||
// var updateEvent:RemovePresentationEvent = new RemovePresentationEvent(RemovePresentationEvent.UPDATE_DOWNLOADABLE_FILES_EVENT);
|
var updateEvent:RemovePresentationEvent = new RemovePresentationEvent(RemovePresentationEvent.UPDATE_DOWNLOADABLE_FILES_EVENT, podId);
|
||||||
// dispatcher.dispatchEvent(updateEvent); // this event will trigger the disabling of the download button.
|
dispatcher.dispatchEvent(updateEvent); // this event will trigger the disabling of the download button.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -175,10 +175,13 @@ package org.bigbluebutton.modules.present.services.messaging
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function handleRemovePresentationEvtMsg(msg:Object):void {
|
private function handleRemovePresentationEvtMsg(msg:Object):void {
|
||||||
service.removePresentation(msg.body.presentationId);
|
var podId: String = msg.body.podId as String;
|
||||||
|
var presentationId: String = msg.body.presentationId as String;
|
||||||
|
service.removePresentation(podId, presentationId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function handlePresentationConversionCompletedEvtMsg(msg:Object):void {
|
private function handlePresentationConversionCompletedEvtMsg(msg:Object):void {
|
||||||
|
|
||||||
var presVO: PresentationVO = processUploadedPresentation(msg.body.presentation);
|
var presVO: PresentationVO = processUploadedPresentation(msg.body.presentation);
|
||||||
var podId: String = msg.body.podId as String;
|
var podId: String = msg.body.podId as String;
|
||||||
|
|
||||||
@ -263,14 +266,15 @@ package org.bigbluebutton.modules.present.services.messaging
|
|||||||
private function handleGetPresentationInfoRespMsg(msg:Object):void {
|
private function handleGetPresentationInfoRespMsg(msg:Object):void {
|
||||||
var presos:ArrayCollection = new ArrayCollection();
|
var presos:ArrayCollection = new ArrayCollection();
|
||||||
var presentations:Array = msg.body.presentations as Array;
|
var presentations:Array = msg.body.presentations as Array;
|
||||||
|
var podId:String = msg.body.podId as String;
|
||||||
for (var j:int = 0; j < presentations.length; j++) {
|
for (var j:int = 0; j < presentations.length; j++) {
|
||||||
var presentation:Object = presentations[j] as Object;
|
var presentation:Object = presentations[j] as Object;
|
||||||
var presVO: PresentationVO = processUploadedPresentation(presentation);
|
var presVO: PresentationVO = processUploadedPresentation(presentation);
|
||||||
presos.addItem(presVO);
|
presos.addItem(presVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
service.removeAllPresentations();
|
service.removeAllPresentations(podId);
|
||||||
// service.addPresentations(presos, podId); // TODO -- are they all on the same pod?
|
service.addPresentations(podId, presos);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function handlePresentationUploadTokenPassRespMsg(msg:Object):void {
|
private function handlePresentationUploadTokenPassRespMsg(msg:Object):void {
|
||||||
|
@ -102,10 +102,10 @@ package org.bigbluebutton.modules.present.services.messaging
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function removePresentation(presentationId:String):void {
|
public function removePresentation(podId: String, presentationId:String):void {
|
||||||
var message:Object = {
|
var message:Object = {
|
||||||
header: {name: "RemovePresentationPubMsg", meetingId: UsersUtil.getInternalMeetingID(), userId: UsersUtil.getMyUserID()},
|
header: {name: "RemovePresentationPubMsg", meetingId: UsersUtil.getInternalMeetingID(), userId: UsersUtil.getMyUserID()},
|
||||||
body: {presentationId: presentationId}
|
body: {podId: podId, presentationId: presentationId}
|
||||||
};
|
};
|
||||||
|
|
||||||
var _nc:ConnectionManager = BBB.initConnectionManager();
|
var _nc:ConnectionManager = BBB.initConnectionManager();
|
||||||
|
@ -88,6 +88,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
|||||||
import org.bigbluebutton.modules.present.model.PresentOptions;
|
import org.bigbluebutton.modules.present.model.PresentOptions;
|
||||||
import org.bigbluebutton.modules.present.model.PresentationModel;
|
import org.bigbluebutton.modules.present.model.PresentationModel;
|
||||||
import org.bigbluebutton.modules.present.model.PresentationPodManager;
|
import org.bigbluebutton.modules.present.model.PresentationPodManager;
|
||||||
|
import org.bigbluebutton.modules.present.model.Presentation;
|
||||||
import org.bigbluebutton.util.i18n.ResourceUtil;
|
import org.bigbluebutton.util.i18n.ResourceUtil;
|
||||||
|
|
||||||
use namespace mx_internal;
|
use namespace mx_internal;
|
||||||
@ -119,7 +120,15 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
public function setPodId(_podId: String): void {
|
public function setPodId(_podId: String): void {
|
||||||
podId = _podId;
|
podId = _podId;
|
||||||
presentationNamesAC = PresentationPodManager.getInstance().getPod(podId).getPresentations();
|
presentationNamesAC = new ArrayCollection();
|
||||||
|
var presNames: ArrayCollection = PresentationPodManager.getInstance().getPod(podId).getPresentations();
|
||||||
|
|
||||||
|
for (var i:int =0; i<presNames.length; i++) {
|
||||||
|
var pres: Presentation = presNames.getItemAt(i) as Presentation;
|
||||||
|
presentationNamesAC.addItem({ presName: pres.name, presCurrent: pres.current,
|
||||||
|
presId: pres.id, podId: this.podId});
|
||||||
|
}
|
||||||
|
|
||||||
if (presentationNamesAC.length <= 0) {
|
if (presentationNamesAC.length <= 0) {
|
||||||
selectFile();
|
selectFile();
|
||||||
}
|
}
|
||||||
@ -343,7 +352,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
private function handlePresentationRemoved(e:RemovePresentationEvent):void {
|
private function handlePresentationRemoved(e:RemovePresentationEvent):void {
|
||||||
for(var i:int = 0; i < presentationNamesAC.length; i++) {
|
for(var i:int = 0; i < presentationNamesAC.length; i++) {
|
||||||
if(e.presentationName == presentationNamesAC.getItemAt(i).id) {
|
if(e.presentationName == presentationNamesAC.getItemAt(i).presId && e.podId == this.podId) {
|
||||||
presentationNamesAC.removeItemAt(i);
|
presentationNamesAC.removeItemAt(i);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -355,9 +364,9 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function retryButtonClikcHandler(event:MouseEvent):void {
|
private function retryButtonClikcHandler(event:MouseEvent):void {
|
||||||
globalDispatch.dispatchEvent(new UploadEvent(UploadEvent.CLOSE_UPLOAD_WINDOW))
|
globalDispatch.dispatchEvent(new UploadEvent(UploadEvent.CLOSE_UPLOAD_WINDOW));
|
||||||
setTimeout(function():void {
|
setTimeout(function():void {
|
||||||
globalDispatch.dispatchEvent(new UploadEvent(UploadEvent.OPEN_UPLOAD_WINDOW))
|
globalDispatch.dispatchEvent(new UploadEvent(UploadEvent.OPEN_UPLOAD_WINDOW));
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
]]>
|
]]>
|
||||||
|
@ -207,9 +207,11 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
|||||||
listOfPodControls.push({label: ResourceUtil.getInstance().getString('bbb.presentation.multipod.controls.newPresentationWindowOpen'),
|
listOfPodControls.push({label: ResourceUtil.getInstance().getString('bbb.presentation.multipod.controls.newPresentationWindowOpen'),
|
||||||
icon: getStyle('iconClearStatus'), handler: newPresentationWindowHandler});
|
icon: getStyle('iconClearStatus'), handler: newPresentationWindowHandler});
|
||||||
|
|
||||||
|
if (this.podId != "DEFAULT_PRESENTATION_POD") {
|
||||||
listOfPodControls.push({label: ResourceUtil.getInstance().getString('bbb.presentation.multipod.controls.closePresentationWindowOpen'),
|
listOfPodControls.push({label: ResourceUtil.getInstance().getString('bbb.presentation.multipod.controls.closePresentationWindowOpen'),
|
||||||
icon: getStyle('iconClearStatus'), handler: closePresentationWindowHandler});
|
icon: getStyle('iconClearStatus'), handler: closePresentationWindowHandler});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
var presGroup: ArrayCollection = UsersUtil.getPresenterGroup();
|
var presGroup: ArrayCollection = UsersUtil.getPresenterGroup();
|
||||||
for (var j:int = 0; j < presGroup.length; j++) {
|
for (var j:int = 0; j < presGroup.length; j++) {
|
||||||
@ -554,9 +556,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function notifyOthersOfSharingPresentation(presentationName:String):void {
|
private function notifyOthersOfSharingPresentation(presentationName:String):void {
|
||||||
var shareEvent:PresenterCommands = new PresenterCommands(PresenterCommands.SHARE_PRESENTATION_COMMAND);
|
var shareEvent:PresenterCommands = new PresenterCommands(PresenterCommands.SHARE_PRESENTATION_COMMAND, this.podId);
|
||||||
shareEvent.presentationName = presentationName;
|
shareEvent.presentationName = presentationName;
|
||||||
shareEvent.podId = podId;
|
|
||||||
dispatchEvent(shareEvent);
|
dispatchEvent(shareEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1017,6 +1018,9 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function handleUpdateDownloadableFilesEvent(e:RemovePresentationEvent):void {
|
private function handleUpdateDownloadableFilesEvent(e:RemovePresentationEvent):void {
|
||||||
|
if (e.podId == null || e.podId != this.podId) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
updateDownloadBtn();
|
updateDownloadBtn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,8 +285,11 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function notifyOthersOfZoomEvent():void {
|
private function notifyOthersOfZoomEvent():void {
|
||||||
var presentEvent:PresenterCommands = new PresenterCommands(PresenterCommands.ZOOM);
|
if (this.podId == null) {
|
||||||
presentEvent.podId = this.podId;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var presentEvent:PresenterCommands = new PresenterCommands(PresenterCommands.ZOOM, this.podId);
|
||||||
presentEvent.xOffset = slideModel.viewedRegionX;
|
presentEvent.xOffset = slideModel.viewedRegionX;
|
||||||
presentEvent.yOffset = slideModel.viewedRegionY;
|
presentEvent.yOffset = slideModel.viewedRegionY;
|
||||||
presentEvent.slideToCanvasWidthRatio = slideModel.viewedRegionW;
|
presentEvent.slideToCanvasWidthRatio = slideModel.viewedRegionW;
|
||||||
|
@ -26,17 +26,17 @@
|
|||||||
private var globalDispatch:Dispatcher = new Dispatcher();
|
private var globalDispatch:Dispatcher = new Dispatcher();
|
||||||
|
|
||||||
private function showPresentation():void {
|
private function showPresentation():void {
|
||||||
var changePresCommand:ChangePresentationCommand = new ChangePresentationCommand('AAAAAUploadedPresentationRendererAAAA', data.id);
|
var changePresCommand:ChangePresentationCommand = new ChangePresentationCommand(data.podId, data.presId);
|
||||||
globalDispatch.dispatchEvent(changePresCommand);
|
globalDispatch.dispatchEvent(changePresCommand);
|
||||||
|
|
||||||
globalDispatch.dispatchEvent(new UploadEvent(UploadEvent.CLOSE_UPLOAD_WINDOW));
|
globalDispatch.dispatchEvent(new UploadEvent(UploadEvent.CLOSE_UPLOAD_WINDOW));
|
||||||
}
|
}
|
||||||
|
|
||||||
private function deletePresentation():void {
|
private function deletePresentation():void {
|
||||||
LOGGER.debug("FileUploadWindow.mxml::deletePresentation() {0}", [data.id]);
|
LOGGER.debug("FileUploadWindow.mxml::deletePresentation() {0}", [data.presId]);
|
||||||
|
|
||||||
var rEvent:RemovePresentationEvent = new RemovePresentationEvent(RemovePresentationEvent.REMOVE_PRESENTATION_EVENT);
|
var rEvent:RemovePresentationEvent = new RemovePresentationEvent(RemovePresentationEvent.REMOVE_PRESENTATION_EVENT, data.podId);
|
||||||
rEvent.presentationName = data.id as String;
|
rEvent.presentationName = data.presId as String;
|
||||||
dispatchEvent(rEvent);
|
dispatchEvent(rEvent);
|
||||||
}
|
}
|
||||||
]]>
|
]]>
|
||||||
@ -45,19 +45,19 @@
|
|||||||
width="{this.width-showBtn.width-deleteBtn.width-50}"
|
width="{this.width-showBtn.width-deleteBtn.width-50}"
|
||||||
truncateToFit="true"
|
truncateToFit="true"
|
||||||
styleName="presentationNameLabel"
|
styleName="presentationNameLabel"
|
||||||
text="{data.name as String}" />
|
text="{data.presName as String}" />
|
||||||
<mx:Button id="showBtn"
|
<mx:Button id="showBtn"
|
||||||
height="32"
|
height="32"
|
||||||
label="{ResourceUtil.getInstance().getString('bbb.fileupload.showBtn')}"
|
label="{ResourceUtil.getInstance().getString('bbb.fileupload.showBtn')}"
|
||||||
toolTip="{ResourceUtil.getInstance().getString('bbb.fileupload.showBtn.toolTip')}"
|
toolTip="{ResourceUtil.getInstance().getString('bbb.fileupload.showBtn.toolTip')}"
|
||||||
styleName="presentationUploadShowButtonStyle"
|
styleName="presentationUploadShowButtonStyle"
|
||||||
click="showPresentation()"
|
click="showPresentation()"
|
||||||
enabled="{!data.current}" />
|
enabled="{!data.presCurrent}" />
|
||||||
<mx:Button id="deleteBtn"
|
<mx:Button id="deleteBtn"
|
||||||
height="32"
|
height="32"
|
||||||
toolTip="{ResourceUtil.getInstance().getString('bbb.fileupload.deleteBtn.toolTip')}"
|
toolTip="{ResourceUtil.getInstance().getString('bbb.fileupload.deleteBtn.toolTip')}"
|
||||||
styleName="presentationUploadDeleteButtonStyle"
|
styleName="presentationUploadDeleteButtonStyle"
|
||||||
click="deletePresentation()"
|
click="deletePresentation()"
|
||||||
visible="{String(data.name) != 'default.pdf'}" />
|
visible="{String(data.presName) != 'default.pdf'}" />
|
||||||
|
|
||||||
</mx:HBox>
|
</mx:HBox>
|
||||||
|
Loading…
Reference in New Issue
Block a user