Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed the Flex 4 chat view to match new models
- Loading branch information
Showing
8 changed files
with
144 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
clients/flash/web-client/src/org/bigbluebutton/web/chat/views/ChatPanelMediator.as
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package org.bigbluebutton.web.chat.views { | ||
import flash.events.MouseEvent; | ||
|
||
import org.bigbluebutton.lib.main.models.IUserSession; | ||
import org.bigbluebutton.lib.user.models.User; | ||
import org.bigbluebutton.web.main.models.IUISession; | ||
|
||
import robotlegs.bender.bundles.mvcs.Mediator; | ||
|
||
public class ChatPanelMediator extends Mediator { | ||
|
||
[Inject] | ||
public var view:ChatPanel; | ||
|
||
[Inject] | ||
public var uiSession:IUISession; | ||
|
||
[Inject] | ||
public var userSession:IUserSession; | ||
|
||
override public function initialize():void { | ||
uiSession.chatInfoSignal.add(onChatInfoSignal); | ||
|
||
view.closeButton.addEventListener(MouseEvent.CLICK, onCloseButtonClick); | ||
} | ||
|
||
private function onChatInfoSignal():void { | ||
if (uiSession.chatInfo != null) { | ||
if (uiSession.chatInfo.publicChat) { | ||
view.title.text = "Public Chat"; | ||
} else { | ||
var user:User = userSession.userList.getUserByUserId(uiSession.chatInfo.userId); | ||
if (user != null) { | ||
view.title.text = user.name; | ||
} | ||
} | ||
} | ||
} | ||
|
||
private function onCloseButtonClick(e:MouseEvent):void { | ||
uiSession.chatInfo = null; | ||
} | ||
|
||
override public function destroy():void { | ||
uiSession.chatInfoSignal.remove(onChatInfoSignal); | ||
|
||
view.closeButton.removeEventListener(MouseEvent.CLICK, onCloseButtonClick); | ||
|
||
super.destroy(); | ||
view = null; | ||
} | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
clients/flash/web-client/src/org/bigbluebutton/web/chat/views/ChatViewMediatorWeb.as
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package org.bigbluebutton.web.chat.views { | ||
import org.bigbluebutton.lib.chat.views.ChatViewMediatorBase; | ||
import org.bigbluebutton.lib.user.models.User; | ||
import org.bigbluebutton.web.main.models.IUISession; | ||
|
||
public class ChatViewMediatorWeb extends ChatViewMediatorBase { | ||
|
||
[Inject] | ||
public var uiSession:IUISession; | ||
|
||
override public function initialize():void { | ||
super.initialize(); | ||
|
||
uiSession.chatInfoSignal.add(onChatInfoSignal); | ||
} | ||
|
||
private function onChatInfoSignal():void { | ||
if (uiSession.chatInfo != null) { | ||
if (uiSession.chatInfo.publicChat) { | ||
_user = null; | ||
_publicChat = true; | ||
openChat(chatMessagesSession.publicConversation); | ||
} else { | ||
var user:User = userSession.userList.getUserByUserId(uiSession.chatInfo.userId); | ||
_publicChat = false; | ||
if (user != null) { | ||
_user = user; | ||
openChat(chatMessagesSession.getPrivateMessages(user.userId, user.name)); | ||
} | ||
} | ||
} | ||
} | ||
|
||
override public function destroy():void { | ||
uiSession.chatInfoSignal.remove(onChatInfoSignal); | ||
|
||
super.destroy(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
.../presentation/views/PresentationConfig.as → ...on/web/presentation/PresentationConfig.as
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters