- implement create new poll window UI

This commit is contained in:
Richard Alam 2013-06-26 21:39:03 +00:00
parent e387bbf122
commit 643952a108
2 changed files with 66 additions and 44 deletions

View File

@ -55,7 +55,8 @@ package org.bigbluebutton.modules.polling.managers
private var pollingWindow:PollingViewWindow; private var pollingWindow:PollingViewWindow;
private var statsWindow:PollingStatsWindow; private var statsWindow:PollingStatsWindow;
private var instructionsWindow:PollMainWindow; //private var instructionsWindow:PollMainWindow;
private var instructionsWindow:CreatePollWindow;
private var testCreateWindow:PollCreateWindow; private var testCreateWindow:PollCreateWindow;
private var service:PollingService; private var service:PollingService;
private var isViewing:Boolean = false; private var isViewing:Boolean = false;
@ -77,7 +78,8 @@ package org.bigbluebutton.modules.polling.managers
} }
public function handleOpenPollingInstructionsWindow(e:PollingInstructionsWindowEvent):void{ public function handleOpenPollingInstructionsWindow(e:PollingInstructionsWindowEvent):void{
instructionsWindow = new PollMainWindow(); //instructionsWindow = new PollMainWindow();
instructionsWindow = new CreatePollWindow();
testCreateWindow = new PollCreateWindow(); testCreateWindow = new PollCreateWindow();
// Use the PollGetTitlesEvent to fetch a list of already-used titles // Use the PollGetTitlesEvent to fetch a list of already-used titles
@ -95,7 +97,9 @@ package org.bigbluebutton.modules.polling.managers
} }
public function handleOpenPollingInstructionsWindowWithExistingPoll(e:OpenSavedPollEvent):void{ public function handleOpenPollingInstructionsWindowWithExistingPoll(e:OpenSavedPollEvent):void{
instructionsWindow = new PollMainWindow(); //instructionsWindow = new PollMainWindow();
instructionsWindow = new CreatePollWindow();
// Use the PollGetTitlesEvent to fetch a list of already-used titles // Use the PollGetTitlesEvent to fetch a list of already-used titles
var getTitlesEvent:PollGetTitlesEvent = new PollGetTitlesEvent(PollGetTitlesEvent.CHECK); var getTitlesEvent:PollGetTitlesEvent = new PollGetTitlesEvent(PollGetTitlesEvent.CHECK);
globalDispatcher.dispatchEvent(getTitlesEvent); globalDispatcher.dispatchEvent(getTitlesEvent);

View File

@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" borderStyle="none" horizontalAlign="center"
headerHeight="0" borderThicknessBottom="0" borderThicknessLeft="0"
borderThicknessRight="0" borderThicknessTop="0">
<mx:Script> <mx:Script>
<![CDATA[ <![CDATA[
import org.bigbluebutton.modules.polling.events.CreatePollEvent; import org.bigbluebutton.modules.polling.events.CreatePollEvent;
@ -60,47 +62,63 @@
]]> ]]>
</mx:Script> </mx:Script>
<mx:HBox width="100%" height="25" horizontalAlign="left">
<mx:Spacer width="3"/>
<mx:Label text="Create New Poll" styleName="micSettingsWindowTitleStyle"/>
</mx:HBox>
<mx:VBox width="100%" height="100%"> <mx:VBox width="90%" height="90%" horizontalAlign="center" borderStyle="solid" borderThickness="1">
<mx:VBox width="100%" height="90%" focusEnabled="true">
<mx:Form width="100%" id="instructionsForm" paddingTop="30" paddingBottom="10" paddingLeft="30" focusEnabled="true">
<mx:FormItem fontWeight="bold" paddingLeft="35" id="titleFormItem" focusEnabled="true"
label="{ResourceUtil.getInstance().getString('bbb.polling.createPoll.title')}" >
<mx:TextInput id="pollTitle" focusEnabled="true" tabIndex="{baseIndex+4}" maxChars="75"
accessibilityDescription="{ResourceUtil.getInstance().getString('bbb.polling.createPoll.title')}"/>
</mx:FormItem>
<mx:FormItem fontWeight="bold" <mx:HBox width="100%" height="20" horizontalAlign="left">
label="{ResourceUtil.getInstance().getString('bbb.polling.createPoll.question')}" <mx:Spacer width="3"/>
paddingLeft="35" <mx:Label id="titleLabel" text="Title" styleName="presentationNamesLabelStyle"/>
paddingTop="20" > </mx:HBox>
<mx:TextArea id="pollQuestion" maxChars="200" <mx:Spacer height="5"/>
width="200" height="100" <mx:HBox width="96%" height="25">
accessibilityDescription="{ResourceUtil.getInstance().getString('bbb.polling.createPoll.question')}" <mx:Spacer width="10"/>
tabIndex="{baseIndex+4}"/> <mx:TextInput id="pollTitle" width="100%" text="Type in your title" editable="true" maxChars="250"/>
</mx:FormItem> </mx:HBox>
<mx:Spacer height="3"/>
<mx:FormItem fontWeight="bold" paddingLeft="35" paddingTop="30" <mx:HBox width="100%" height="20" horizontalAlign="left">
label="{ResourceUtil.getInstance().getString('bbb.polling.createPoll.answers')}" > <mx:Spacer width="3"/>
<mx:Label id="answerHint" visible="true" width="100%" fontSize="9" fontWeight="normal" <mx:Label id="questionLabel" text="Question" styleName="presentationNamesLabelStyle"/>
text="{ResourceUtil.getInstance().getString('bbb.polling.createPoll.hint')}" /> </mx:HBox>
<mx:TextArea id="pollAnswers" width="200" height="100" tabIndex="{baseIndex+4}" <mx:Spacer height="5"/>
accessibilityDescription="{ResourceUtil.getInstance().getString('bbb.polling.createPoll.answers')}"/> <mx:HBox width="96%" height="75">
</mx:FormItem> <mx:Spacer width="10"/>
<mx:TextArea id="pollQuestion" width="100%" height="100%" wordWrap="true" text="Type in your questions" editable="true" maxChars="1000"/>
</mx:HBox>
<mx:Spacer height="3"/>
<mx:FormItem paddingLeft="10" paddingTop="5" > <mx:HBox width="100%" height="20" horizontalAlign="left">
<mx:CheckBox id="multiple_response" <mx:Spacer width="3"/>
label="{ResourceUtil.getInstance().getString('bbb.polling.createPoll.moreThanOneResponse')}" <mx:Label id="answersLabel" text="Answers" styleName="presentationNamesLabelStyle"/>
tabIndex="{baseIndex+4}"/> </mx:HBox>
</mx:FormItem> <mx:HBox width="100%" height="20" horizontalAlign="left">
</mx:Form> <mx:Spacer width="10"/>
</mx:VBox> <mx:Label id="hintAnswersLabel" text="Start every answer with a new line" fontSize="12" styleName="presentationNamesLabelStyle"/>
</mx:HBox>
<mx:Spacer height="5"/>
<mx:HBox width="96%" height="150">
<mx:Spacer width="10"/>
<mx:TextArea id="pollAnswers" width="100%" height="100%" wordWrap="true" text="Answers" maxChars="2000"/>
</mx:HBox>
<mx:Spacer height="3"/>
<mx:CheckBox id="multiple_response"
label="{ResourceUtil.getInstance().getString('bbb.polling.createPoll.moreThanOneResponse')}"
tabIndex="{baseIndex+4}"/>
<mx:Spacer height="5"/>
<mx:ControlBar>
<mx:Button id="createBtn" click="" width="100" height="30" tabIndex="{baseIndex+5}"
label="Create" />
<mx:Button id="Cancel" click="" width="100" height="30" tabIndex="{baseIndex+5}"
label="{ResourceUtil.getInstance().getString('bbb.polling.pollPreview.cancel')}" />
</mx:ControlBar>
</mx:VBox> </mx:VBox>
<mx:HBox width="100%" height="35" horizontalAlign="right">
<mx:Button label="Create" styleName="presentationUploadShowButtonStyle"/>
<mx:Spacer width="5"/>
<mx:Button label="Cancel" styleName="presentationUploadShowButtonStyle"/>
<mx:Spacer width="5"/>
</mx:HBox>
<mx:Spacer height="5"/>
</mx:Panel> </mx:Panel>