diff --git a/bigbluebutton-client/src/ChatModule.mxml b/bigbluebutton-client/src/ChatModule.mxml index a7544fff432dd804f13786e73e48e707ea5e3444..d58f40fae5bf3691873bb744c949123912a15b1a 100755 --- a/bigbluebutton-client/src/ChatModule.mxml +++ b/bigbluebutton-client/src/ChatModule.mxml @@ -129,7 +129,7 @@ private function handleTranscriptLoadedEvent(event:Event):void { LogUtil.debug("Handling TranscriptLoadedEvent"); var welcome:String = _attributes.welcome as String; - if (welcome != ""){ + if (welcome != "") { // var welcomeEvent:PublicChatMessageEvent = new PublicChatMessageEvent(PublicChatMessageEvent.PUBLIC_CHAT_MESSAGE_EVENT); // var chatobj:ChatMessageVO = new ChatMessageVO(); // chatobj.message = welcome; diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/services/ChatMessageService.as b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/services/ChatMessageService.as index 13d01b0ccf2f8c878300e51d64b9aad05eab5f55..bc8b793fca9a7d53ff4d3cbdba34e16b34c9d092 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/services/ChatMessageService.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/services/ChatMessageService.as @@ -39,8 +39,8 @@ package org.bigbluebutton.modules.chat.services msg.fromUsername = SPACE; msg.fromColor = "0"; msg.fromLang = "en"; - msg.fromTime = 0; - msg.fromTimezoneOffset = 0; + msg.fromTime = new Date().getTime(); + msg.fromTimezoneOffset = new Date().getTimezoneOffset(); msg.toUserID = SPACE; msg.toUsername = SPACE; msg.message = welcome; diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatBox.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatBox.mxml index 5295cf8407664a1e85441f2f0350c9246f7c8256..11c8f8ac9858e98f7618c7f1a2da6991dfc209a1 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatBox.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatBox.mxml @@ -74,11 +74,13 @@ import org.bigbluebutton.modules.chat.events.PublicChatMessageEvent; import org.bigbluebutton.modules.chat.events.SendPrivateChatMessageEvent; import org.bigbluebutton.modules.chat.events.SendPublicChatMessageEvent; + import org.bigbluebutton.modules.chat.events.TranscriptEvent; import org.bigbluebutton.modules.chat.model.ChatMessage; import org.bigbluebutton.modules.chat.model.ChatMessages; import org.bigbluebutton.modules.chat.views.ChatMessageRenderer; import org.bigbluebutton.modules.chat.vo.ChatMessageVO; import org.bigbluebutton.util.i18n.ResourceUtil; + public static const COPY_ALL_BUTTON:String = "Copy All Text"; @@ -150,8 +152,21 @@ Accessibility.updateProperties(); focusToTextMessageArea(); + + historyTimer = new Timer(2000, 1); + historyTimer.addEventListener(TimerEvent.TIMER, loadChatHistory); + historyTimer.start(); } + private var historyTimer:Timer; + + private function loadChatHistory(event:TimerEvent):void { + if (publicChat) { + var disp:Dispatcher = new Dispatcher(); + disp.dispatchEvent(new TranscriptEvent(TranscriptEvent.LOAD_TRANSCRIPT)); + } + } + private function handleFocusInEvent(event:FocusEvent):void { focusToTextMessageArea(); } @@ -254,16 +269,16 @@ backgroundColor = 0x000000; } - private function onLinkClick(e:TextEvent):void{ + private function onLinkClick(e:TextEvent):void { var url:URLRequest = new URLRequest(e.text); navigateToURL(url, '_blank'); } - private function changeFontSize(e:ChatOptionsEvent):void{ + private function changeFontSize(e:ChatOptionsEvent):void { this.setStyle("fontSize", e.fontSize); } - private function addContextMenuItems():void{ + private function addContextMenuItems():void { var contextMenu:ContextMenu = new ContextMenu(); contextMenu.hideBuiltInItems(); @@ -480,7 +495,7 @@ } private function sendMessages():void { - if (txtMsgArea.text != "" || txtMsgArea.text == null){ + if (txtMsgArea.text != ""){ if (publicChat) { sendPublicChatMessage(txtMsgArea.text); } else{ diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatWindow.mxml index 4a88c4635f8eda5159e0d0b474b41ce4ec4e31a4..851dd0c4d2f2678750213496b15092d0bc182b15 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatWindow.mxml @@ -68,7 +68,7 @@ // var disp:Dispatcher = new Dispatcher(); disp = new Dispatcher(); - disp.dispatchEvent(new TranscriptEvent(TranscriptEvent.LOAD_TRANSCRIPT)); +// disp.dispatchEvent(new TranscriptEvent(TranscriptEvent.LOAD_TRANSCRIPT)); } private function fullScreenHandler(evt:FullScreenEvent):void {