diff --git a/bigbluebutton-client/resources/prod/layout.xml b/bigbluebutton-client/resources/prod/layout.xml
index 3498865563..d2df379eed 100755
--- a/bigbluebutton-client/resources/prod/layout.xml
+++ b/bigbluebutton-client/resources/prod/layout.xml
@@ -3,8 +3,8 @@
-
-
+
+
@@ -12,9 +12,9 @@
-
+
-
+
@@ -22,23 +22,23 @@
-
-
+
+
-
-
+
+
-
-
+
+
@@ -46,8 +46,8 @@
-
-
+
+
@@ -56,8 +56,8 @@
-
-
+
+
@@ -66,25 +66,25 @@
-
-
+
+
-
+
-
+
-
-
+
+
@@ -93,8 +93,8 @@
-
-
+
+
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/maps/ChatEventMapDelegate.as b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/maps/ChatEventMapDelegate.as
index 156a976bce..9b9861a4d9 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/maps/ChatEventMapDelegate.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/maps/ChatEventMapDelegate.as
@@ -43,7 +43,7 @@ package org.bigbluebutton.modules.chat.maps {
private var _windowMapper:Array = [];
- private var MAIN_CHAT_WINID: String = "gcWin-0";
+ private var MAIN_CHAT_WINID: String = "ChatWindow0";
public function ChatEventMapDelegate() {
this.dispatcher = dispatcher;
@@ -54,31 +54,33 @@ package org.bigbluebutton.modules.chat.maps {
private function genWindowMappers():void{
getChatOptions();
for (var i:int = 0; i < chatOptions.maxNumWindows; i++) {
- var winId: String = "gcWin-" + i;
- _windowMapper[winId] = new GroupChatWindowMapper(winId);
+ var winId: String = "ChatWindow" + i;
+ _windowMapper[i] = new GroupChatWindowMapper(winId);
}
}
private function findGroupChatWindowMapper(winId: String):GroupChatWindowMapper {
- if (_windowMapper.hasOwnProperty(winId)) {
- return _windowMapper[winId];
+ for (var i:int=0; i<_windowMapper.length; i++) {
+ var wMapper: GroupChatWindowMapper = _windowMapper[i];
+ if (wMapper.gcWinId == winId) return wMapper;
}
return null;
}
private function findUnusedWindowMapper():GroupChatWindowMapper {
- for (var winId:String in _windowMapper) {
- var wMapper: GroupChatWindowMapper = _windowMapper[winId];
+ // start looking for unused at 1 becuase 0 is reserved for the main chat
+ for (var i:int=1; i<_windowMapper.length; i++) {
+ var wMapper: GroupChatWindowMapper = _windowMapper[i];
if (wMapper.isEmpty()) return wMapper;
}
return null;
}
- private function openNewPublicGrouChatWindow(chatId: String, gc:GroupChat):void {
+ private function openNewPublicGroupChatWindow(chatId: String, gc:GroupChat):void {
var wMapper:GroupChatWindowMapper = findUnusedWindowMapper();
if (wMapper != null) {
// Setup a tracker for the state of this chat.
- var gcBoxMapper:GroubChatBoxMapper = new GroubChatBoxMapper(chatId);
+ var gcBoxMapper:GroupChatBoxMapper = new GroupChatBoxMapper(chatId);
gcBoxMapper.chatBoxOpen = true;
wMapper.addChatBox(gcBoxMapper);
@@ -97,9 +99,9 @@ package org.bigbluebutton.modules.chat.maps {
private function openChatBoxForPrivateChat(chatId: String, gc: GroupChat):void {
// Setup a tracker for the state of this chat.
- var gcBoxMapper:GroubChatBoxMapper = new GroubChatBoxMapper(chatId);
+ var gcBoxMapper:GroupChatBoxMapper = new GroupChatBoxMapper(chatId);
gcBoxMapper.chatBoxOpen = true;
- var winMapper:GroupChatWindowMapper = _windowMapper[MAIN_CHAT_WINID];
+ var winMapper:GroupChatWindowMapper = findGroupChatWindowMapper(MAIN_CHAT_WINID);
winMapper.addChatBox(gcBoxMapper);
globalDispatcher.dispatchEvent(new PrivateGroupChatCreatedEvent(chatId));
@@ -108,9 +110,9 @@ package org.bigbluebutton.modules.chat.maps {
public function createNewGroupChat(chatId: String):void {
if (ChatModel.MAIN_PUBLIC_CHAT == chatId){
// Setup a tracker for the state of this chat.
- var gcBoxMapper:GroubChatBoxMapper = new GroubChatBoxMapper(chatId);
+ var gcBoxMapper:GroupChatBoxMapper = new GroupChatBoxMapper(chatId);
gcBoxMapper.chatBoxOpen = true;
- var winMapper:GroupChatWindowMapper = _windowMapper[MAIN_CHAT_WINID];
+ var winMapper:GroupChatWindowMapper = findGroupChatWindowMapper(MAIN_CHAT_WINID);
winMapper.addChatBox(gcBoxMapper);
var window:ChatWindow = new ChatWindow();
@@ -127,7 +129,7 @@ package org.bigbluebutton.modules.chat.maps {
} else {
var gc:GroupChat = LiveMeeting.inst().chats.getGroupChat(chatId);
if (gc != null && gc.access == GroupChat.PUBLIC) {
- openNewPublicGrouChatWindow(chatId, gc);
+ openNewPublicGroupChatWindow(chatId, gc);
} else if (gc != null && gc.access == GroupChat.PRIVATE) {
openChatBoxForPrivateChat(chatId, gc);
}
@@ -154,7 +156,7 @@ package org.bigbluebutton.modules.chat.maps {
globalDispatcher.dispatchEvent(event);
}
- public function closeChatWindow():void {
+ public function closeChatWindow():void { //Never called
var event:CloseWindowEvent = new CloseWindowEvent(CloseWindowEvent.CLOSE_WINDOW_EVENT);
// event.window = _chatWindow;
globalDispatcher.dispatchEvent(event);
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/maps/GroubChatBoxMapper.as b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/maps/GroupChatBoxMapper.as
similarity index 79%
rename from bigbluebutton-client/src/org/bigbluebutton/modules/chat/maps/GroubChatBoxMapper.as
rename to bigbluebutton-client/src/org/bigbluebutton/modules/chat/maps/GroupChatBoxMapper.as
index bea65c9075..16e67ec325 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/maps/GroubChatBoxMapper.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/maps/GroupChatBoxMapper.as
@@ -1,11 +1,11 @@
package org.bigbluebutton.modules.chat.maps
{
- public class GroubChatBoxMapper
+ public class GroupChatBoxMapper
{
private var _chatBoxId: String;
private var _chatBoxOpen: Boolean = false;
- public function GroubChatBoxMapper(chatBoxId: String)
+ public function GroupChatBoxMapper(chatBoxId: String)
{
_chatBoxId = chatBoxId;
}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/maps/GroupChatWindowMapper.as b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/maps/GroupChatWindowMapper.as
index 335aa5e5e7..8127a9dee0 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/maps/GroupChatWindowMapper.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/maps/GroupChatWindowMapper.as
@@ -1,10 +1,12 @@
package org.bigbluebutton.modules.chat.maps
{
+ import mx.collections.ArrayCollection;
+
public class GroupChatWindowMapper
{
private var _gcWinId: String;
- private var _chatBoxes:Array = [];
+ private var _chatBoxes:ArrayCollection = new ArrayCollection();
public function GroupChatWindowMapper(gcWinId: String)
{
@@ -19,12 +21,17 @@ package org.bigbluebutton.modules.chat.maps
return _chatBoxes.length == 0;
}
- public function addChatBox(box: GroubChatBoxMapper):void {
- _chatBoxes[box.chatBoxId] = box;
+ public function addChatBox(box: GroupChatBoxMapper):void {
+ _chatBoxes.addItem(box);
}
- public function removeChatBox(id: String):void {
- delete _chatBoxes[id];
+ public function removeChatBox(id: String):void { // never called
+ for (var i:int=0; i<_chatBoxes.length; i++) {
+ var box:GroupChatBoxMapper = _chatBoxes.getItemAt(i) as GroupChatBoxMapper;
+ if (box.chatBoxId == id) {
+ _chatBoxes.removeItemAt(i);
+ }
+ }
}
public function getNumChatBoxes():int {