Correctly send MDIWindowEvent.CLOSE event to ChatEventMapDelegate when a public chat window is closed.
This commit is contained in:
parent
f3ee06fc5b
commit
04f46b9eb5
@ -35,6 +35,7 @@
|
|||||||
baseTabIndex="801"
|
baseTabIndex="801"
|
||||||
colorPickerIsVisible="false"
|
colorPickerIsVisible="false"
|
||||||
maxMessageLength="1024"
|
maxMessageLength="1024"
|
||||||
|
maxNumWindows="9"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<module name="UsersModule" url="http://HOST/client/UsersModule.swf?v=VERSION"
|
<module name="UsersModule" url="http://HOST/client/UsersModule.swf?v=VERSION"
|
||||||
@ -113,7 +114,6 @@
|
|||||||
baseTabIndex="501"
|
baseTabIndex="501"
|
||||||
maxFileSize="30"
|
maxFileSize="30"
|
||||||
enableDownload="true"
|
enableDownload="true"
|
||||||
maxNumWindows="9"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<module name="CaptionModule" url="http://HOST/client/CaptionModule.swf?v=VERSION"
|
<module name="CaptionModule" url="http://HOST/client/CaptionModule.swf?v=VERSION"
|
||||||
|
@ -62,8 +62,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
|||||||
</EventHandlers>
|
</EventHandlers>
|
||||||
|
|
||||||
<EventHandlers type="{ReceivedGroupChatsEvent.RECEIVED_GROUPCHATS_EVENT}">
|
<EventHandlers type="{ReceivedGroupChatsEvent.RECEIVED_GROUPCHATS_EVENT}">
|
||||||
<MethodInvoker generator="{ChatEventMapDelegate}" method="handleReceivedGroupChatsEvent" />
|
<MethodInvoker generator="{ChatEventMapDelegate}" method="handleReceivedGroupChatsEvent"/>
|
||||||
<MethodInvoker generator="{ChatMessageService}" method="handleReceivedGroupChatsEvent" />
|
<MethodInvoker generator="{ChatMessageService}" method="handleReceivedGroupChatsEvent"/>
|
||||||
</EventHandlers>
|
</EventHandlers>
|
||||||
|
|
||||||
<EventHandlers type="{GroupChatBoxClosedEvent.CHATBOX_CLOSED_EVENT}">
|
<EventHandlers type="{GroupChatBoxClosedEvent.CHATBOX_CLOSED_EVENT}">
|
||||||
|
@ -63,7 +63,7 @@ package org.bigbluebutton.modules.chat.maps {
|
|||||||
_windowMapper[i] = new GroupChatWindowMapper(winId);
|
_windowMapper[i] = new GroupChatWindowMapper(winId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function findGroupChatWindowMapper(winId: String):GroupChatWindowMapper {
|
private function findGroupChatWindowMapper(winId: String):GroupChatWindowMapper {
|
||||||
for (var i:int=0; i<_windowMapper.length; i++) {
|
for (var i:int=0; i<_windowMapper.length; i++) {
|
||||||
var wMapper: GroupChatWindowMapper = _windowMapper[i];
|
var wMapper: GroupChatWindowMapper = _windowMapper[i];
|
||||||
@ -202,7 +202,7 @@ package org.bigbluebutton.modules.chat.maps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function openChatWindow(window:ChatWindow):void {
|
private function openChatWindow(window:ChatWindow):void {
|
||||||
// Use the GLobal Dispatcher so that this message will be heard by the
|
// Use the Global Dispatcher so that this message will be heard by the
|
||||||
// main application.
|
// main application.
|
||||||
var event:OpenWindowEvent = new OpenWindowEvent(OpenWindowEvent.OPEN_WINDOW_EVENT);
|
var event:OpenWindowEvent = new OpenWindowEvent(OpenWindowEvent.OPEN_WINDOW_EVENT);
|
||||||
event.window = window;
|
event.window = window;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
|
* Copyright (c) 2017 BigBlueButton Inc. and by respective authors (see below).
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it under the
|
* 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
|
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||||
@ -24,7 +24,7 @@ package org.bigbluebutton.modules.chat.model {
|
|||||||
|
|
||||||
[Bindable]
|
[Bindable]
|
||||||
public var privateEnabled:Boolean = true;
|
public var privateEnabled:Boolean = true;
|
||||||
|
|
||||||
[Bindable]
|
[Bindable]
|
||||||
public var groupEnabled:Boolean = true;
|
public var groupEnabled:Boolean = true;
|
||||||
|
|
||||||
@ -40,8 +40,10 @@ package org.bigbluebutton.modules.chat.model {
|
|||||||
[Bindable]
|
[Bindable]
|
||||||
public var maxMessageLength:uint = 1024;
|
public var maxMessageLength:uint = 1024;
|
||||||
|
|
||||||
|
[Bindable]
|
||||||
public var maxNumWindows:uint = 9;
|
public var maxNumWindows:uint = 9;
|
||||||
|
|
||||||
|
[Bindable]
|
||||||
public var maxNumChatPerWindow:uint = 10;
|
public var maxNumChatPerWindow:uint = 10;
|
||||||
|
|
||||||
public function ChatOptions() {
|
public function ChatOptions() {
|
||||||
|
@ -64,7 +64,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
|||||||
import org.bigbluebutton.modules.chat.views.model.ChatUser;
|
import org.bigbluebutton.modules.chat.views.model.ChatUser;
|
||||||
import org.bigbluebutton.util.i18n.ResourceUtil;
|
import org.bigbluebutton.util.i18n.ResourceUtil;
|
||||||
|
|
||||||
private static const LOGGER:ILogger = getClassLogger(ChatOptionsTab);
|
private static const LOGGER:ILogger = getClassLogger(ChatOptionsTab);
|
||||||
|
|
||||||
[Bindable] public var users:ArrayCollection;
|
[Bindable] public var users:ArrayCollection;
|
||||||
[Bindable] public var groupChats:ArrayCollection;
|
[Bindable] public var groupChats:ArrayCollection;
|
||||||
@ -256,14 +256,16 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
|||||||
<common:TabIndexer id="tabIndexer" startIndex="1" tabIndices="{[usersList, cmbFontSize, chatNoiseCheckBox, saveBtn, copyBtn, clearBtn]}"/>
|
<common:TabIndexer id="tabIndexer" startIndex="1" tabIndices="{[usersList, cmbFontSize, chatNoiseCheckBox, saveBtn, copyBtn, clearBtn]}"/>
|
||||||
</fx:Declarations>
|
</fx:Declarations>
|
||||||
|
|
||||||
<mx:HBox width="100%" verticalAlign="middle" visible="{chatOptions.groupEnabled}" includeInLayout="{chatOptions.groupEnabled}">
|
<mx:HBox id="newGroupChatBox" width="100%" verticalAlign="middle"
|
||||||
|
visible="{chatOptions.groupEnabled && groupChats.length < chatOptions.maxNumWindows}"
|
||||||
|
includeInLayout="{chatOptions.groupEnabled && groupChats.length < chatOptions.maxNumWindows}">
|
||||||
<mx:Label text="{ResourceUtil.getInstance().getString('bbb.chat.newChat.label')}"/>
|
<mx:Label text="{ResourceUtil.getInstance().getString('bbb.chat.newChat.label')}"/>
|
||||||
<mx:TextInput id="newChatNameInput" width="100%"/>
|
<mx:TextInput id="newChatNameInput" width="100%"/>
|
||||||
<mx:Button id="createChatGroupBtn" label="{ResourceUtil.getInstance().getString('bbb.chat.newChat.create')}"
|
<mx:Button id="createChatGroupBtn" label="{ResourceUtil.getInstance().getString('bbb.chat.newChat.create')}"
|
||||||
styleName="mainActionButton" height="30"
|
styleName="mainActionButton" height="30"
|
||||||
enabled="{!StringUtils.isEmpty(newChatNameInput.text)}" click="onCreateChatBtnClick()" />
|
enabled="{!StringUtils.isEmpty(newChatNameInput.text)}" click="onCreateChatBtnClick()" />
|
||||||
</mx:HBox>
|
</mx:HBox>
|
||||||
|
|
||||||
<mx:Label id="lblSelectPrivateChat" styleName="chatOptionsLabel"
|
<mx:Label id="lblSelectPrivateChat" styleName="chatOptionsLabel"
|
||||||
text="{ResourceUtil.getInstance().getString('bbb.chat.privateChatSelect')}"
|
text="{ResourceUtil.getInstance().getString('bbb.chat.privateChatSelect')}"
|
||||||
visible="{chatOptions.privateEnabled}" includeInLayout="{chatOptions.privateEnabled}"/>
|
visible="{chatOptions.privateEnabled}" includeInLayout="{chatOptions.privateEnabled}"/>
|
||||||
@ -275,7 +277,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
|||||||
toolTip="{ResourceUtil.getInstance().getString('bbb.chat.usersList.toolTip')}"
|
toolTip="{ResourceUtil.getInstance().getString('bbb.chat.usersList.toolTip')}"
|
||||||
accessibilityName="{ResourceUtil.getInstance().getString('bbb.chat.usersList.accessibilityName')}"/>
|
accessibilityName="{ResourceUtil.getInstance().getString('bbb.chat.usersList.accessibilityName')}"/>
|
||||||
<mx:Label id="lblSelectGroupChat" styleName="chatOptionsLabel"
|
<mx:Label id="lblSelectGroupChat" styleName="chatOptionsLabel"
|
||||||
text="{ResourceUtil.getInstance().getString('bbb.chat.groupChatSelect')}"
|
text="{ResourceUtil.getInstance().getString('bbb.chat.groupChatSelect')}"
|
||||||
visible="{chatOptions.groupEnabled}" includeInLayout="{chatOptions.groupEnabled}"/>
|
visible="{chatOptions.groupEnabled}" includeInLayout="{chatOptions.groupEnabled}"/>
|
||||||
<mx:List id="groupChatList" width="100%" rowCount="4" dataProvider="{groupChats}" dragEnabled="false"
|
<mx:List id="groupChatList" width="100%" rowCount="4" dataProvider="{groupChats}" dragEnabled="false"
|
||||||
visible="{chatOptions.groupEnabled}" includeInLayout="{chatOptions.groupEnabled}"
|
visible="{chatOptions.groupEnabled}" includeInLayout="{chatOptions.groupEnabled}"
|
||||||
|
@ -685,5 +685,5 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
|||||||
toolTip="{ResourceUtil.getInstance().getString('bbb.chat.cmpColorPicker.toolTip')}"
|
toolTip="{ResourceUtil.getInstance().getString('bbb.chat.cmpColorPicker.toolTip')}"
|
||||||
selectedColor="0x000000" dataProvider="{colorPickerColours}" swatchPanelStyleName="chatColorPickerStyle"/>
|
selectedColor="0x000000" dataProvider="{colorPickerColours}" swatchPanelStyleName="chatColorPickerStyle"/>
|
||||||
</mx:VBox>
|
</mx:VBox>
|
||||||
</mx:HBox>
|
</mx:HBox>
|
||||||
</mx:VBox>
|
</mx:VBox>
|
||||||
|
@ -27,6 +27,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
|||||||
showCloseButton="false"
|
showCloseButton="false"
|
||||||
implements="org.bigbluebutton.common.IBbbModuleWindow"
|
implements="org.bigbluebutton.common.IBbbModuleWindow"
|
||||||
creationComplete="onCreationComplete()"
|
creationComplete="onCreationComplete()"
|
||||||
|
closeMDIWindow="closeMDIWindowHandler(event)"
|
||||||
xmlns:components="org.bigbluebutton.modules.chat.view.components.*"
|
xmlns:components="org.bigbluebutton.modules.chat.view.components.*"
|
||||||
xmlns:mate="http://mate.asfusion.com/"
|
xmlns:mate="http://mate.asfusion.com/"
|
||||||
xmlns:views="org.bigbluebutton.modules.chat.views.*">
|
xmlns:views="org.bigbluebutton.modules.chat.views.*">
|
||||||
@ -42,11 +43,15 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
|||||||
<![CDATA[
|
<![CDATA[
|
||||||
import com.asfusion.mate.events.Dispatcher;
|
import com.asfusion.mate.events.Dispatcher;
|
||||||
|
|
||||||
|
import flexlib.mdi.events.MDIWindowEvent;
|
||||||
|
|
||||||
import org.bigbluebutton.common.IBbbModuleWindow;
|
import org.bigbluebutton.common.IBbbModuleWindow;
|
||||||
|
import org.bigbluebutton.common.events.CloseWindowEvent;
|
||||||
import org.bigbluebutton.common.events.LocaleChangeEvent;
|
import org.bigbluebutton.common.events.LocaleChangeEvent;
|
||||||
import org.bigbluebutton.core.KeyboardUtil;
|
import org.bigbluebutton.core.KeyboardUtil;
|
||||||
import org.bigbluebutton.main.events.ShortcutEvent;
|
import org.bigbluebutton.main.events.ShortcutEvent;
|
||||||
import org.bigbluebutton.main.views.MainCanvas;
|
import org.bigbluebutton.main.views.MainCanvas;
|
||||||
|
import org.bigbluebutton.modules.chat.events.GroupChatBoxClosedEvent;
|
||||||
import org.bigbluebutton.modules.chat.model.ChatModel;
|
import org.bigbluebutton.modules.chat.model.ChatModel;
|
||||||
import org.bigbluebutton.modules.chat.model.ChatOptions;
|
import org.bigbluebutton.modules.chat.model.ChatOptions;
|
||||||
import org.bigbluebutton.util.i18n.ResourceUtil;
|
import org.bigbluebutton.util.i18n.ResourceUtil;
|
||||||
@ -201,8 +206,14 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
|||||||
public function handleResizableStatus(value:Boolean):void {
|
public function handleResizableStatus(value:Boolean):void {
|
||||||
this.resizable = value;
|
this.resizable = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
]]>
|
protected function closeMDIWindowHandler(event:MDIWindowEvent):void {
|
||||||
|
this.removeEventListener(MDIWindowEvent.CLOSE, closeMDIWindowHandler);
|
||||||
|
var evt:GroupChatBoxClosedEvent = new GroupChatBoxClosedEvent(_mainChatId, _windowId);
|
||||||
|
disp.dispatchEvent(evt);
|
||||||
|
}
|
||||||
|
|
||||||
|
]]>
|
||||||
</fx:Script>
|
</fx:Script>
|
||||||
<mx:VBox width="100%" height="100%">
|
<mx:VBox width="100%" height="100%">
|
||||||
<views:ChatView id="chatView" chatOptions="{chatOptions}" mainChatId="{_mainChatId}"
|
<views:ChatView id="chatView" chatOptions="{chatOptions}" mainChatId="{_mainChatId}"
|
||||||
|
Loading…
Reference in New Issue
Block a user