pass podId to showPresentation
This commit is contained in:
parent
d4e91dee4a
commit
2b25a6ff24
@ -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.PresentationModel;
|
||||
import org.bigbluebutton.modules.present.model.PresentationPodManager;
|
||||
import org.bigbluebutton.modules.present.model.Presentation;
|
||||
import org.bigbluebutton.util.i18n.ResourceUtil;
|
||||
|
||||
use namespace mx_internal;
|
||||
@ -119,7 +120,15 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
public function setPodId(_podId: String): void {
|
||||
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) {
|
||||
selectFile();
|
||||
}
|
||||
@ -247,23 +256,23 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
}
|
||||
|
||||
private function handleOfficeDocumentConversionFailed(e:OfficeDocConvertFailedEvent):void {
|
||||
var logData:Object = UsersUtil.initLogData();
|
||||
logData.tags = ["presentation-conversion"];
|
||||
logData.filename = fileToUpload.name;
|
||||
logData.message = "Presentation conversion failed";
|
||||
LOGGER.warn(JSON.stringify(logData));
|
||||
|
||||
var logData:Object = UsersUtil.initLogData();
|
||||
logData.tags = ["presentation-conversion"];
|
||||
logData.filename = fileToUpload.name;
|
||||
logData.message = "Presentation conversion failed";
|
||||
LOGGER.warn(JSON.stringify(logData));
|
||||
|
||||
enableClosing();
|
||||
displayAlert(ResourceUtil.getInstance().getString('bbb.presentation.error.document.convert.failed'));
|
||||
}
|
||||
|
||||
|
||||
private function handleOfficeDocumentConversionInvalid(e:OfficeDocConvertInvalidEvent):void {
|
||||
var logData:Object = UsersUtil.initLogData();
|
||||
logData.tags = ["presentation-conversion"];
|
||||
logData.filename = fileToUpload.name;
|
||||
logData.message = "Presentation conversion invalid";
|
||||
LOGGER.warn(JSON.stringify(logData));
|
||||
|
||||
var logData:Object = UsersUtil.initLogData();
|
||||
logData.tags = ["presentation-conversion"];
|
||||
logData.filename = fileToUpload.name;
|
||||
logData.message = "Presentation conversion invalid";
|
||||
LOGGER.warn(JSON.stringify(logData));
|
||||
|
||||
enableClosing();
|
||||
displayAlert(ResourceUtil.getInstance().getString('bbb.presentation.error.document.convert.failed'));
|
||||
}
|
||||
@ -343,7 +352,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
private function handlePresentationRemoved(e:RemovePresentationEvent):void {
|
||||
for(var i:int = 0; i < presentationNamesAC.length; i++) {
|
||||
if(e.presentationName == presentationNamesAC.getItemAt(i).id) {
|
||||
if(e.presentationName == presentationNamesAC.getItemAt(i).presId) {
|
||||
presentationNamesAC.removeItemAt(i);
|
||||
return;
|
||||
}
|
||||
@ -355,9 +364,9 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
}
|
||||
|
||||
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 {
|
||||
globalDispatch.dispatchEvent(new UploadEvent(UploadEvent.OPEN_UPLOAD_WINDOW))
|
||||
globalDispatch.dispatchEvent(new UploadEvent(UploadEvent.OPEN_UPLOAD_WINDOW));
|
||||
}, 100);
|
||||
}
|
||||
]]>
|
||||
|
@ -26,17 +26,17 @@
|
||||
private var globalDispatch:Dispatcher = new Dispatcher();
|
||||
|
||||
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(new UploadEvent(UploadEvent.CLOSE_UPLOAD_WINDOW));
|
||||
}
|
||||
|
||||
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);
|
||||
rEvent.presentationName = data.id as String;
|
||||
rEvent.presentationName = data.presId as String;
|
||||
dispatchEvent(rEvent);
|
||||
}
|
||||
]]>
|
||||
@ -45,19 +45,19 @@
|
||||
width="{this.width-showBtn.width-deleteBtn.width-50}"
|
||||
truncateToFit="true"
|
||||
styleName="presentationNameLabel"
|
||||
text="{data.name as String}" />
|
||||
text="{data.presName as String}" />
|
||||
<mx:Button id="showBtn"
|
||||
height="32"
|
||||
label="{ResourceUtil.getInstance().getString('bbb.fileupload.showBtn')}"
|
||||
toolTip="{ResourceUtil.getInstance().getString('bbb.fileupload.showBtn.toolTip')}"
|
||||
styleName="presentationUploadShowButtonStyle"
|
||||
click="showPresentation()"
|
||||
enabled="{!data.current}" />
|
||||
enabled="{!data.presCurrent}" />
|
||||
<mx:Button id="deleteBtn"
|
||||
height="32"
|
||||
toolTip="{ResourceUtil.getInstance().getString('bbb.fileupload.deleteBtn.toolTip')}"
|
||||
styleName="presentationUploadDeleteButtonStyle"
|
||||
click="deletePresentation()"
|
||||
visible="{String(data.name) != 'default.pdf'}" />
|
||||
visible="{String(data.presName) != 'default.pdf'}" />
|
||||
|
||||
</mx:HBox>
|
||||
|
Loading…
Reference in New Issue
Block a user