Author: sebawagner
Date: Sat May 5 07:39:41 2012
New Revision: 1334330
URL: http://svn.apache.org/viewvc?rev=1334330&view=rev
Log:
OPENMEETINGS-195 Send private message / Show user profile buttons
Removed:
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/tabcontent/chat/chatOutputRoomsList.lzx
Modified:
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/tabcontent/chat/chatOutput.lzx
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/tabcontent/chat/chatTabItemEmoticons.lzx
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/tabcontent/chat/library.lzx
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/ChatService.java
Modified:
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/tabcontent/chat/chatOutput.lzx
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/tabcontent/chat/chatOutput.lzx?rev=1334330&r1=1334329&r2=1334330&view=diff
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/tabcontent/chat/chatOutput.lzx
(original)
+++
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/tabcontent/chat/chatOutput.lzx
Sat May 5 07:39:41 2012
@@ -106,24 +106,35 @@
//this._cbtext.setAttribute('text',this._cbtext.text+newmessage);
var usercolor = value[5];
- var isDirectLink = false;
+ var isDirectLink = null;
+ if (value[8] > 0) {
+ isDirectLink = false;
+ } else {
+ isDirectLink = true;
+ }
+
if (canvas.isinitRoomDirect || canvas.remoteUserLogin
|| canvas.directUserLogin ||
canvas.secureRemoteUserLogin) {
isDirectLink = true;
}
if ( usercolor==null || usercolor==0 || usercolor.length==0
)usercolor=0xCCCCCC;
- //new
lz.chatTabitem(this._cbtext,{cbtext:newmessage,user_id:value[8],usercolor:usercolor,username:username,usertime:value[1]});
+
+
+
+ if ($debug) Debug.write("addChatHistory userID:
",value[8],isDirectLink);
+
new lz.chatTabItemEmoticons(this._cbtext,{
- messageObj:messageObj,
- user_id:value[8],
- publicSID:value[6],
- message:value[4],
- picture_uri:client.picture_uri,
- usercolor:usercolor,
- username:username,
- isDirectLink:isDirectLink,
- usertime:value[1]
- });
+ messageObj:messageObj,
+ user_id:value[8],
+ publicSID:value[6],
+ message:value[4],
+ picture_uri:client.picture_uri,
+ usercolor:usercolor,
+ username:username,
+ isDirectLink:isDirectLink,
+ usertime:value[1]
+ });
+
this.setScrollToMax();
]]>
</method>
Modified:
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/tabcontent/chat/chatTabItemEmoticons.lzx
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/tabcontent/chat/chatTabItemEmoticons.lzx?rev=1334330&r1=1334329&r2=1334330&view=diff
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/tabcontent/chat/chatTabItemEmoticons.lzx
(original)
+++
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/tabcontent/chat/chatTabItemEmoticons.lzx
Sat May 5 07:39:41 2012
@@ -95,18 +95,22 @@
name="header_user">
</text>
- <miniIconsImage name="add" src="$once{
canvas.getThemeImage('edit_add_rsc') }" width="16" height="16"
- y="2" x="$once{ parent.width - 122 }" showhandcursor="true">
- <handler name="onclick">
- if ($debug) Debug.write("Start Conference");
- if (hib.userobject.user_id == parent.user_id) {
- new lz.labelerrorPopup(canvas,{errorlabelid:1225});
- return;
- }
- parent.requestUserToContactList.doCall();
- </handler>
- <labelTooltip labelid="1186" />
- </miniIconsImage>
+ <state applied="$once{ !parent.isDirectLink }">
+
+ <miniIconsImage name="add" src="$once{
canvas.getThemeImage('edit_add_rsc') }" width="16" height="16"
+ y="2" x="$once{ parent.width - 122 }"
showhandcursor="true">
+ <handler name="onclick">
+ if ($debug) Debug.write("Start Conference");
+ if (hib.userobject.user_id == parent.user_id) {
+ new lz.labelerrorPopup(canvas,{errorlabelid:1225});
+ return;
+ }
+ parent.requestUserToContactList.doCall();
+ </handler>
+ <labelTooltip labelid="1186" />
+ </miniIconsImage>
+
+ </state>
<!--
public Long requestUserToContactList(String SID, Long userToAdd_id,
@@ -229,48 +233,53 @@
</text>
- <miniIcons name="private_message_add" resource="private_message_add_rsc"
width="16" height="16"
- y="0" x="$once{ parent.width - 104 }" showhandcursor="true">
- <handler name="onclick">
- if ($debug) Debug.write("Start Conference");
- new lz.newPrivateMessage(canvas,{
- x:200,y:120,
- refObj:null,
- minimizable:true,
- maximizable:true,
- userObject:null,
- isdragable:true,
- user_id:parent.user_id,
- width:canvas.width-300,
- height:canvas.height-130
- });
- </handler>
- <labelTooltip labelid="1253" />
- </miniIcons>
+ <state applied="$once{ !parent.isDirectLink }">
+
+ <miniIcons name="private_message_add"
resource="private_message_add_rsc" width="16" height="16"
+ y="0" x="$once{ parent.width - 104 }"
showhandcursor="true">
+ <handler name="onclick">
+ if ($debug) Debug.write("Start Conference");
+ new lz.newPrivateMessage(canvas,{
+ x:200,y:120,
+ refObj:null,
+ minimizable:true,
+ maximizable:true,
+ userObject:null,
+ isdragable:true,
+ user_id:parent.user_id,
+ width:canvas.width-300,
+ height:canvas.height-130
+ });
+ </handler>
+ <labelTooltip labelid="1253" />
+ </miniIcons>
+
+ <miniIcons resource="user_profile_rsc" width="16" height="16"
+ y="0" x="$once{ parent.width - 84 }"
showhandcursor="true">
+ <handler name="onclick">
+ if ($debug) Debug.write("Start Conference");
+ new lz.viewUserProfileWindow(canvas,{
+ userId:parent.user_id
+ });
+ </handler>
+ <labelTooltip labelid="1236" />
+ </miniIcons>
+
+ <miniIcons y="0" x="$once{ parent.width - 64 }"
+ resource="start_conference2_rsc" width="16"
height="16"
+ showhandcursor="true">
+ <handler name="onclick">
+ if ($debug) Debug.write("Start Conference");
+ new lz.chatParticipantsInviteConference(canvas,{
+ publicSID:parent.publicSID,
+ user_id:parent.user_id
+ });
+ </handler>
+ <labelTooltip labelid="1131" />
+ </miniIcons>
- <miniIcons resource="user_profile_rsc" width="16" height="16"
- y="0" x="$once{ parent.width - 84 }" showhandcursor="true">
- <handler name="onclick">
- if ($debug) Debug.write("Start Conference");
- new lz.viewUserProfileWindow(canvas,{
- userId:parent.user_id
- });
- </handler>
- <labelTooltip labelid="1236" />
- </miniIcons>
-
- <miniIcons visible="$once{ !parent.isDirectLink }" y="0" x="$once{
parent.width - 64 }"
- resource="start_conference2_rsc" width="16" height="16"
- showhandcursor="true">
- <handler name="onclick">
- if ($debug) Debug.write("Start Conference");
- new lz.chatParticipantsInviteConference(canvas,{
- publicSID:parent.publicSID,
- user_id:parent.user_id
- });
- </handler>
- <labelTooltip labelid="1131" />
- </miniIcons>
+ </state>
+
<text text="$once{ parent.usertime+' ' }" align="right"
fgcolor="0xAAAAAA"
fontsize="10" name="header_time" />
Modified:
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/tabcontent/chat/library.lzx
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/tabcontent/chat/library.lzx?rev=1334330&r1=1334329&r2=1334330&view=diff
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/tabcontent/chat/library.lzx
(original)
+++
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/tabcontent/chat/library.lzx
Sat May 5 07:39:41 2012
@@ -29,7 +29,6 @@
<include href="showChatLog.lzx" />
<include href="baseTabChatPanel.lzx" />
<include href="chatTabBottomRoomList.lzx" />
- <include href="chatOutputRoomsList.lzx" />
<include href="chatTabItem.lzx" />
<include href="chatTabItemEmoticons.lzx" />
<include href="chatOutput.lzx" />
Modified:
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/ChatService.java
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/ChatService.java?rev=1334330&r1=1334329&r2=1334330&view=diff
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/ChatService.java
(original)
+++
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/ChatService.java
Sat May 5 07:39:41 2012
@@ -56,13 +56,11 @@ public class ChatService implements IPen
private ScopeApplicationAdapter scopeApplicationAdapter;
@Autowired
private ClientListManager clientListManager = null;
- @Autowired
- private EmoticonsManager emoticonsManager = null;
- //the overall chatroom is jsut another room
+ //the overall chat room is just another room
private static final Long overallChatRoomName = new Long(-1);
- //number of items in the Chatroom history
+ //number of items in the chat room history
private static final int chatRoomHistory = 50;
private static LinkedHashMap<Long,List<HashMap<String,Object>>> myChats
= new LinkedHashMap<Long,List<HashMap<String,Object>>>();
@@ -142,21 +140,27 @@ public class ChatService implements IPen
RoomClient rcl =
this.clientListManager.getClientByStreamId(conn.getClient().getId());
+ if (rcl == null) {
+ continue;
+ }
+ if (rcl.getIsAVClient() == null
|| rcl.getIsAVClient()) {
+ continue;
+ }
if (rcl.getIsScreenClient() !=
null && rcl.getIsScreenClient()) {
- //continue;
- } else {
- log.debug("*..*idremote
room_id: " + room_id);
- log.debug("*..*my
idstreamid room_id: " + rcl.getRoom_id());
- if (room_id!=null &&
room_id.equals(rcl.getRoom_id())) {
-
((IServiceCapableConnection) conn).invoke("sendVarsToMessageWithClient",new
Object[] { hsm }, this);
-
log.debug("sending sendVarsToMessageWithClient to " + conn);
- } else if
(rcl.getIsChatNotification()) {
- if
(room_id.equals(rcl.getChatUserRoomId()) && room_id != null) {
-
((IServiceCapableConnection) conn).invoke("sendVarsToMessageWithClient",new
Object[] { hsm }, this);
- }
- }
+ continue;
}
+ log.debug("*..*idremote
room_id: " + room_id);
+ log.debug("*..*my idstreamid
room_id: " + rcl.getRoom_id());
+ if (room_id!=null &&
room_id.equals(rcl.getRoom_id())) {
+
((IServiceCapableConnection) conn).invoke("sendVarsToMessageWithClient",new
Object[] { hsm }, this);
+ log.debug("sending
sendVarsToMessageWithClient to " + conn);
+ } else if
(rcl.getIsChatNotification()) {
+ if
(room_id.equals(rcl.getChatUserRoomId()) && room_id != null) {
+
((IServiceCapableConnection) conn).invoke("sendVarsToMessageWithClient",new
Object[] { hsm }, this);
+ }
+ }
+
}
}
}
@@ -185,23 +189,7 @@ public class ChatService implements IPen
HashMap<String,Object> hsm = new
HashMap<String,Object>();
- //broadcast to everybody in the room/domain
- Collection<Set<IConnection>> conCollection =
current.getScope().getConnections();
- for (Set<IConnection> conset : conCollection) {
- for (IConnection conn : conset) {
- if (conn != null) {
- if (conn instanceof
IServiceCapableConnection) {
-
- RoomClient rcl =
this.clientListManager.getClientByStreamId(conn.getClient().getId());
- if (!rcl.getIsScreenClient()) {
-
log.debug("*..*idremote: " + rcl.getStreamid());
- log.debug("*..*my
idstreamid: " + currentClient.getStreamid());
-
((IServiceCapableConnection) conn).invoke("clearChatContent",new Object[] { hsm
}, this);
- }
- }
- }
- }
- }
+
scopeApplicationAdapter.syncMessageToCurrentScope("clearChatContent", hsm,
true);
return myChatList;
@@ -343,23 +331,7 @@ public class ChatService implements IPen
log.debug("SET CHATROOM: "+overallChatRoomName);
- //broadcast to everybody in the room/domain
- Collection<Set<IConnection>> conCollection =
current.getScope().getConnections();
- for (Set<IConnection> conset : conCollection) {
- for (IConnection conn : conset) {
- if (conn != null) {
- if (conn instanceof
IServiceCapableConnection) {
-
- RoomClient rcl =
this.clientListManager.getClientByStreamId(conn.getClient().getId());
- if (!rcl.getIsScreenClient()) {
-
log.debug("*..*idremote: " + rcl.getStreamid());
- log.debug("*..*my
idstreamid: " + currentClient.getStreamid());
-
((IServiceCapableConnection) conn).invoke("sendVarsToOverallChat",new Object[]
{ hsm }, this);
- }
- }
- }
- }
- }
+
scopeApplicationAdapter.syncMessageToCurrentScope("sendVarsToOverallChat", hsm,
true);
} catch (Exception err) {
log.error("[ChatService sendMessageToOverallChat]
",err);