Reverted ChatView to r4178 for proper chat notification support
git-svn-id: http://bigbluebutton.googlecode.com/svn/trunk@4259 af16638f-c34d-0410-8cfa-b39d5352b314
This commit is contained in:
parent
2857ced8dc
commit
4e99f5d50d
@ -1,6 +1,6 @@
|
||||
<join>
|
||||
<returncode>SUCCESS</returncode>
|
||||
<fullname>Guilermo</fullname>
|
||||
<fullname>Test User</fullname>
|
||||
<role>MODERATOR</role>
|
||||
<conference>conference-mock-default</conference>
|
||||
<room>room-mock-default</room>
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
|
||||
xmlns:mate="http://mate.asfusion.com/"
|
||||
creationComplete="onCreationComplete()"
|
||||
xmlns:flexlib="http://code.google.com/p/flexlib/"
|
||||
width="100%" height="100%" xmlns:containers="flexlib.containers.*">
|
||||
xmlns:mate="http://mate.asfusion.com/"
|
||||
creationComplete="onCreationComplete()"
|
||||
xmlns:flexlib="http://code.google.com/p/flexlib/"
|
||||
width="100%" height="100%" xmlns:containers="flexlib.containers.*">
|
||||
|
||||
<mate:Listener type="{PrivateChatMessageEvent.PRIVATE_CHAT_MESSAGE_EVENT}" method="handlePrivateChatMessageEvent"/>
|
||||
<mate:Listener type="{PublicChatMessageEvent.PUBLIC_CHAT_MESSAGE_EVENT}" method="handlePublicChatMessageEvent"/>
|
||||
@ -12,20 +12,20 @@
|
||||
|
||||
<mx:Style>
|
||||
.colorPickerStyle {
|
||||
backgroundColor:#E5E6E7;
|
||||
columnCount:12;
|
||||
horizontalGap:0;
|
||||
previewHeight:22;
|
||||
previewWidth:45;
|
||||
swatchGridBackgroundColor:#000000;
|
||||
swatchGridBorderSize:0;
|
||||
swatchHeight:60;
|
||||
swatchHighlightColor:#FFFFFF;
|
||||
swatchHighlightSize:1;
|
||||
swatchWidth:12;
|
||||
textFieldWidth:72;
|
||||
verticalGap:0;
|
||||
}
|
||||
backgroundColor:#E5E6E7;
|
||||
columnCount:12;
|
||||
horizontalGap:0;
|
||||
previewHeight:22;
|
||||
previewWidth:45;
|
||||
swatchGridBackgroundColor:#000000;
|
||||
swatchGridBorderSize:0;
|
||||
swatchHeight:60;
|
||||
swatchHighlightColor:#FFFFFF;
|
||||
swatchHighlightSize:1;
|
||||
swatchWidth:12;
|
||||
textFieldWidth:72;
|
||||
verticalGap:0;
|
||||
}
|
||||
|
||||
</mx:Style>
|
||||
|
||||
@ -51,11 +51,12 @@
|
||||
import flash.external.ExternalInterface;
|
||||
|
||||
[Bindable] private var colorPickerColours:Array = ['0x000000', '0xFF0000', '0xFF8800',
|
||||
'0xFFFF00', '0x88FF00', '0x00FF00', '0x00FF88', '0x00FFFF',
|
||||
'0x0088FF', '0x0000FF', '0x8800FF', '0xFF00FF'];
|
||||
'0xFFFF00', '0x88FF00', '0x00FF00', '0x00FF88', '0x00FFFF',
|
||||
'0x0088FF', '0x0000FF', '0x8800FF', '0xFF00FF'];
|
||||
|
||||
private static const PUBLIC_CHAT_USERID:String = '0';
|
||||
private static const PUBLIC_CHAT_USERNAME:String = ResourceUtil.getInstance().getString("bbb.chat.publicChatUsername");
|
||||
private var focus:Boolean = true;
|
||||
|
||||
public var localDispatcher:IEventDispatcher;
|
||||
|
||||
@ -69,6 +70,21 @@
|
||||
openChatBoxFor(PUBLIC_CHAT_USERID);
|
||||
makePublicChatUncloseable();
|
||||
addEventListener(SuperTabEvent.TAB_CLOSE, onUserClosedTab);
|
||||
systemManager.stage.addEventListener(Event.MOUSE_LEAVE, mouseLeave);
|
||||
systemManager.stage.addEventListener(Event.ACTIVATE, activate);
|
||||
systemManager.stage.addEventListener(Event.DEACTIVATE, deactivate);
|
||||
}
|
||||
|
||||
private function mouseLeave(event:Event):void{
|
||||
this.focus = false;
|
||||
}
|
||||
|
||||
private function activate(event:Event):void{
|
||||
ExternalInterface.call("clearblink");
|
||||
this.focus = true;
|
||||
}
|
||||
private function deactivate(event:Event):void{
|
||||
this.focus = false;
|
||||
}
|
||||
|
||||
private function sendMessageReceivedFromBBBEvent(event:BBBEvent):void {
|
||||
@ -78,26 +94,26 @@
|
||||
|
||||
private function makePublicChatUncloseable():void {
|
||||
// See definition of callLater on Adobe Flash doc.
|
||||
callLater(calledOnTheNextScreenRefresh);
|
||||
}
|
||||
callLater(calledOnTheNextScreenRefresh);
|
||||
}
|
||||
|
||||
private function calledOnTheNextScreenRefresh():void {
|
||||
var chatBox:ChatBox = getChatBoxForParticipant(PUBLIC_CHAT_USERID);
|
||||
var chatIndex:int = getTabIndexFor(chatBox);
|
||||
chatTabs.setClosePolicyForTab(chatIndex, SuperTab.CLOSE_NEVER);
|
||||
}
|
||||
private function calledOnTheNextScreenRefresh():void {
|
||||
var chatBox:ChatBox = getChatBoxForParticipant(PUBLIC_CHAT_USERID);
|
||||
var chatIndex:int = getTabIndexFor(chatBox);
|
||||
chatTabs.setClosePolicyForTab(chatIndex, SuperTab.CLOSE_NEVER);
|
||||
}
|
||||
|
||||
public function setFocusOn(component:UIComponent):void
|
||||
{
|
||||
if (component.id == "txtMsg") {
|
||||
component.setFocus();
|
||||
component.drawFocus(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.txtMsg.setFocus();
|
||||
this.txtMsg.drawFocus(true);
|
||||
}
|
||||
component.setFocus();
|
||||
component.drawFocus(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.txtMsg.setFocus();
|
||||
this.txtMsg.drawFocus(true);
|
||||
}
|
||||
}
|
||||
|
||||
public function setFocusOff():void
|
||||
@ -112,18 +128,18 @@
|
||||
return t;
|
||||
}
|
||||
|
||||
private function sendMessages():void
|
||||
{
|
||||
trace("Sending message");
|
||||
private function sendMessages():void
|
||||
{
|
||||
trace("Sending message");
|
||||
|
||||
if (hasMessageToSend()){
|
||||
if (hasMessageToSend()){
|
||||
if (isChatBoxCurrentlySelected(PUBLIC_CHAT_USERID)) {
|
||||
sendPublicChatMessage();
|
||||
} else{
|
||||
sendPrivateChatMessage();
|
||||
}
|
||||
clearMessageEntryTextBox();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function hasMessageToSend():Boolean {
|
||||
@ -291,13 +307,15 @@
|
||||
private function handlePublicChatMessageEvent(event:PublicChatMessageEvent):void {
|
||||
LogUtil.debug("Got PublicChatMessageEvent");
|
||||
showMessage(PUBLIC_CHAT_USERID, event.message);
|
||||
ExternalInterface.call("blinktitle", ResourceUtil.getInstance().getString('bbb.chat.publicMsgAwaiting'), ResourceUtil.getInstance().getString('bbb.chat.publicMsgAwaiting2'));
|
||||
if (!this.focus)
|
||||
ExternalInterface.call("startblink", ResourceUtil.getInstance().getString('bbb.chat.publicMsgAwaiting'), ResourceUtil.getInstance().getString('bbb.chat.publicMsgAwaiting2'));
|
||||
globalDispatcher.dispatchEvent(new BBBEvent(BBBEvent.RECEIVED_PUBLIC_CHAT_MESSAGE_EVENT, event.message));
|
||||
}
|
||||
|
||||
private function handlePrivateChatMessageEvent(event:PrivateChatMessageEvent):void {
|
||||
LogUtil.debug("Got PrivateChatMessageEvent");
|
||||
ExternalInterface.call("blinktitle", ResourceUtil.getInstance().getString('bbb.chat.privateMsgAwaiting'), ResourceUtil.getInstance().getString('bbb.chat.privateMsgAwaiting2'));
|
||||
if (!this.focus)
|
||||
ExternalInterface.call("startblink", ResourceUtil.getInstance().getString('bbb.chat.privateMsgAwaiting'), ResourceUtil.getInstance().getString('bbb.chat.privateMsgAwaiting2'));
|
||||
showMessage(event.message.sender, event.message.message);
|
||||
}
|
||||
|
||||
@ -348,9 +366,9 @@
|
||||
<mx:ApplicationControlBar id="chatCtrlBar" width="100%" height="10%">
|
||||
<mx:TextInput id="txtMsg" width="100%" enter="sendMessages()"/>
|
||||
<mx:ColorPicker id="cmpColorPicker" showTextField="false" toolTip="{ResourceUtil.getInstance().getString('bbb.chat.cmpColorPicker.toolTip')}"
|
||||
selectedColor="0x000000" dataProvider="{colorPickerColours}" swatchPanelStyleName="colorPickerStyle"/>
|
||||
selectedColor="0x000000" dataProvider="{colorPickerColours}" swatchPanelStyleName="colorPickerStyle"/>
|
||||
<mx:Button label="{ResourceUtil.getInstance().getString('bbb.chat.sendBtn')}" id="sendBtn"
|
||||
toolTip="{ResourceUtil.getInstance().getString('bbb.chat.sendBtn.toolTip')}" click="sendMessages()"/>
|
||||
toolTip="{ResourceUtil.getInstance().getString('bbb.chat.sendBtn.toolTip')}" click="sendMessages()"/>
|
||||
<mx:ComboBox id="participantList" dataProvider="{participants}" close="onOpenChatBox()" />
|
||||
</mx:ApplicationControlBar>
|
||||
</mx:VBox>
|
||||
|
Loading…
Reference in New Issue
Block a user