Fixed Issue 490

git-svn-id: http://bigbluebutton.googlecode.com/svn/trunk@4291 af16638f-c34d-0410-8cfa-b39d5352b314
This commit is contained in:
Denis Zgonjanin 2010-05-10 13:28:28 +00:00
parent bbd43628dd
commit 90d81ef2c6
3 changed files with 21 additions and 13 deletions

View File

@ -488,6 +488,7 @@ package org.bigbluebutton.modules.present.business {
maxNumberOfPages:Number) : void {
LogUtil.debug("pageCountExceededUpdateMessageCallback:Received update message " + messageKey);
var uploadEvent:UploadEvent = new UploadEvent(UploadEvent.PAGE_COUNT_EXCEEDED);
uploadEvent.maximumSupportedNumberOfSlides = maxNumberOfPages;
dispatcher.dispatchEvent(uploadEvent);
}

View File

@ -51,6 +51,7 @@ package org.bigbluebutton.modules.present.events
public var totalSlides:Number;
public var fileToUpload:FileReference;
public var percentageComplete:Number;
public var maximumSupportedNumberOfSlides:int;
public function UploadEvent(type:String) {
super(type, true, false);

View File

@ -45,18 +45,19 @@
<mx:Script>
<![CDATA[
import org.bigbluebutton.modules.present.events.RemovePresentationEvent;
import mx.controls.Alert;
import org.bigbluebutton.util.i18n.ResourceUtil;
import org.bigbluebutton.modules.present.events.UploadEvent;
import com.asfusion.mate.events.Dispatcher;
import mx.managers.PopUpManager;
import org.bigbluebutton.common.Images;
import mx.collections.*
import mx.events.ValidationResultEvent;
import mx.validators.*;
import mx.collections.*;
import mx.events.FlexEvent;
import mx.events.ValidationResultEvent;
import mx.managers.PopUpManager;
import mx.validators.*;
import org.bigbluebutton.common.Images;
import org.bigbluebutton.modules.present.events.RemovePresentationEvent;
import org.bigbluebutton.modules.present.events.UploadEvent;
import org.bigbluebutton.util.i18n.ResourceUtil;
[Bindable] public var presentationNames:Array = new Array();
[Bindable] public var presentationNamesAC:ArrayCollection;
@ -246,7 +247,8 @@
private function handlePageCountExceeded(e:UploadEvent):void {
LogUtil.debug("handlePageCountExceeded");
enableControls();
displayAlert(ResourceUtil.getInstance().getString('bbb.presentation.error.convert.maxnbpagereach'));
var message:String = " Maximum supported is " + e.maximumSupportedNumberOfSlides;
displayAlert(ResourceUtil.getInstance().getString('bbb.presentation.error.convert.maxnbpagereach'), message);
}
private function uploadIOError(e:UploadEvent):void{
@ -259,9 +261,13 @@
displayAlert(ResourceUtil.getInstance().getString('bbb.presentation.error.security'));
}
private function displayAlert(text:String):void {
Alert.okLabel = ResourceUtil.getInstance().getString('bbb.presentation.ok');
Alert.show(text);
private function displayAlert(error:String, message:String = null):void {
var okLabel:String = ResourceUtil.getInstance().getString('bbb.presentation.ok');
progressBar.setStyle("color", 0xFF0000);
progressLbl.setStyle("color", 0xFF0000);
progressBar.label = error + message;
progressLbl.text = "Click OK to close the window";
okCancelBtn.label = "Ok";
}