Merge pull request #201 from SenecaCDOT-BigBlueButton/create-tab-loop

Create tab loop
This commit is contained in:
Richard Alam 2013-07-15 08:33:36 -07:00
commit 3f2bec293f
5 changed files with 54 additions and 40 deletions

View File

@ -71,6 +71,7 @@ package org.bigbluebutton.main.events {
public static const CHANGE_FONT_COLOUR:String = 'CHANGE_FONT_COLOUR';
public static const SEND_MESSAGE:String = 'SEND_MESSAGE';
public static const FOCUS_LOOP_END:String = 'FOCUS_LOOP_END';
public static const FOCUS_SHORTCUT_BUTTON:String = 'FOCUS_SHORTCUT_BUTTON';
public static const MUTE_ALL_BUT_PRES:String = 'MUTE_ALL_BUT_PRES';
@ -95,7 +96,7 @@ package org.bigbluebutton.main.events {
public static const REMOTE_CAST_VOTE:String = 'REMOTE_CAST_VOTE';
public static const SC_REFRESH_POLL:String = 'SC_REFRESH_POLL';
public static const SC_REPOST_POLL:String = 'SC_REPOST_POLL';
public static const SC_STOP_POLL:String = 'SC_STOP_POLL';
public static const SC_STOP_POLL:String = 'SC_STOP_POLL';
// Temporary string to help fix chat message navigation for screen readers
public static const CHAT_DEBUG:String = 'CHAT_DEBUG';

View File

@ -251,7 +251,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
</mx:Script>
<mx:HBox id="addedBtns"/>
<mx:VRule strokeWidth="2" height="100%" visible="{muteMeBtn.visible}"/>
<views:MuteMeButton id="muteMeBtn" height="20" />
<views:MuteMeButton id="muteMeBtn" height="20" tabIndex="{baseIndex+numButtons+5}"/>
<mx:Spacer width="50%"/>
<mx:Label id="meetingNameLbl" styleName="meetingNameLabelStyle" />
<mx:Spacer width="50%"/>
@ -265,11 +265,12 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<mx:Button id="shortcutKeysBtn" label="{ResourceUtil.getInstance().getString('bbb.mainToolbar.shortcutBtn')}" styleName="shortcutButtonStyle"
click="onShortcutButtonClick()" height="22"
toolTip="{ResourceUtil.getInstance().getString('bbb.mainToolbar.shortcutBtn.toolTip')}"
tabIndex="{baseIndex+numButtons+6}" />
tabIndex="{baseIndex+numButtons+5}" />
<mx:LinkButton id="helpBtn" visible="{showHelpBtn}" label="?" click="onHelpButtonClicked()" height="22"
styleName="helpLinkButtonStyle" tabIndex="{baseIndex+numButtons+7}"
toolTip="{ResourceUtil.getInstance().getString('bbb.mainToolbar.helpBtn')}" accessibilityName="{ResourceUtil.getInstance().getString('bbb.mainToolbar.helpBtn')}"/>
toolTip="{ResourceUtil.getInstance().getString('bbb.mainToolbar.helpBtn')}"
accessibilityDescription="{ResourceUtil.getInstance().getString('bbb.mainToolbar.helpBtn')}"/>
<mx:Button label="" id="btnLogout" styleName="logoutButtonStyle"
toolTip="{ResourceUtil.getInstance().getString('bbb.mainToolbar.logoutBtn.toolTip')}" right="10" click="doLogout()" height="22"
tabIndex="{baseIndex+numButtons+8}" />
tabIndex="{baseIndex+numButtons+7}" />
</mx:ApplicationControlBar>

View File

@ -45,26 +45,26 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
import flash.media.Sound;
import flash.media.SoundChannel;
import flash.utils.Timer;
import flexlib.controls.tabBarClasses.SuperTab;
import flexlib.controls.textClasses.StringBoundaries;
import flexlib.events.SuperTabEvent;
import flexlib.mdi.containers.MDIWindow;
import mx.collections.ArrayCollection;
import mx.containers.ControlBar;
import mx.controls.Button;
import mx.core.Container;
import mx.core.UIComponent;
import mx.events.IndexChangedEvent;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.core.EventConstants;
import org.bigbluebutton.core.UsersUtil;
import org.bigbluebutton.core.events.CoreEvent;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.main.events.ShortcutEvent;
import org.bigbluebutton.main.model.users.BBBUser;
import org.bigbluebutton.modules.chat.ChatUtil;
@ -98,16 +98,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
private var privateFocus:Boolean = false;
private var timerInterval:int = 10; // How many seconds you want the timer to wait between chat notifications
private var notificationTimer:Timer = new Timer(timerInterval * 1000);
//[Embed(source="../sounds/publicSound.mp3")]
// private var publicSoundClass:Class;
//[Embed(source="../sounds/privateSound.mp3")]
// private var privateSoundClass:Class;
// private var publicSound:Sound = new publicSoundClass() as Sound;
//private var privateSound:Sound = new privateSoundClass() as Sound;
// Initialization
private function init():void{
chatOptions = new ChatOptions();
@ -118,15 +109,15 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
private function onCreationComplete():void{
// Start the timer for screen-reader-friendly chat notifications
notificationTimer.addEventListener(TimerEvent.TIMER, checkNotifications);
// Timer removed. Better method must be found for accessible notifications.
// notificationTimer.start();
notificationTimer.start();
openChatBoxFor(PUBLIC_CHAT_USERID, true);
makePublicChatUncloseable();
// you have to always create the AddTabBox because we always need to give people access to the dropdown to change font size
createAddTabBox();
makeAddPrivateChatUncloseable();
if (chatOptions.privateEnabled) {
createAddTabBox();
makeAddPrivateChatUncloseable();
}
addEventListener(SuperTabEvent.TAB_CLOSE, onUserClosedTab);
@ -178,6 +169,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
}
private function activate(event:Event):void{
ExternalInterface.call("clearblink");
this.focus = true;
}
@ -265,11 +257,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
chatBox.id = chatWithUserID;
chatBox.name = chatWithUserID;
chatBox.baseIndex = baseIndex;
if (chatTabs.getChildByName(OPTION_TAB_ID)) {
chatBox.setStyle("fontSize", int((chatTabs.getChildByName(OPTION_TAB_ID) as AddChatTabBox).cmbFontSize.selectedItem));
}
if (publicChat) {
chatBox.label = PUBLIC_CHAT_USERNAME
chatBox.publicChat = true;
@ -313,7 +301,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
// }
// Activates an audio alert for screen-reader users on public message reception
private function publicNotification():void {
private function publicNotification():void {
publicWaiting = true;
chatTabs.getChildByName(PUBLIC_CHAT_USERID).addEventListener(FocusEvent.FOCUS_IN, publicChatFocus);
chatTabs.getChildByName(PUBLIC_CHAT_USERID).addEventListener(FocusEvent.FOCUS_OUT, publicChatUnfocus);
@ -341,8 +329,11 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
}
}
public function publicChatFocus(event:FocusEvent):void{
publicFocus = true;
public function publicChatFocus(event:FocusEvent):void{
publicFocus = true;
if (publicWaiting) {
ExternalInterface.call("clearblink");
}
publicWaiting = false;
}
@ -353,6 +344,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
for (var messageCounter:int = 0; messageCounter < event.target.parent.exposeNumMessages(); messageCounter ++){
removed = removePrivateSender(event.target.parent.exposeSenderID(messageCounter));
if (removed) {
ExternalInterface.call("clearblink");
messageCounter = event.target.parent.exposeNumMessages() + 1;
}
}
@ -381,8 +373,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
var message:String = "";
var playSoundClip:Boolean = useSoundClip();
if (publicWaiting == true && publicFocus == false) {
if (playSoundClip) {
//publicSound.play();
if (!playSoundClip) {
} else{
message += PUBLIC_TAB_NEW;
}
@ -390,12 +381,11 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
if (privateWaiting.length && !privateFocus) {
if (playSoundClip){
//privateSound.play();
}
else {
var names:String = "";
for (var i:int = 0; i < privateWaiting.length; i++){
names += " " + privateWaiting.getItemAt(i).message.fromUsername;
names += " " + privateWaiting.getItemAt(i).message.chatobj.username;
if (i < privateWaiting.length - 1)
names += ",";
}
@ -407,7 +397,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
if (message == ""){
}
else{
ExternalInterface.call("addAlert", message);
// Chat alerts temporarily disabled, so messages do not interfere with accessibility testing of other modules.
//ExternalInterface.call("addAlert", message);
}
}
}
@ -430,7 +421,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
var privateSenders:ArrayCollection = new ArrayCollection;
if (privateWaiting.length){
for (var i:int = 0; i < privateWaiting.length; i++){
privateSenders.addItem(privateWaiting.getItemAt(i).message.fromUserID);
privateSenders.addItem(privateWaiting.getItemAt(i).message.chatobj.userid);
}
}
return privateSenders;
@ -441,7 +432,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
var success:Boolean = false;
if (privateWaiting.length){
for (var i:int = 0; i < privateWaiting.length; i++){
if (senderID == privateWaiting.getItemAt(i).message.fromUserID){
if (senderID == privateWaiting.getItemAt(i).message.chatobj.userid){
privateWaiting.removeItemAt(i);
success = true;
i = privateWaiting.length;

View File

@ -29,6 +29,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<mate:Listener type="{LayoutEvent.REMOTE_LOCK_LAYOUT_EVENT}" method="onLockLayoutEvent" />
<mate:Listener type="{LayoutEvent.REMOTE_UNLOCK_LAYOUT_EVENT}" method="onUnlockLayoutEvent" />
<mate:Listener type="{FocusEvent.FOCUS_OUT}" method="loopToStart" />
<mate:Listener type="{ShortcutEvent.FOCUS_LOOP_END}" method="loopToEnd" />
<mx:Script>
<![CDATA[
@ -41,6 +43,10 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.util.i18n.ResourceUtil;
import org.bigbluebutton.modules.layout.events.LayoutEvent;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.main.events.ShortcutEvent;
import flash.events.FocusEvent;
private var _dispatcher:Dispatcher = new Dispatcher();
private var _images:Images = new Images();
@ -67,6 +73,15 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
this.selected = false;
this.setStyle("icon", icon_unlocked);
}
private function loopToStart(e:FocusEvent):void {
if (e.target == this && !e.shiftKey)
_dispatcher.dispatchEvent(new BBBEvent(BBBEvent.JOIN_VOICE_FOCUS_HEAD));
}
private function loopToEnd(e:ShortcutEvent):void{
this.setFocus();
}
]]>
</mx:Script>

View File

@ -30,6 +30,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<mate:Listener type="{BBBEvent.JOIN_VOICE_CONFERENCE}" method="handleBBBJoinConferenceEvent"/>
<mate:Listener type="{BBBEvent.MIC_SETTINGS_CLOSED}" method="handleMicSettingsClosedEvent"/>
<mate:Listener type="{BBBEvent.JOIN_VOICE_FOCUS_HEAD}" method="joinVoiceFocusHead"/>
<mate:Listener type="{FocusEvent.FOCUS_OUT}" method="loopToEnd" />
<mate:Listener type="{ShortcutEvent.SHARE_MICROPHONE}" method="remoteClick" />
@ -207,9 +208,14 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
return "Audio button";
}
private function joinVoiceFocusHead(e:BBBEvent):void{
private function joinVoiceFocusHead(e:Event):void{
this.setFocus();
}
private function loopToEnd(e:FocusEvent):void {
if (e.target == this && e.shiftKey)
dispatcher.dispatchEvent(new ShortcutEvent(ShortcutEvent.FOCUS_LOOP_END));
}
]]>
</mx:Script>
</mx:Button>