Merge pull request #4654 from ritzalam/fix-chat-issues
- save and copy main public chat messages
This commit is contained in:
commit
4523c65535
@ -369,8 +369,11 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
addedBtnsDeskShare.addChild(event.button as UIComponent);
|
||||
}
|
||||
else if (event.module == "Microphone"){
|
||||
addedBtnsMicrophone.addChild(event.button as UIComponent);
|
||||
addedPhoneMicrophone.addChild(event.button as UIComponent);
|
||||
}
|
||||
else if (event.module == "MuteMicrophone"){
|
||||
addedMuteMicrophone.addChild(event.button as UIComponent);
|
||||
}
|
||||
else if (event.module == "Webcam"){
|
||||
addedBtnsWebcam.addChild(event.button as UIComponent);
|
||||
}
|
||||
@ -383,8 +386,10 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
private function handleRemoveToolbarButtonEvent(event:ToolbarButtonEvent):void {
|
||||
if (addedBtnsDeskShare.contains(event.button as UIComponent))
|
||||
addedBtnsDeskShare.removeChild(event.button as UIComponent);
|
||||
if (addedBtnsMicrophone.contains(event.button as UIComponent))
|
||||
addedBtnsMicrophone.removeChild(event.button as UIComponent);
|
||||
if (addedPhoneMicrophone.contains(event.button as UIComponent))
|
||||
addedPhoneMicrophone.removeChild(event.button as UIComponent);
|
||||
if (addedMuteMicrophone.contains(event.button as UIComponent))
|
||||
addedMuteMicrophone.removeChild(event.button as UIComponent);
|
||||
if (addedBtnsWebcam.contains(event.button as UIComponent))
|
||||
addedBtnsWebcam.removeChild(event.button as UIComponent);
|
||||
}
|
||||
@ -543,7 +548,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
<mx:Label id="meetingNameLbl" minWidth="1" styleName="meetingNameLabelStyle" width="100%" truncateToFit="true"/>
|
||||
</mx:HBox>
|
||||
<mx:HBox id="actionBox" width="30%" horizontalAlign="center" verticalAlign="middle" horizontalScrollPolicy="off">
|
||||
<mx:HBox id="addedBtnsMicrophone" />
|
||||
<mx:HBox id="addedMuteMicrophone" />
|
||||
<mx:HBox id="addedPhoneMicrophone" />
|
||||
<mx:HBox id="addedBtnsWebcam" />
|
||||
<mx:HBox id="addedBtnsDeskShare" />
|
||||
</mx:HBox>
|
||||
|
@ -2,15 +2,11 @@ package org.bigbluebutton.modules.chat.model
|
||||
{
|
||||
import com.adobe.utils.StringUtil;
|
||||
import com.asfusion.mate.events.Dispatcher;
|
||||
|
||||
import flash.system.Capabilities;
|
||||
|
||||
import mx.collections.ArrayCollection;
|
||||
|
||||
import org.bigbluebutton.modules.chat.ChatUtil;
|
||||
import org.bigbluebutton.modules.chat.events.ChatHistoryEvent;
|
||||
import org.bigbluebutton.modules.chat.events.NewGroupChatMessageEvent;
|
||||
import org.bigbluebutton.modules.chat.events.PublicChatMessageEvent;
|
||||
import org.bigbluebutton.modules.chat.vo.ChatMessageVO;
|
||||
import org.bigbluebutton.modules.chat.vo.GroupChatUser;
|
||||
import org.bigbluebutton.util.i18n.ResourceUtil;
|
||||
@ -120,7 +116,8 @@ package org.bigbluebutton.modules.chat.model
|
||||
var allText:String = "";
|
||||
var returnStr:String = (Capabilities.os.indexOf("Windows") >= 0 ? "\r\n" : "\n");
|
||||
for (var i:int = 0; i < messages.length; i++){
|
||||
var item:ChatMessage = messages.getItemAt(i) as ChatMessage;
|
||||
var chatVO: ChatMessageVO = messages.getItemAt(i) as ChatMessageVO
|
||||
var item:ChatMessage = convertChatMessage(chatVO);
|
||||
if (StringUtil.trim(item.name) != "") {
|
||||
allText += item.name + "\t";
|
||||
}
|
||||
@ -144,5 +141,27 @@ package org.bigbluebutton.modules.chat.model
|
||||
welcomeEvent.chatId = id;
|
||||
_dispatcher.dispatchEvent(welcomeEvent);
|
||||
}
|
||||
|
||||
private function convertChatMessage(msgVO:ChatMessageVO):ChatMessage {
|
||||
var cm:ChatMessage = new ChatMessage();
|
||||
|
||||
cm.lastSenderId = "";
|
||||
cm.lastTime = "";
|
||||
|
||||
cm.senderId = msgVO.fromUserId;
|
||||
|
||||
cm.text = msgVO.message;
|
||||
|
||||
cm.name = msgVO.fromUsername;
|
||||
cm.senderColor = uint(msgVO.fromColor);
|
||||
|
||||
// Welcome message will skip time
|
||||
if (msgVO.fromTime != -1) {
|
||||
cm.fromTime = msgVO.fromTime;
|
||||
cm.fromTimezoneOffset = msgVO.fromTimezoneOffset;
|
||||
cm.time = convertTimeNumberToString(msgVO.fromTime);
|
||||
}
|
||||
return cm
|
||||
}
|
||||
}
|
||||
}
|
@ -1,11 +1,14 @@
|
||||
package org.bigbluebutton.modules.chat.services
|
||||
{
|
||||
import flash.events.Event;
|
||||
import flash.net.FileReference;
|
||||
import mx.controls.Alert;
|
||||
import flash.events.IOErrorEvent;
|
||||
import flash.net.FileReference;
|
||||
|
||||
import mx.controls.Alert;
|
||||
|
||||
import org.bigbluebutton.core.model.LiveMeeting;
|
||||
import org.bigbluebutton.modules.chat.events.ChatSaveEvent;
|
||||
import org.bigbluebutton.modules.chat.model.ChatModel;
|
||||
import org.bigbluebutton.modules.chat.model.GroupChat;
|
||||
import org.bigbluebutton.util.i18n.ResourceUtil;
|
||||
|
||||
@ -14,11 +17,11 @@ package org.bigbluebutton.modules.chat.services
|
||||
public function ChatSaver(){}
|
||||
|
||||
public function saveChatToFile(e:ChatSaveEvent):void{
|
||||
var chatId: String = e.chatId;
|
||||
var filename:String = e.filename;
|
||||
|
||||
// Hardcode to save only Main public chat for now.
|
||||
var chatId: String = ChatModel.MAIN_PUBLIC_CHAT;
|
||||
|
||||
var chat: GroupChat = LiveMeeting.inst().chats.getGroupChat(chatId);
|
||||
|
||||
var filename:String = chat.name;
|
||||
var textToExport:String = chat.getAllMessageAsString();
|
||||
var fileRef:FileReference = new FileReference();
|
||||
|
||||
|
@ -45,17 +45,13 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
<fx:Script>
|
||||
<![CDATA[
|
||||
import com.asfusion.mate.events.Dispatcher;
|
||||
|
||||
import flash.events.Event;
|
||||
import flash.events.FocusEvent;
|
||||
import flash.media.Sound;
|
||||
|
||||
import mx.controls.Button;
|
||||
import mx.core.INavigatorContent;
|
||||
|
||||
import flexlib.controls.tabBarClasses.SuperTab;
|
||||
import flexlib.events.SuperTabEvent;
|
||||
|
||||
import org.bigbluebutton.core.EventConstants;
|
||||
import org.bigbluebutton.core.Options;
|
||||
import org.bigbluebutton.core.UsersUtil;
|
||||
@ -153,10 +149,9 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
}
|
||||
|
||||
private function dispatchCopyChatEvent(e:Event):void {
|
||||
var chatBox:ChatBox = getPublicChatBox();
|
||||
var copyEvent:ChatCopyEvent = new ChatCopyEvent(ChatCopyEvent.COPY_CHAT_EVENT);
|
||||
|
||||
copyEvent.chatId = chatBox.getChatId();
|
||||
copyEvent.chatId = ChatModel.MAIN_PUBLIC_CHAT
|
||||
globalDispatcher.dispatchEvent(copyEvent);
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ package org.bigbluebutton.modules.phone.maps {
|
||||
// main application.
|
||||
var eventMute:ToolbarButtonEvent = new ToolbarButtonEvent(ToolbarButtonEvent.ADD);
|
||||
eventMute.button = muteMeButton;
|
||||
eventMute.module = "Microphone";
|
||||
eventMute.module = "MuteMicrophone";
|
||||
globalDispatcher.dispatchEvent(eventMute);
|
||||
buttonOpen = true
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user