diff --git a/bigbluebutton-client/branding/default/style/css/BBBDefault.css b/bigbluebutton-client/branding/default/style/css/BBBDefault.css index 0e14a9de0c..bbdea780ec 100755 --- a/bigbluebutton-client/branding/default/style/css/BBBDefault.css +++ b/bigbluebutton-client/branding/default/style/css/BBBDefault.css @@ -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'); } diff --git a/bigbluebutton-client/branding/default/style/css/assets/images/poll_icon.png b/bigbluebutton-client/branding/default/style/css/assets/images/poll_icon.png new file mode 100755 index 0000000000..1747b00c17 Binary files /dev/null and b/bigbluebutton-client/branding/default/style/css/assets/images/poll_icon.png differ diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/PollResultsView.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/PollResultsView.as index 6678434fbf..985bb998ce 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/PollResultsView.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/PollResultsView.as @@ -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) { diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/PresentationWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/PresentationWindow.mxml index 1207f993e8..1d804ec079 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/PresentationWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/PresentationWindow.mxml @@ -64,41 +64,46 @@ with BigBlueButton; if not, see . . 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 . } 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 . 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 . 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; + } ]]> @@ -605,31 +660,34 @@ with BigBlueButton; if not, see . + click="onUploadButtonClicked()" tabIndex="{baseIndex+5}"/> + + tabIndex="{baseIndex+7}"/> + tabIndex="{baseIndex+8}"/> + tabIndex="{baseIndex+9}"/> + tabIndex="{baseIndex+10}" accessibilityName="{ResourceUtil.getInstance().getString('bbb.presentation.slider')}"/> + tabIndex="{baseIndex+11}"/> + tabIndex="{baseIndex+12}"/>