Merge pull request #666 from capilkey/poll-client
Poll start button and start of publish poll
This commit is contained in:
commit
5d50d5bc2d
@ -284,7 +284,7 @@ DataGrid {
|
||||
}
|
||||
|
||||
|
||||
.presentationUploadButtonStyle, .presentationBackButtonStyle, .presentationBackButtonDisabledStyle, .presentationForwardButtonStyle, .presentationForwardButtonDisabledStyle,
|
||||
.presentationUploadButtonStyle, pollStartButtonStyle, .presentationBackButtonStyle, .presentationBackButtonDisabledStyle, .presentationForwardButtonStyle, .presentationForwardButtonDisabledStyle,
|
||||
.presentationFitToWidthButtonStyle, .presentationFitToPageButtonStyle
|
||||
{
|
||||
textIndent: 0;
|
||||
@ -308,6 +308,10 @@ DataGrid {
|
||||
icon: Embed('assets/images/upload.png');
|
||||
}
|
||||
|
||||
pollStartButtonStyle {
|
||||
icon: Embed('assets/images/poll_icon.png');
|
||||
}
|
||||
|
||||
.presentationBackButtonStyle {
|
||||
icon: Embed('assets/images/left-arrow.png');
|
||||
}
|
||||
|
BIN
bigbluebutton-client/branding/default/style/css/assets/images/poll_icon.png
Executable file
BIN
bigbluebutton-client/branding/default/style/css/assets/images/poll_icon.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 747 B |
@ -20,15 +20,15 @@
|
||||
package org.bigbluebutton.modules.present.ui.views
|
||||
{
|
||||
import flash.events.MouseEvent;
|
||||
import flash.geom.Point;
|
||||
import flash.geom.Rectangle;
|
||||
|
||||
import mx.binding.utils.BindingUtils;
|
||||
import mx.containers.HBox;
|
||||
import mx.containers.VBox;
|
||||
import mx.controls.Button;
|
||||
import mx.events.MoveEvent;
|
||||
import mx.events.ResizeEvent;
|
||||
import mx.utils.object_proxy;
|
||||
|
||||
import org.bigbluebutton.common.model.FocusableImage;
|
||||
import org.bigbluebutton.modules.whiteboard.views.WhiteboardCanvas;
|
||||
|
||||
public class PollResultsView extends VBox {
|
||||
private var _pollGraphic:ResizablePollGraphic;
|
||||
@ -87,7 +87,19 @@ package org.bigbluebutton.modules.present.ui.views
|
||||
}
|
||||
|
||||
private function handlePublishClick(e:MouseEvent):void {
|
||||
|
||||
var slide:FocusableImage = SlideView(parent).slideLoader;
|
||||
var x1:int, y1:int, x2:int, y2:int, nx1:Number, ny1:Number, nx2:Number, ny2:Number;
|
||||
var slideXY:Point = slide.globalToLocal(localToGlobal(new Point(_pollGraphic.x, _pollGraphic.y)));
|
||||
x1 = slideXY.x;
|
||||
y1 = slideXY.y;
|
||||
x2 = slideXY.x+_pollGraphic.width;
|
||||
y2 = slideXY.y+_pollGraphic.height;
|
||||
nx1 = (x1*100.0)/slide.width;
|
||||
ny1 = (y1*100.0)/slide.height;
|
||||
nx2 = (x2*100.0)/slide.width;
|
||||
ny2 = (y2*100.0)/slide.height;
|
||||
trace("x1 " + x1 + " y1 " + y1 + " x2 " + x2 + " y2 " + y2);
|
||||
trace("nx1 " + nx1 + " ny1 " + ny1 + " nx2 " + nx2 + " ny2 " + ny2);
|
||||
}
|
||||
|
||||
private function handleCloseClick(e:MouseEvent):void {
|
||||
@ -109,7 +121,7 @@ package org.bigbluebutton.modules.present.ui.views
|
||||
}
|
||||
|
||||
private function mouseMoveHandler(e:MouseEvent):void {
|
||||
trace("mouseMoveHandler " + this.y);
|
||||
//trace("mouseMoveHandler " + this.y);
|
||||
e.updateAfterEvent();
|
||||
|
||||
if (this.y < 0) {
|
||||
|
@ -64,41 +64,46 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
<mx:Script>
|
||||
<![CDATA[
|
||||
import flash.geom.Point;
|
||||
import flexlib.containers.DockableToolBar;
|
||||
import flexlib.mdi.events.MDIWindowEvent;
|
||||
import mx.binding.utils.BindingUtils;
|
||||
import mx.collections.ArrayCollection;
|
||||
import mx.containers.TitleWindow;
|
||||
import mx.core.Application;
|
||||
import mx.effects.Move;
|
||||
import mx.events.ResizeEvent;
|
||||
import mx.managers.PopUpManager;
|
||||
import mx.rpc.events.*;
|
||||
import org.bigbluebutton.common.IBbbCanvas;
|
||||
import org.bigbluebutton.common.Images;
|
||||
import org.bigbluebutton.common.LogUtil;
|
||||
import org.bigbluebutton.common.events.LocaleChangeEvent;
|
||||
import org.bigbluebutton.core.UsersUtil;
|
||||
import org.bigbluebutton.main.events.MadePresenterEvent;
|
||||
import org.bigbluebutton.main.events.ShortcutEvent;
|
||||
import org.bigbluebutton.main.views.MainCanvas;
|
||||
import org.bigbluebutton.modules.present.commands.GoToNextPageCommand;
|
||||
import org.bigbluebutton.modules.present.commands.GoToPrevPageCommand;
|
||||
import org.bigbluebutton.modules.present.events.AddOverlayCanvasEvent;
|
||||
import org.bigbluebutton.modules.present.events.DisplaySlideEvent;
|
||||
import org.bigbluebutton.modules.present.events.NavigationEvent;
|
||||
import org.bigbluebutton.modules.present.events.PresentationChangedEvent;
|
||||
import org.bigbluebutton.modules.present.events.PresentationEvent;
|
||||
import org.bigbluebutton.modules.present.events.PresenterCommands;
|
||||
import org.bigbluebutton.modules.present.events.UploadEvent;
|
||||
import org.bigbluebutton.modules.present.events.WindowResizedEvent;
|
||||
import org.bigbluebutton.modules.present.managers.Slide;
|
||||
import org.bigbluebutton.modules.present.model.Page;
|
||||
import org.bigbluebutton.modules.present.model.PresentationModel;
|
||||
import org.bigbluebutton.modules.present.ui.views.PresentOptions;
|
||||
import org.bigbluebutton.modules.whiteboard.events.WhiteboardButtonEvent;
|
||||
import org.bigbluebutton.util.i18n.ResourceUtil;
|
||||
import flash.geom.Point;
|
||||
|
||||
import flexlib.containers.DockableToolBar;
|
||||
import flexlib.mdi.events.MDIWindowEvent;
|
||||
|
||||
import mx.binding.utils.BindingUtils;
|
||||
import mx.collections.ArrayCollection;
|
||||
import mx.containers.TitleWindow;
|
||||
import mx.controls.Menu;
|
||||
import mx.core.Application;
|
||||
import mx.effects.Move;
|
||||
import mx.events.MenuEvent;
|
||||
import mx.events.ResizeEvent;
|
||||
import mx.managers.PopUpManager;
|
||||
import mx.rpc.events.*;
|
||||
|
||||
import org.bigbluebutton.common.IBbbCanvas;
|
||||
import org.bigbluebutton.common.Images;
|
||||
import org.bigbluebutton.common.LogUtil;
|
||||
import org.bigbluebutton.common.events.LocaleChangeEvent;
|
||||
import org.bigbluebutton.core.UsersUtil;
|
||||
import org.bigbluebutton.main.events.MadePresenterEvent;
|
||||
import org.bigbluebutton.main.events.ShortcutEvent;
|
||||
import org.bigbluebutton.main.views.MainCanvas;
|
||||
import org.bigbluebutton.modules.present.commands.GoToNextPageCommand;
|
||||
import org.bigbluebutton.modules.present.commands.GoToPrevPageCommand;
|
||||
import org.bigbluebutton.modules.present.events.AddOverlayCanvasEvent;
|
||||
import org.bigbluebutton.modules.present.events.DisplaySlideEvent;
|
||||
import org.bigbluebutton.modules.present.events.NavigationEvent;
|
||||
import org.bigbluebutton.modules.present.events.PresentationChangedEvent;
|
||||
import org.bigbluebutton.modules.present.events.PresentationEvent;
|
||||
import org.bigbluebutton.modules.present.events.PresenterCommands;
|
||||
import org.bigbluebutton.modules.present.events.UploadEvent;
|
||||
import org.bigbluebutton.modules.present.events.WindowResizedEvent;
|
||||
import org.bigbluebutton.modules.present.managers.Slide;
|
||||
import org.bigbluebutton.modules.present.model.Page;
|
||||
import org.bigbluebutton.modules.present.model.PresentationModel;
|
||||
import org.bigbluebutton.modules.present.ui.views.PresentOptions;
|
||||
import org.bigbluebutton.modules.whiteboard.events.WhiteboardButtonEvent;
|
||||
import org.bigbluebutton.util.i18n.ResourceUtil;
|
||||
|
||||
private static const LOG:String = "Present::PresentationWindow - ";
|
||||
|
||||
@ -136,6 +141,9 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
private var keyCombos:Object;
|
||||
private var localDispatcher:Dispatcher = new Dispatcher();
|
||||
|
||||
private var pollMenuData:Array;
|
||||
private var pollMenu:Menu;
|
||||
|
||||
private function init():void{
|
||||
presentOptions = new PresentOptions();
|
||||
baseIndex = presentOptions.baseTabIndex;;
|
||||
@ -167,6 +175,15 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
} else {
|
||||
becomeViewer();
|
||||
}
|
||||
|
||||
pollMenuData = [];
|
||||
pollMenuData.push({label: "Yes/No"});
|
||||
pollMenuData.push({label: "True/False"});
|
||||
pollMenuData.push({label: "A/B"});
|
||||
pollMenuData.push({label: "A/B/C"});
|
||||
pollMenuData.push({label: "A/B/C/D"});
|
||||
pollMenuData.push({label: "A/B/C/D/E"});
|
||||
pollMenuData.push({label: "A/B/C/D/E/F"});
|
||||
}
|
||||
|
||||
private function addWhiteboardToolbar(event:TimerEvent):void {
|
||||
@ -380,6 +397,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
private function displaySlideNavigationControls(isPresenter:Boolean, activePresentation:Boolean):void {
|
||||
var showButtons:Boolean = isPresenter && activePresentation;
|
||||
|
||||
pollStartBtn.visible = showButtons;
|
||||
backButton.visible = showButtons;
|
||||
forwardButton.visible = showButtons;
|
||||
zoomSlider.visible = showButtons;
|
||||
@ -593,6 +611,43 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
dispatchEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
private function onPollStartButtonClicked():void {
|
||||
openPollTypeMenu();
|
||||
}
|
||||
|
||||
private function openPollTypeMenu():void {
|
||||
// make sure the previous menu is closed before opening a new one
|
||||
// This could be improved to include a flag that tells if the menu is open,
|
||||
// but it would require an extra listener for the MenuCloseEvent.
|
||||
if (pollMenu) {
|
||||
pollMenu.removeEventListener(MenuEvent.ITEM_CLICK, menuClickHandler);
|
||||
pollMenu.removeEventListener(MenuEvent.MENU_SHOW, menuShowHandler);
|
||||
pollMenu.hide();
|
||||
}
|
||||
|
||||
pollMenu = Menu.createMenu(null, pollMenuData, true);
|
||||
pollMenu.addEventListener(MenuEvent.ITEM_CLICK, menuClickHandler);
|
||||
pollMenu.addEventListener(MenuEvent.MENU_SHOW, menuShowHandler);
|
||||
pollMenu.variableRowHeight = false;
|
||||
var pollXY:Point = pollStartBtn.localToGlobal(new Point(pollStartBtn.width + 2, pollStartBtn.height - pollMenu.height));
|
||||
//pollMenu.show(this.x + pollStartBtn.x + pollStartBtn.width + 2, this.y + this.height);
|
||||
pollMenu.show();
|
||||
|
||||
}
|
||||
|
||||
private function menuClickHandler(e:MenuEvent):void {
|
||||
if(pollMenuData[e.index] != undefined) {
|
||||
// start the requested poll
|
||||
}
|
||||
}
|
||||
|
||||
private function menuShowHandler(e:MenuEvent):void {
|
||||
pollMenu.setFocus();
|
||||
var pollXY:Point = pollStartBtn.localToGlobal(new Point(pollStartBtn.width + 2, pollStartBtn.height - pollMenu.height));
|
||||
pollMenu.x = pollXY.x;
|
||||
pollMenu.y = pollXY.y;
|
||||
}
|
||||
|
||||
]]>
|
||||
</mx:Script>
|
||||
@ -605,31 +660,34 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
<mx:ControlBar id="presCtrlBar" name="presCtrlBar" width="100%" height="{CONTROL_BAR_HEIGHT}" styleName="presentationWindowControlsStyle" >
|
||||
<mx:Button id="uploadPres" visible="false" height="30" styleName="presentationUploadButtonStyle"
|
||||
toolTip="{ResourceUtil.getInstance().getString('bbb.presentation.uploadPresBtn.toolTip')}"
|
||||
click="onUploadButtonClicked()" tabIndex="{baseIndex+5}"/>
|
||||
click="onUploadButtonClicked()" tabIndex="{baseIndex+5}"/>
|
||||
<mx:Button id="pollStartBtn" visible="false" height="30" styleName="pollStartButtonStyle"
|
||||
toolTip="Start a poll"
|
||||
click="onPollStartButtonClicked()" tabIndex="{baseIndex+6}"/>
|
||||
<mx:Spacer width="100%" id="spacer1"/>
|
||||
<mx:Button id="backButton" visible="false" width="45" height="30" styleName="presentationBackButtonStyle"
|
||||
toolTip="{ResourceUtil.getInstance().getString('bbb.presentation.backBtn.toolTip')}" click="gotoPreviousSlide()"
|
||||
tabIndex="{baseIndex+6}"/>
|
||||
tabIndex="{baseIndex+7}"/>
|
||||
<mx:Button id="btnSlideNum" visible="false" label="" click="showThumbnails()"
|
||||
toolTip="{ResourceUtil.getInstance().getString('bbb.presentation.btnSlideNum.toolTip')}"
|
||||
tabIndex="{baseIndex+7}"/>
|
||||
tabIndex="{baseIndex+8}"/>
|
||||
<mx:Button id="forwardButton" visible="false" width="45" height="30" styleName="presentationForwardButtonStyle"
|
||||
toolTip="{ResourceUtil.getInstance().getString('bbb.presentation.forwardBtn.toolTip')}" click="gotoNextSlide()"
|
||||
tabIndex="{baseIndex+8}"/>
|
||||
tabIndex="{baseIndex+9}"/>
|
||||
<mx:Spacer width="50%" id="spacer3"/>
|
||||
<mx:HSlider id="zoomSlider" visible="false" value="{slideView.zoomPercentage}" styleName="presentationZoomSliderStyle"
|
||||
minimum="100" maximum="400" dataTipPlacement="top" labels="['100%','400%']"
|
||||
useHandCursor="true" snapInterval="5" allowTrackClick="true" liveDragging="true"
|
||||
dataTipFormatFunction="removeDecimalFromDataTip" change="onSliderZoom()" width="100"
|
||||
tabIndex="{baseIndex+9}" accessibilityName="{ResourceUtil.getInstance().getString('bbb.presentation.slider')}"/>
|
||||
tabIndex="{baseIndex+10}" accessibilityName="{ResourceUtil.getInstance().getString('bbb.presentation.slider')}"/>
|
||||
<mx:Button id="btnFitToWidth" visible="false" width="30" height="30" styleName="presentationFitToWidthButtonStyle"
|
||||
toolTip="{ResourceUtil.getInstance().getString('bbb.presentation.fitToWidth.toolTip')}"
|
||||
click="onFitToPage(false)"
|
||||
tabIndex="{baseIndex+10}"/>
|
||||
tabIndex="{baseIndex+11}"/>
|
||||
<mx:Button id="btnFitToPage" visible="false" width="30" height="30" styleName="presentationFitToPageButtonStyle"
|
||||
toolTip="{ResourceUtil.getInstance().getString('bbb.presentation.fitToPage.toolTip')}"
|
||||
click="onFitToPage(true)"
|
||||
tabIndex="{baseIndex+11}"/>
|
||||
tabIndex="{baseIndex+12}"/>
|
||||
<!-- This spacer is to prevent the whiteboard toolbar from overlapping the fit-ot-page button -->
|
||||
<mx:Spacer width="30" height="30" id="spacer4"/>
|
||||
</mx:ControlBar>
|
||||
|
Loading…
Reference in New Issue
Block a user