handle current Pod Presenter in dropdown
This commit is contained in:
parent
ffbacbfcfe
commit
2703372d1c
@ -199,8 +199,10 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
listOfPodControls.push({label: this.podId,
|
||||
icon: getStyle('iconClearStatus'), handler: function (): void {} });
|
||||
|
||||
if (this.ownerId != null && this.ownerId != "") {
|
||||
listOfPodControls.push({label: UsersUtil.getUserName(this.ownerId),
|
||||
icon: getStyle('iconClearStatus'), handler: requestPodPresenterChange, data: this.ownerId});
|
||||
}
|
||||
|
||||
listOfPodControls.push({label: ResourceUtil.getInstance().getString('bbb.presentation.multipod.controls.newPresentationWindowOpen'),
|
||||
icon: getStyle('iconClearStatus'), handler: newPresentationWindowHandler});
|
||||
@ -212,19 +214,20 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
var presGroup: ArrayCollection = UsersUtil.getPresenterGroup();
|
||||
for (var j:int = 0; j < presGroup.length; j++) {
|
||||
var nextPresenterId: String = presGroup.getItemAt(j) as String;
|
||||
if (nextPresenterId != this.ownerId) { // avoid duplication
|
||||
listOfPodControls.push({label: UsersUtil.getUserName(nextPresenterId),
|
||||
icon: getStyle('iconClearStatus'), handler: requestPodPresenterChange, data: nextPresenterId});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
showCurrentPresenterInPod();
|
||||
}
|
||||
|
||||
public function onPodCreated(_podId: String, _ownerId: String):void {
|
||||
this.podId = _podId;
|
||||
this.ownerId = _ownerId;
|
||||
this.currentPresenterInPod = this.ownerId;
|
||||
populatePodDropdown();
|
||||
|
||||
// the owner is the default currentPresenter for the pod
|
||||
setPresenterInPodHelper(this.ownerId);
|
||||
}
|
||||
|
||||
public function getPodId(): String { return this.podId; }
|
||||
@ -266,20 +269,36 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
localDispatcher.dispatchEvent(new SetPresenterInPodReqEvent(this.podId, nextPresenterId));
|
||||
}
|
||||
|
||||
private function showCurrentPresenterInPod(): void {
|
||||
if (this.currentPresenterInPod == null || this.currentPresenterInPod == "") {
|
||||
return;
|
||||
}
|
||||
|
||||
for (var i:int=0; i<listOfPodControls.length; i++) {
|
||||
if (listOfPodControls[i].data != null && listOfPodControls[i].data == this.currentPresenterInPod
|
||||
&& presentationPodControls != null && presentationPodControls.dataProvider != null) {
|
||||
presentationPodControls.selectedItem = presentationPodControls.dataProvider.getItemAt(i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// show podId
|
||||
// presentationPodControls.selectedItem = presentationPodControls.dataProvider.getItemAt(0);
|
||||
}
|
||||
|
||||
private function handleSetPresenterInPodRespEvent(event: SetPresenterInPodRespEvent): void {
|
||||
if (event.podId != this.podId) {
|
||||
return;
|
||||
}
|
||||
|
||||
// set the dropdown current value? // TODO
|
||||
this.currentPresenterInPod = event.nextPresenterId as String;
|
||||
showCurrentPresenterInPod();
|
||||
|
||||
var presentationModel:PresentationModel = PresentationPodManager.getInstance().getPod(podId);
|
||||
var page : Page = presentationModel.getCurrentPage();
|
||||
var page: Page = presentationModel.getCurrentPage();
|
||||
|
||||
displaySlideNavigationControls(false, !!page);
|
||||
setupPresenter(this.currentPresenterInPod == UsersUtil.getMyUserID());
|
||||
|
||||
}
|
||||
|
||||
private function onCreationComplete():void{
|
||||
|
Loading…
Reference in New Issue
Block a user