- open create poll window

This commit is contained in:
Richard Alam 2013-07-02 15:47:14 +00:00
parent 2cbd85ce6f
commit 81ccc65a4a
4 changed files with 50 additions and 23 deletions

View File

@ -0,0 +1,14 @@
package org.bigbluebutton.modules.polling.events
{
import flash.events.Event;
public class OpenCreatePollWindowEvent extends Event
{
public static const OPEN_CREATE_POLL_WINDOW:String = "open create poll window event";
public function OpenCreatePollWindowEvent()
{
super(OPEN_CREATE_POLL_WINDOW, true, false);
}
}
}

View File

@ -70,7 +70,7 @@ package org.bigbluebutton.modules.polling.managers
private var updatePollWindow:UpdatePollWindow = new UpdatePollWindow();
private var takePollWindow:TakePollWindow;
private var pollMainWindow:PollMainWindow = new PollMainWindow();
private var createPollWindow:CreatePollWindow;
private var createPollWindow:CreatePollWindow = new CreatePollWindow();
private var resultsWindow:DisplayResultWindow = new DisplayResultWindow();
private var testCreateWindow:PollCreateWindow;
@ -96,6 +96,10 @@ package org.bigbluebutton.modules.polling.managers
openWindow(pollMainWindow);
}
public function handleOpenCreatePollWindowEvent():void {
openWindow(createPollWindow);
}
public function handleOpenTakePollWindowEvent(event:OpenTakePollWindowEvent):void {
takePollWindow = new TakePollWindow();
takePollWindow.viewModel = _viewModel;

View File

@ -26,6 +26,7 @@
import org.bigbluebutton.main.events.ShortcutEvent;
import org.bigbluebutton.modules.polling.events.GenerateWebKeyEvent;
import org.bigbluebutton.modules.polling.events.ModuleEvent;
import org.bigbluebutton.modules.polling.events.OpenCreatePollWindowEvent;
import org.bigbluebutton.modules.polling.events.OpenPollMainWindowEvent;
import org.bigbluebutton.modules.polling.events.OpenPollResultWindowEvent;
import org.bigbluebutton.modules.polling.events.OpenPollUpdateWindowEvent;
@ -53,6 +54,10 @@
<EventHandlers type="{ModuleEvent.STOP}">
</EventHandlers>
<EventHandlers type="{OpenCreatePollWindowEvent.OPEN_CREATE_POLL_WINDOW}">
<MethodInvoker generator="{PollingWindowManager}" method="handleOpenCreatePollWindowEvent" />
</EventHandlers>
<EventHandlers type="{OpenPollMainWindowEvent.OPEN_POLL_MAIN_WINDOW}">
<MethodInvoker generator="{PollingWindowManager}" method="handleOpenPollMainWindowEvent" />
</EventHandlers>

View File

@ -4,6 +4,9 @@
borderThicknessRight="0" borderThicknessTop="0" creationComplete="onPreInit()" >
<mx:Script>
<![CDATA[
import com.asfusion.mate.events.Dispatcher;
import org.bigbluebutton.modules.polling.events.OpenCreatePollWindowEvent;
import org.bigbluebutton.modules.polling.model.PollingViewModel;
import org.bigbluebutton.util.i18n.ResourceUtil;
@ -32,8 +35,9 @@
private function updateCamera():void {
private function createPoll():void {
var dispatcher:Dispatcher = new Dispatcher();
dispatcher.dispatchEvent(new OpenCreatePollWindowEvent());
}
]]>
</mx:Script>
@ -71,7 +75,7 @@
<mx:Label id="customPollsLabel" text="Create a custom poll" styleName="presentationNamesLabelStyle"/>
</mx:HBox>
<mx:HBox width="100%" height="30" horizontalAlign="center">
<mx:Button label="Create Custom Poll" height="25"/>
<mx:Button label="Create Custom Poll" height="25" click="createPoll()"/>
</mx:HBox>
<mx:Spacer height="3"/>
</mx:VBox>