Improved emoji feature components.

This commit is contained in:
Ghazi Triki 2015-08-28 19:02:52 +01:00
parent debafd24ca
commit a7d2820c24
13 changed files with 101 additions and 115 deletions

View File

@ -887,6 +887,10 @@ PollChoicesModal {
EmojiGrid {
backgroundColor: #ffffff;
horizontalAlign: center;
}
.emojiGridTile {
paddingBottom: 10;
paddingLeft: 10;
paddingRight: 10;

View File

@ -129,9 +129,8 @@ bbb.users.settings.webcamSettings = Webcam Settings
bbb.users.settings.muteAll = Mute All Users
bbb.users.settings.muteAllExcept = Mute All Users Except Presenter
bbb.users.settings.unmuteAll = Unmute All Users
bbb.users.settings.lowerAllHands = Lower All Hands
bbb.users.raiseHandBtn.toolTip = Raise Hand
bbb.users.raiseHandBtn.toolTip2 = Lower Hand
bbb.users.settings.resetAllStatuses = Resets All Statuses
bbb.users.emojiStatusBtn.toolTip = Update my emoji status
bbb.users.roomMuted.text = Viewers Muted
bbb.users.roomLocked.text = Viewers Locked
bbb.users.pushToTalk.toolTip = Talk
@ -149,10 +148,13 @@ bbb.users.usersGrid.statusItemRenderer.changePresenter = Click To Make Presenter
bbb.users.usersGrid.statusItemRenderer.presenter = Presenter
bbb.users.usersGrid.statusItemRenderer.moderator = Moderator
bbb.users.usersGrid.statusItemRenderer.raiseHand = Hand Raised
bbb.users.usersGrid.statusItemRenderer.happy = Happy
bbb.users.usersGrid.statusItemRenderer.smile = Smiling
bbb.users.usersGrid.statusItemRenderer.unhappy = Unhappy
bbb.users.usersGrid.statusItemRenderer.confused = Confused
bbb.users.usersGrid.statusItemRenderer.viewer = Viewer
bbb.users.usersGrid.statusItemRenderer.streamIcon.toolTip = Sharing webcam.
bbb.users.usersGrid.statusItemRenderer.presIcon.toolTip = Is Presenter.
bbb.users.usersGrid.statusItemRenderer.raiseHand.toolTip = Hand Raised.
bbb.users.usersGrid.mediaItemRenderer = Media
bbb.users.usersGrid.mediaItemRenderer.talking = Talking
bbb.users.usersGrid.mediaItemRenderer.webcam = Sharing Webcam
@ -166,6 +168,12 @@ bbb.users.usersGrid.mediaItemRenderer.webcam = Webcam shared
bbb.users.usersGrid.mediaItemRenderer.micOff = Microphone off
bbb.users.usersGrid.mediaItemRenderer.micOn = Microphone on
bbb.users.usersGrid.mediaItemRenderer.noAudio = Not in audio conference
bbb.users.emojiStatus.remove = Remove
bbb.users.emojiStatus.raiseHand = Raise hand
bbb.users.emojiStatus.happy = Happy
bbb.users.emojiStatus.smile = Smile
bbb.users.emojiStatus.unhappy = Unhappy
bbb.users.emojiStatus.confused = Confused
bbb.presentation.title = Presentation
bbb.presentation.titleWithPres = Presentation: {0}
bbb.presentation.quickLink.label = Presentation Window

View File

@ -142,9 +142,6 @@ package org.bigbluebutton.common
[Embed(source="assets/images/participant-mute.png")]
public var participant_mute:Class;
[Embed(source="assets/images/raisehand.png")]
public var raisehand:Class;
[Embed(source="assets/images/mic_muted.png")]
public var sound_mute:Class;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 241 B

After

Width:  |  Height:  |  Size: 548 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -7,7 +7,7 @@ package org.bigbluebutton.core.model.users
private var _name: String;
private var _externId: String;
private var _role: String;
private var _handRaised: Boolean;
private var _emojiStatus: String;
private var _presenter: Boolean;
private var _hasStream: Boolean;
private var _webcamStream: String;

View File

@ -7,7 +7,7 @@ package org.bigbluebutton.core.model.users
private var _externId: String;
private var _role: String;
private var _presenter: Boolean;
private var _handRaised: Boolean;
private var _emojiStatus: Boolean;
private var _hasStream: Boolean;
private var _webcamStream: Boolean;
private var _voice: VoiceUser;

View File

@ -46,7 +46,7 @@ package org.bigbluebutton.core.services
nu.externId = u.externUserID;
nu.name = u.name;
nu.role = u.role;
nu.handRaised = u.handRaised;
nu.emojiStatus = u.emojiStatus;
nu.presenter = u.presenter;
nu.hasStream = u.hasStream;
nu.webcamStream = u.webcamStream;

View File

@ -6,7 +6,7 @@ package org.bigbluebutton.core.vo
public var externId: String;
public var name: String;
public var role: String;
public var handRaised: Boolean;
public var emojiStatus: String;
public var presenter: Boolean;
public var hasStream: Boolean;
public var webcamStream: String;
@ -20,7 +20,7 @@ package org.bigbluebutton.core.vo
nu.externId = externId;
nu.name = name;
nu.role = role;
nu.handRaised = handRaised;
nu.emojiStatus = emojiStatus;
nu.presenter = presenter;
nu.hasStream = hasStream;
nu.webcamStream = webcamStream;

View File

@ -1,46 +1,43 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 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.model.users.events
{
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 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.model.users.events {
import flash.events.Event;
public class EmojiStatusEvent extends Event
{
public static const EMOJI_STATUS:String="EMOJI_STATUS_EVENT";
public class EmojiStatusEvent extends Event {
public static const EMOJI_STATUS:String = "EMOJI_STATUS_EVENT";
private var _status:String;
private var _userId:String;
public function EmojiStatusEvent(type:String, emoji:String, userId:String="")
{
public function EmojiStatusEvent(type:String, emoji:String, userId:String = "") {
super(type, true, false);
_status=emoji;
_userId=userId;
_status = emoji;
_userId = userId;
}
public function get status():String
{
public function get status():String {
return _status;
}
public function get userId():String
{
public function get userId():String {
return _userId;
}
}

View File

@ -16,101 +16,87 @@
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.modules.users.views
{
package org.bigbluebutton.modules.users.views {
import com.asfusion.mate.events.Dispatcher;
import flash.events.MouseEvent;
import mx.containers.Box;
import mx.containers.Tile;
import mx.containers.VBox;
import mx.controls.Button;
import mx.core.ScrollPolicy;
import mx.events.FlexMouseEvent;
import mx.managers.PopUpManager;
import org.bigbluebutton.common.Images;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.main.model.users.events.EmojiStatusEvent;
public class EmojiGrid extends VBox
{
private const EMOJIS:Array=["raiseHand", "smile", "happy", "unhappy", "confused"];
import org.bigbluebutton.util.i18n.ResourceUtil;
public class EmojiGrid extends VBox {
private const EMOJIS:Array = ["raiseHand", "smile", "happy", "unhappy", "confused"];
private var dispatcher:Dispatcher;
private var images:Images;
public function EmojiGrid()
{
public function EmojiGrid() {
dispatcher = new Dispatcher();
images = new Images();
addEventListener(FlexMouseEvent.MOUSE_DOWN_OUTSIDE, mouseDownOutsideHandler, false, 0, true);
width=140;
maxHeight=80;
this.horizontalScrollPolicy = ScrollPolicy.OFF;
this.verticalScrollPolicy = ScrollPolicy.OFF;
width = 140;
maxHeight = 80;
drawEmoji();
if (UserManager.getInstance().getConference().myEmojiStatus != "none")
{
if (UserManager.getInstance().getConference().myEmojiStatus != "none") {
addRemoveEmoji();
}
}
private function drawEmoji():void
{
var tile : Tile = new Tile();
private function drawEmoji():void {
var tile:Tile = new Tile();
tile.width = 140;
tile.styleName = "emojiGridTile";
for each (var emoji:String in EMOJIS)
{
var button:Button=new Button();
button.id="btn" + emoji;
button.width=24;
button.height=24;
button.toggle=true;
tile.horizontalScrollPolicy = ScrollPolicy.OFF;
this.verticalScrollPolicy = ScrollPolicy.OFF;
for each (var emoji:String in EMOJIS) {
var button:Button = new Button();
button.id = "btn" + emoji;
button.width = 24;
button.height = 24;
button.toggle = true;
button.setStyle("icon", images["emoji_" + emoji]);
button.selected=(UserManager.getInstance().getConference().myEmojiStatus == emoji);
button.enabled=!button.selected;
button.toolTip=emoji;
button.selected = (UserManager.getInstance().getConference().myEmojiStatus == emoji);
button.enabled = !button.selected;
button.toolTip = ResourceUtil.getInstance().getString('bbb.users.emojiStatus.' + emoji);
addEventListener(MouseEvent.CLICK, buttonMouseEventHandler);
tile.addChild(button);
}
this.addChild(tile);
}
private function addRemoveEmoji():void
{
var box : Box = new Box();
box.width = this.width - 20;
var button : Button = new Button();
button.id "btnnone";
private function addRemoveEmoji():void {
var button:Button = new Button();
button.id = "btnnone";
button.label = ResourceUtil.getInstance().getString('bbb.users.emojiStatus.remove');
addEventListener(MouseEvent.CLICK, buttonMouseEventHandler);
box.addChild(button);
addChild(box);
addChild(button);
}
protected function buttonMouseEventHandler(event:MouseEvent):void
{
var emoji:String=String(event.target.id).replace("btn", "");
var e:EmojiStatusEvent=new EmojiStatusEvent(EmojiStatusEvent.EMOJI_STATUS, emoji);
protected function buttonMouseEventHandler(event:MouseEvent):void {
var emoji:String = String(event.target.id).replace("btn", "");
var e:EmojiStatusEvent = new EmojiStatusEvent(EmojiStatusEvent.EMOJI_STATUS, emoji);
dispatcher.dispatchEvent(e);
hide();
}
protected function mouseDownOutsideHandler(event:FlexMouseEvent):void
{
protected function mouseDownOutsideHandler(event:FlexMouseEvent):void {
hide();
}
/**
* Hides the menu
*/
public function hide():void
{
public function hide():void {
PopUpManager.removePopUp(this);
}
}

View File

@ -132,7 +132,7 @@
emojiBtn.enabled = true;
} else if (data.hasEmojiStatus) {
emojiImg.source = images["emoji_" + data.emojiStatus];
emojiImg.toolTip = ResourceUtil.getInstance().getString('bbb.users.usersGrid.statusItemRenderer.handRaised') + " - " + data.emojiStatusTime.hours + ":" + data.emojiStatusTime.minutes + ":" + data.emojiStatusTime.seconds;
emojiImg.toolTip = ResourceUtil.getInstance().getString('bbb.users.usersGrid.statusItemRenderer.' + data.emojiStatus) + " - " + data.emojiStatusTime.hours + ":" + data.emojiStatusTime.minutes + ":" + data.emojiStatusTime.seconds;
emojiImg.visible = true;
emojiBtn.visible = false;
emojiBtn.enabled = false;
@ -160,7 +160,6 @@
}
}
// @FIXME update for emoji status
private function roleBtnClicked():void {
if (!data.presenter) {
var e:RoleChangeEvent = new RoleChangeEvent(RoleChangeEvent.ASSIGN_PRESENTER);

View File

@ -232,7 +232,7 @@
private function openSettings():void {
paramsMenuData = [];
paramsMenuData.push({label: ResourceUtil.getInstance().getString('bbb.users.settings.lowerAllHands'), icon: images.emoji_raiseHand, handler:resetEmojiStatuses});
paramsMenuData.push({label: ResourceUtil.getInstance().getString('bbb.users.settings.resetAllStatuses'), icon: images.cancel, handler:resetEmojiStatuses});
if (!roomMuted) {
paramsMenuData.push({label: ResourceUtil.getInstance().getString('bbb.users.settings.muteAll'), icon: images.audio_muted, handler: muteAll});
@ -380,13 +380,8 @@
maximizeRestoreBtn.accessibilityName = ResourceUtil.getInstance().getString("bbb.users.maximizeRestoreBtn.accessibilityName");
}
// FIXME : fix labels
if (emojiStatusBtn) {
if (UserManager.getInstance().getConference().myEmojiStatus) {
emojiStatusBtn.accessibilityName = ResourceUtil.getInstance().getString('bbb.users.raiseHandBtn.toolTip2');
} else {
emojiStatusBtn.accessibilityName = ResourceUtil.getInstance().getString('bbb.users.raiseHandBtn.toolTip');
}
emojiStatusBtn.accessibilityName = ResourceUtil.getInstance().getString('bbb.users.emojiStatusBtn.toolTip');
}
addContextMenuItems();
@ -523,8 +518,8 @@
<mx:ControlBar width="100%">
<mx:Button id="emojiStatusBtn" icon="{images.emoji_raiseHand}" width="30" height="30"
accessibilityName="{ResourceUtil.getInstance().getString('bbb.users.raiseHandBtn.toolTip')}"
toolTip="{ResourceUtil.getInstance().getString('bbb.users.raiseHandBtn.toolTip')}" click="openEmojiStatusMenu()"
accessibilityName="{ResourceUtil.getInstance().getString('bbb.users.emojiStatusBtn.toolTip')}"
toolTip="{ResourceUtil.getInstance().getString('bbb.users.emojiStatusBtn.toolTip')}" click="openEmojiStatusMenu()"
visible="true" tabIndex="{partOptions.baseTabIndex+10}" />
<mx:Button id="settingsBtn" icon="{images.users_settings}" width="30" height="30"
toolTip="{ResourceUtil.getInstance().getString('bbb.users.settings.buttonTooltip')}" click="openSettings()" visible="true" tabIndex="{partOptions.baseTabIndex+15}" />