diff --git a/bigbluebutton-client/branding/default/style/css/V2Theme.css b/bigbluebutton-client/branding/default/style/css/V2Theme.css index fadbcc7c5c77eb6b6ffd8fe1e3a74ec8d578367e..56925f8e1786be854c061c86ce7fda960b510645 100755 --- a/bigbluebutton-client/branding/default/style/css/V2Theme.css +++ b/bigbluebutton-client/branding/default/style/css/V2Theme.css @@ -885,6 +885,7 @@ layout|LoadButton { views|LogoutWindow, views|LoggedOutWindow { headerHeight : 32; + horizontalAlign : center; paddingBottom : 8; paddingLeft : 8; paddingRight : 8; @@ -901,6 +902,58 @@ views|LogoutWindow, views|LoggedOutWindow { paddingBottom : 8; } +.logoutRatingBox { + paddingTop : 12; + paddingBottom : 12; + horizontalAlign : center; + verticalGap : 8; +} + +.logoutTitle { + fontSize : 24; +} + +.logoutSubTitle { + fontSize : 16; + color : #4E5A66; +} + +.loggedOutContainer { + horizontalAlign : center; + verticalGap : 4; +} + +.logoutFeedbackHintBoxStyle { + backgroundColor : #CDD4DB; + paddingLeft : 0; + paddingRight : 0; + verticalGap : 0; +} + +views|StarRating { + paddingTop : 4; + paddingBottom : 4; + verticalGap : 8; + horizontalGap : 0; + emptyStar : Embed(source="assets/swf/v2_skin.swf", symbol="Icon_Star_Empty"); + filledStar : Embed(source="assets/swf/v2_skin.swf", symbol="Icon_Star_Filled"); +} + +.starBoxStyle { + horizontalAlign : center; + verticalGap : 4; + paddingLeft : 0; + paddingRight : 0; + paddingTop : 4; + paddingBottom : 4; + +} + +.logoutRule { + strokeWidth : 1; + color : #BBBDBF; +} + /* //------------------------------ // Lock Settings @@ -1329,7 +1382,7 @@ mx|Panel { paddingRight : 10; } -.presentationUploadFileFormatHintTextStyle, .audioBroswerHintTextStyle { +.presentationUploadFileFormatHintTextStyle, .audioBroswerHintTextStyle, .logoutFeedbackHint { fontWeight : bold; } @@ -1739,7 +1792,6 @@ videoconf|UserGraphicHolder { .userGraphicBackground { backgroundColor : #FFFFFF; - borderStyle : solid; borderColor : #000000; borderThickness : 0; } diff --git a/bigbluebutton-client/branding/default/style/css/assets/swf/v2_skin.fla b/bigbluebutton-client/branding/default/style/css/assets/swf/v2_skin.fla index 1459fd1e63cfab534cfd2b55158033d256fde30c..a1cb5348e425f63b7c2a74c03d691eab535632bd 100644 Binary files a/bigbluebutton-client/branding/default/style/css/assets/swf/v2_skin.fla and b/bigbluebutton-client/branding/default/style/css/assets/swf/v2_skin.fla differ diff --git a/bigbluebutton-client/branding/default/style/css/assets/swf/v2_skin.swf b/bigbluebutton-client/branding/default/style/css/assets/swf/v2_skin.swf index 8f58cde856c5f2c40b946bd3f7076602a950d53b..20753bf1c5a36bfd8b76a3225bd6a12db7183be4 100644 Binary files a/bigbluebutton-client/branding/default/style/css/assets/swf/v2_skin.swf and b/bigbluebutton-client/branding/default/style/css/assets/swf/v2_skin.swf differ diff --git a/bigbluebutton-client/locale/en_US/bbbResources.properties b/bigbluebutton-client/locale/en_US/bbbResources.properties index cfe4a9a17260cd067af93e04fc2a5bcf3a971d9d..40331c5d15869bca5b6f83e1441646de4a0cbd4d 100755 --- a/bigbluebutton-client/locale/en_US/bbbResources.properties +++ b/bigbluebutton-client/locale/en_US/bbbResources.properties @@ -501,7 +501,6 @@ bbb.highlighter.toolbar.color.accessibilityName = Whiteboard mark draw color bbb.highlighter.toolbar.thickness = Change Thickness bbb.highlighter.toolbar.thickness.accessibilityName = Whiteboard draw thickness bbb.highlighter.toolbar.multiuser = Multi-user Drawing -bbb.logout.title = Logged Out bbb.logout.button.label = OK bbb.logout.appshutdown = The server app has been shut down bbb.logout.asyncerror = An Async Error occured @@ -516,6 +515,8 @@ bbb.logour.breakoutRoomClose = Your browser window will be closed bbb.logout.ejectedFromMeeting = You have been removed from the meeting. bbb.logout.refresh.message = If this logout was unexpected click the button below to reconnect. bbb.logout.refresh.label = Reconnect +bbb.logout.feedback.hint = How can we make it better? +bbb.logout.feedback.label = We'd love to hear about your experience (optional) bbb.settings.title = Settings bbb.settings.ok = OK bbb.settings.cancel = Cancel diff --git a/bigbluebutton-client/resources/config.xml.template b/bigbluebutton-client/resources/config.xml.template index d9b3d99a38f6ff24cc2b828df14530e64ed05ac3..7be9c348757467430ed9bfb942dc2ed8d85c8d90 100755 --- a/bigbluebutton-client/resources/config.xml.template +++ b/bigbluebutton-client/resources/config.xml.template @@ -15,7 +15,8 @@ <layout showLogButton="false" defaultLayout="bbb.layout.name.defaultlayout" showToolbar="true" showFooter="true" showMeetingName="true" showHelpButton="true" showLogoutWindow="true" showLayoutTools="true" confirmLogout="true" showNetworkMonitor="false" - showRecordingNotification="true" logoutOnStopRecording="false"/> + showRecordingNotification="true" logoutOnStopRecording="false" + askForFeedbackOnLogout="false"/> <breakoutRooms enabled="true" record="false" privateChateEnabled="true"/> <logging enabled="true" logTarget="trace" level="info" format="{dateUTC} {time} :: {name} :: [{logLevel}] {message}" uri="http://HOST/log" logPattern=".*"/> <lock disableCam="false" disableMic="false" disablePrivateChat="false" diff --git a/bigbluebutton-client/src/org/bigbluebutton/core/PopUpUtil.as b/bigbluebutton-client/src/org/bigbluebutton/core/PopUpUtil.as index a0285e0084a930b66c693bc68b1ae5668a41ba84..0aabefb112746b9797b3885ce482b7cddffd3d7d 100644 --- a/bigbluebutton-client/src/org/bigbluebutton/core/PopUpUtil.as +++ b/bigbluebutton-client/src/org/bigbluebutton/core/PopUpUtil.as @@ -103,7 +103,7 @@ package org.bigbluebutton.core { private static function addPopUpToStage(parent:DisplayObject, className:Class, modal:Boolean = false, center:Boolean = true):IFlexDisplayObject { var popUp:IFlexDisplayObject = PopUpManager.createPopUp(parent, className, modal); if (center) { - PopUpManager.centerPopUp(popUp) + PopUpManager.centerPopUp(popUp); } popUpDict[getQualifiedClassName(className)] = popUp; diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/model/options/LayoutOptions.as b/bigbluebutton-client/src/org/bigbluebutton/main/model/options/LayoutOptions.as index 858976ec3dda6ec16c25b2f8e51eb8de1aff09a7..4393f8fa313e68a26428e773915f60d8cd0e05cc 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/main/model/options/LayoutOptions.as +++ b/bigbluebutton-client/src/org/bigbluebutton/main/model/options/LayoutOptions.as @@ -54,6 +54,9 @@ package org.bigbluebutton.main.model.options { [Bindable] public var showNetworkMonitor:Boolean = false; + [Bindable] + public var askForFeedbackOnLogout:Boolean = false; + public var defaultLayout:String = "Default"; public function LayoutOptions() { diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/LoggedOutWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/views/LoggedOutWindow.mxml index 82d3ae20890b63350c07da17290c672329793505..411da10098ac0e7990dde4e8781a9e6b00dc3271 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/main/views/LoggedOutWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/main/views/LoggedOutWindow.mxml @@ -20,27 +20,40 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. --> -<mx:TitleWindow xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:fx="http://ns.adobe.com/mxml/2009" - title="{ResourceUtil.getInstance().getString('bbb.logout.title')}" showCloseButton="false" creationComplete="init()" - verticalScrollPolicy="off" horizontalScrollPolicy="off" - x="168" y="86" layout="vertical" width="400" horizontalAlign="center"> +<mx:TitleWindow xmlns:mx="library://ns.adobe.com/flex/mx" + xmlns:fx="http://ns.adobe.com/mxml/2009" + xmlns:views="org.bigbluebutton.main.views.*" + showCloseButton="false" + creationComplete="init()" + resize="resizeHandler(event)" + verticalScrollPolicy="off" + horizontalScrollPolicy="off" + layout="vertical" + y="86" + width.logout="400" + width.feedback="600"> <fx:Script> <![CDATA[ import com.asfusion.mate.events.Dispatcher; - + import flash.net.URLLoader; import flash.net.URLRequest; import flash.net.URLRequestMethod; - + + import mx.events.ResizeEvent; + import mx.managers.PopUpManager; + import org.as3commons.logging.api.ILogger; import org.as3commons.logging.api.getClassLogger; import org.bigbluebutton.core.BBB; + import org.bigbluebutton.core.Options; import org.bigbluebutton.core.PopUpUtil; import org.bigbluebutton.core.UsersUtil; import org.bigbluebutton.main.events.ExitApplicationEvent; + import org.bigbluebutton.main.model.options.LayoutOptions; import org.bigbluebutton.main.model.users.events.ConnectionFailedEvent; import org.bigbluebutton.util.i18n.ResourceUtil; - + private static const LOGGER:ILogger = getClassLogger(LoggedOutWindow); [Bindable] @@ -53,6 +66,16 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. } private function callSignOut():void { + if (currentState == "feedback" && starRating.rating > 0) { + var logData:Object = new Object(); + logData.username = UsersUtil.getMyUsername(); + logData.userId = UsersUtil.getMyUserID(); + logData.meetingId = UsersUtil.getInternalMeetingID(); + logData.rating = starRating.rating; + logData.comment = feedbackMsg.text; + LOGGER.info(JSON.stringify(logData)); + } + var logoutURL:String = BBB.getSignoutURL(); var request:URLRequest = new URLRequest(logoutURL); LOGGER.debug("Log out url: " + logoutURL); @@ -95,6 +118,11 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. logData.reason = reason; LOGGER.info(JSON.stringify(logData)); + var layoutOptions:LayoutOptions = Options.getOptions(LayoutOptions) as LayoutOptions; + if (layoutOptions.askForFeedbackOnLogout) { + currentState = "feedback"; + } + switch (reason) { case ConnectionFailedEvent.APP_SHUTDOWN: message = ResourceUtil.getInstance().getString('bbb.logout.appshutdown'); @@ -128,10 +156,56 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. message += "\n" + ResourceUtil.getInstance().getString('bbb.logour.breakoutRoomClose'); } } + + protected function resizeHandler(event:ResizeEvent):void { + PopUpManager.centerPopUp(this); + } ]]> </fx:Script> - <mx:VBox width="100%" height="100%" horizontalAlign="center"> - <mx:Text text="{message}" textAlign="center"/> - <mx:Button id="okBtn" styleName="mainActionButton" label="{ResourceUtil.getInstance().getString('bbb.logout.button.label')}" click="callSignOut()"/> + + <mx:states> + <mx:State name="logout" /> + <mx:State name="feedback" /> + </mx:states> + <mx:VBox width="100%" + height="100%" + styleName="loggedOutContainer" + horizontalAlign="center"> + <mx:Text text="{message}" + styleName.logout="logoutTitleWindowStyle" + styleName.feedback="logoutTitle" /> + <mx:VBox id="titleBox" + includeIn="feedback" + styleName="logoutRatingBox"> + <mx:HRule width="550" + height="30" + styleName="logoutRule" /> + <mx:Label text="{ResourceUtil.getInstance().getString('bbb.logout.feedback.label')}" + styleName="logoutSubTitle" /> + <views:StarRating id="starRating" /> + <mx:VBox width="350" + verticalAlign="middle" + horizontalAlign="center" + visible="{starRating.rating > 0}" + includeInLayout="{starRating.rating > 0}" + styleName="logoutFeedbackHintBoxStyle"> + <mx:Text width="100%" + textAlign="center" + selectable="false" + text="{ResourceUtil.getInstance().getString('bbb.logout.feedback.hint')}" + styleName="logoutFeedbackHint" /> + <mx:TextArea id="feedbackMsg" + maxChars="512" + width="100%" + height="90" /> + </mx:VBox> + <mx:HRule width="550" + height="30" + styleName="logoutRule" /> + </mx:VBox> + <mx:Button id="okBtn" + styleName="mainActionButton" + label="{ResourceUtil.getInstance().getString('bbb.logout.button.label')}" + click="callSignOut()" /> </mx:VBox> -</mx:TitleWindow> +</mx:TitleWindow> diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/LogoutWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/views/LogoutWindow.mxml index 8a86e4a2de30ed45db304fab9e4bd9968d1acaf5..e0086ceef3bed9b7a295bcc11c4b6ffa33e215c0 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/main/views/LogoutWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/main/views/LogoutWindow.mxml @@ -25,7 +25,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. implements="org.bigbluebutton.common.IKeyboardClose" verticalScrollPolicy="off" horizontalScrollPolicy="off" - horizontalAlign="center" showCloseButton="false" creationComplete="onCreationComplete()" minWidth="350" diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/StarRating.as b/bigbluebutton-client/src/org/bigbluebutton/main/views/StarRating.as new file mode 100644 index 0000000000000000000000000000000000000000..eb55174fb4f517dce47de84f85f8fc0f1455513a --- /dev/null +++ b/bigbluebutton-client/src/org/bigbluebutton/main/views/StarRating.as @@ -0,0 +1,85 @@ +/** + * BigBlueButton open source conferencing system - http://www.bigbluebutton.org/ + * + * Copyright (c) 2018 BigBlueButton Inc. and by respective authors (see below). + * + * This program is free software; you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation; either version 3.0 of the License, or (at your option) any later + * version. + * + * BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along + * with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. + * + */ +package org.bigbluebutton.main.views { + import flash.events.MouseEvent; + + import mx.containers.HBox; + import mx.containers.VBox; + import mx.controls.Image; + import mx.core.UIComponent; + + import org.as3commons.lang.StringUtils; + + public class StarRating extends HBox { + + [Bindable] + public var rating:int = 0; + + private function setRating(value:int):void { + rating = value; + } + + override protected function createChildren():void { + super.createChildren(); + + for (var i:int = 1; i <= 5; i++) { + addStar(i); + } + } + + private function addStar(index:int):void { + var starBox:VBox = new VBox(); + starBox.id = "starBox" + index; + starBox.styleName = "starBoxStyle"; + starBox.width = 50; + starBox.addEventListener(MouseEvent.MOUSE_OVER, starBoxMouseOverHandler); + starBox.addEventListener(MouseEvent.MOUSE_OUT, starBoxMouseOutHandler); + starBox.addEventListener(MouseEvent.CLICK, starBoxClickHandler); + var starImage:Image = new Image(); + starImage.source = getStyle('emptyStar'); + starBox.addChild(starImage); + this.addChild(starBox); + } + + private function starBoxMouseOverHandler(event:MouseEvent):void { + fillStars(getCurrentBoxIndex(event.currentTarget as UIComponent)); + } + + private function starBoxMouseOutHandler(event:MouseEvent):void { + fillStars(rating); + } + + private function fillStars(max:int):void { + for (var i:int = 1; i <= max; i++) { + Image(VBox(getChildAt(i - 1)).getChildAt(0)).source = getStyle('filledStar'); + } + for (var j:int = max + 1; j <= numChildren; j++) { + Image(VBox(getChildAt(j - 1)).getChildAt(0)).source = getStyle('emptyStar'); + } + } + + private function starBoxClickHandler(event:MouseEvent):void { + setRating(getCurrentBoxIndex(event.currentTarget as UIComponent)); + } + + private function getCurrentBoxIndex(component:UIComponent):int { + return parseInt(StringUtils.remove(component.id, "starBox")); + } + } +}