Author: solomax
Date: Wed Jul 20 14:30:06 2016
New Revision: 1753521
URL: http://svn.apache.org/viewvc?rev=1753521&view=rev
Log:
[OPENMEETINGS-1030] more work of files section: files drop
Added:
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/webapp/css/images/typing.gif
(with props)
openmeetings/application/trunk/openmeetings-web/src/main/webapp/css/images/typing.gif
(with props)
Removed:
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/resources/base0.png
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/resources/base1.png
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/resources/base2.png
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/resources/base3.png
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/typing.lzx
Modified:
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/hibernate/hibRtmpConnection.lzx
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/library.lzx
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileTreePanel.html
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/room.js
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomClientPanel.html
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/webapp/css/room.css
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileTreePanel.html
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/room.js
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomClientPanel.html
openmeetings/application/trunk/openmeetings-web/src/main/webapp/css/room.css
Modified:
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java?rev=1753521&r1=1753520&r2=1753521&view=diff
==============================================================================
---
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
(original)
+++
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
Wed Jul 20 14:30:06 2016
@@ -21,6 +21,7 @@ package org.apache.openmeetings.core.rem
import static org.apache.openmeetings.util.OpenmeetingsVariables.webAppRootKey;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
@@ -29,6 +30,7 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.UUID;
import java.util.concurrent.atomic.AtomicLong;
import org.apache.openmeetings.IApplication;
@@ -49,6 +51,7 @@ import org.apache.openmeetings.db.dao.se
import org.apache.openmeetings.db.dao.user.UserDao;
import org.apache.openmeetings.db.dto.room.BrowserStatus;
import org.apache.openmeetings.db.dto.room.RoomStatus;
+import org.apache.openmeetings.db.entity.file.FileItem;
import org.apache.openmeetings.db.entity.log.ConferenceLog;
import org.apache.openmeetings.db.entity.room.Client;
import org.apache.openmeetings.db.entity.room.Room;
@@ -1342,24 +1345,78 @@ public class ScopeApplicationAdapter ext
*
* @param whiteboardObjParam - array of parameters being sended to
whiteboard
* @param whiteboardId - id of whiteboard parameters will be send to
+ * @return 1 in case of no errors, -1 otherwise
*/
public int sendVarsByWhiteboardId(List<?> whiteboardObjParam, Long
whiteboardId) {
try {
+ IConnection current = Red5.getConnectionLocal();
+ Client client =
sessionManager.getClientByStreamId(current.getClient().getId(), null);
+ return sendToWhiteboard(client, whiteboardObjParam,
whiteboardId);
+ } catch (Exception err) {
+ log.error("[sendVarsByWhiteboardId]", err);
+ return -1;
+ }
+ }
+
+ public void sendToWhiteboard(String uid, Long wbId, FileItem fi, String
url) {
+ int width = 0, height = 0;
+ if (fi.getFlvWidth() != null && fi.getFlvHeight() != null) {
+ width = fi.getFlvWidth();
+ height = fi.getFlvHeight();
+ }
+ String fuid = UUID.randomUUID().toString();
+ Client client =
sessionManager.getClientByPublicSIDAnyServer(uid).getRcl();
+
+ sendToWhiteboard(client, Arrays.asList(
+ "whiteboard"
+ , new Date()
+ , "draw"
+ , Arrays.asList(
+ "swf" // 0
+ , url // urlname
+ , "--dummy--" // baseurl
+ , fi.getHash() // fileName //3
+ , "--dummy--" // moduleName //4
+ , "--dummy--" // parentPath //5
+ , "--dummy--" // room //6
+ , "--dummy--" // domain //7
+ , 1 // slideNumber //8
+ , 0 // innerx //9
+ , 0 // innery //10
+ , width // innerwidth //11
+ , height // innerheight //12
+ , 20 // zoomlevel //13
+ , width // initwidth //14
+ , height // initheight //15
+ , 100 // currentzoom //16 FIXME TODO
+ , fuid // uniquObjectSyncName //17
+ , fi.getName() // standardFileName //18
+ , true // fullFit //19 FIXME TODO
+ , 1 // zIndex //-8 FIXME TODO
+ , null //-7
+ , 0 // this.counter //-6 FIXME TODO
+ , 0 // posx //-5
+ , 0 // posy //-4
+ , width // width //-3
+ , height // height //-2
+ , fuid // this.currentlayer.name //-1
+ )), wbId);
+ }
+
+ private int sendToWhiteboard(Client client, List<?> wbObj, Long wbId) {
+ try {
+ // Check if this User is the Mod:
+ if (client == null) {
+ return -1;
+ }
+
Map<Integer, Object> whiteboardObj = new HashMap<>();
int i = 0;
- for (Object obj : whiteboardObjParam) {
+ for (Object obj : wbObj) {
whiteboardObj.put(i++, obj);
}
- // Check if this User is the Mod:
- IConnection current = Red5.getConnectionLocal();
- Client currentClient =
sessionManager.getClientByStreamId(current.getClient().getId(), null);
-
- if (currentClient == null) {
- return -1;
- }
-
- Long roomId = currentClient.getRoomId();
+ Long roomId = client.getRoomId();
// log.debug("***** sendVars: " + whiteboardObj);
@@ -1390,21 +1447,22 @@ public class ScopeApplicationAdapter ext
whiteboardTempObj.put(3,
tempActionObject);
-
whiteboardManagement.addWhiteBoardObjectById(roomId, whiteboardTempObj,
whiteboardId);
+
whiteboardManagement.addWhiteBoardObjectById(roomId, whiteboardTempObj, wbId);
}
} else {
-
whiteboardManagement.addWhiteBoardObjectById(roomId, whiteboardObj,
whiteboardId);
+
whiteboardManagement.addWhiteBoardObjectById(roomId, whiteboardObj, wbId);
}
Map<String, Object> sendObject = new HashMap<String,
Object>();
- sendObject.put("id", whiteboardId);
- sendObject.put("param", whiteboardObjParam);
+ sendObject.put("id", wbId);
+ sendObject.put("param", wbObj);
boolean showDrawStatus = getWhiteboardDrawStatus();
- sendMessageToCurrentScope("sendVarsToWhiteboardById",
new Object[]{showDrawStatus ? currentClient : null, sendObject}, false);
+ sendToScope(roomId, "sendVarsToWhiteboardById", new
Object[]{showDrawStatus ? client : null, sendObject});
} catch (Exception err) {
- log.error("[sendVarsByWhiteboardId]", err);
+ log.error("[sendToWhiteboard]", err);
+ return -1;
}
return 1;
}
@@ -1603,7 +1661,8 @@ public class ScopeApplicationAdapter ext
if (filter(conn)) {
continue;
}
-
((IServiceCapableConnection) conn).invoke(remoteMethodName, new Object[] {
newMessage }, ScopeApplicationAdapter.this);
+ Object[] msg =
newMessage instanceof Object[] ? (Object[])newMessage : new Object[] {
newMessage };
+
((IServiceCapableConnection) conn).invoke(remoteMethodName, msg,
ScopeApplicationAdapter.this);
count++;
}
}
Modified:
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/hibernate/hibRtmpConnection.lzx
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/hibernate/hibRtmpConnection.lzx?rev=1753521&r1=1753520&r2=1753521&view=diff
==============================================================================
---
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/hibernate/hibRtmpConnection.lzx
(original)
+++
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/hibernate/hibRtmpConnection.lzx
Wed Jul 20 14:30:06 2016
@@ -1026,15 +1026,15 @@
<method name="sendVarsToMessage" args="value">
<![CDATA[
//The onResult-Handler will be called be the
rtmpconnection
- //Debug.write("sendVarsToMessage : ",value);
+ //if ($debug) Debug.write("sendVarsToMessage : ",
value);
if (value[0]=='audioActivity'){
//canvas.currentModApply
//if ($debug) Debug.write("audioActivity Client
",value[1],value[2]);
canvas.commonVideoViewContent.setSpeakingByPos(value[2], value[1]);
ExternalInterface.call("audioActivity",
value[2], value[1]);
} else if (value[0]=='typingActivity'){
- if ($debug) Debug.write("!!!typingActivity ::",
value[1],
canvas._videocontainer._participants.getUserListItemByPublicSID(value[2]));
-
canvas._videocontainer._participants.getUserListItemByPublicSID(value[2]).userTyping(value[1]);
+ if ($debug) Debug.write("!!!typingActivity ::",
value[1], value[2]);
+ ExternalInterface.call("typingActivity",
value[2], value[1]);
} else if (value[0]=='activateWhiteboard'){
// Not Used
//Debug.warn("Not Used");
Modified:
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/library.lzx
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/library.lzx?rev=1753521&r1=1753520&r2=1753521&view=diff
==============================================================================
---
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/library.lzx
(original)
+++
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/library.lzx
Wed Jul 20 14:30:06 2016
@@ -23,22 +23,12 @@
<!-- FamFam Icon Set -->
<resource name="resyncuser_rsc" src="resources/arrow_refresh_small.png" />
- <!-- Derivative from FamFam Icon Set, author solomax -->
- <resource name="typing_rsc">
- <frame src="resources/base0.png" />
- <frame src="resources/base1.png" />
- <frame src="resources/base2.png" />
- <frame src="resources/base3.png" />
- </resource>
-
<!-- APL author sebawagner -->
<resource name="speaking" src="resources/speaking.png" />
<!-- APL author sebawagner -->
<resource name="lz_recorder_play" src="resources/webstart_play.png" />
- <include href="typing.lzx" />
-
<include href="whiteboard/" />
<include href="popups/" />
Modified:
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileTreePanel.html
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileTreePanel.html?rev=1753521&r1=1753520&r2=1753521&view=diff
==============================================================================
---
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileTreePanel.html
(original)
+++
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileTreePanel.html
Wed Jul 20 14:30:06 2016
@@ -24,7 +24,7 @@
function treeRevert(dropped) {
$('#tree-anchor').get(0).scrollIntoView();
this.parent().parent().get(0).scrollIntoView();
- return !dropped;
+ return !dropped || (!!dropped && !!dropped.context &&
$(dropped.context).hasClass('wb', 'room'));
}
</script>
<div class="file tree item drop area">
Modified:
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java?rev=1753521&r1=1753520&r2=1753521&view=diff
==============================================================================
---
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java
(original)
+++
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java
Wed Jul 20 14:30:06 2016
@@ -29,9 +29,7 @@ import static org.apache.wicket.ajax.att
import java.net.MalformedURLException;
import java.net.URL;
-import java.util.Arrays;
import java.util.Calendar;
-import java.util.UUID;
import org.apache.openmeetings.core.remote.red5.ScopeApplicationAdapter;
import org.apache.openmeetings.db.dao.basic.ConfigurationDao;
@@ -170,77 +168,11 @@ public class RoomPanel extends BasePanel
@Override
public void onDrop(AjaxRequestTarget target, Component
component) {
Object o = component.getDefaultModelObject();
- if (activeWbId > 0 && o instanceof FileItem) {
- //target.appendJavaScript("");
- /*
- 0: 'swf'
- 1: «string(223)|
'http://localhost:5080/openmeetings/DownloadHandler?fileName=97321ad42af97bee825988d3ab9a14fd.swf&moduleName=viâ¦Â»
- 2: «string(223)|
'http://localhost:5080/openmeetings/DownloadHandler?fileName=97321ad42af97bee825988d3ab9a14fd.swf&moduleName=viâ¦Â»
- 3: '97321ad42af97bee825988d3ab9a14fd.swf'
- 4: 'videoconf1'
- 5: '/97321ad42af97bee825988d3ab9a14fd'
- 6: 'files'
- 7: 'public'
- 8: 1
- 9: 0
- 10: 0
- 11: 354
- 12: 590
- 13: 20
- 14: 354
- 15: 590
- 16: 100
- 17: '97321ad42af97bee825988d3ab9a14fd.swf1464528901162'
- 18: 'DR600GW-HD_Manual_EN_WEB_Ver.1.01_140704.pdf'
- 19: true
- 20: 1
- 21: null
- 22: 0
- 23: 0
- 24: 0
- 25: 354
- 26: 590
- 27: 'swfpresentationobject_1464528901162'
-
- */
+ if (activeWbId > -1 && o instanceof FileItem) {
FileItem fi = (FileItem)o;
- int width = 0, height = 0;
- if (fi.getFlvWidth() != null &&
fi.getFlvHeight() != null) {
- width = fi.getFlvWidth();
- height = fi.getFlvHeight();
- }
- String fuid =
UUID.randomUUID().toString();
String url = urlFor(new
RoomSwfResourceReference(), new PageParameters().add("id",
fi.getId()).add("uid", getClient().getUid())).toString();
-
getBean(ScopeApplicationAdapter.class).sendVarsByWhiteboardId(Arrays.asList(
- "swf" // 0
- , url // urlname
- , "--dummy--" // baseurl
- , fi.getHash() //
fileName //3
- , "--dummy--" //
moduleName //4
- , "--dummy--" //
parentPath //5
- , "--dummy--" // room
//6
- , "--dummy--" // domain
//7
- , 1 // slideNumber //8
- , 0 // innerx //9
- , 0 // innery //10
- , width // innerwidth
//11
- , height // innerheight
//12
- , 20 // zoomlevel //13
- , width // initwidth
//14
- , height // initheight
//15
- , 100 // currentzoom
//16 FIXME TODO
- , fuid //
uniquObjectSyncName //17
- , fi.getName() //
standardFileName //18
- , true // fullFit //19
FIXME TODO
- , 1 // zIndex //-8
FIXME TODO
- , null //-7
- , 0 // this.counter
//-6 FIXME TODO
- , 0 // posx //-5
- , 0 // posy //-4
- , width // width //-3
- , height // height //-2
- , fuid //
this.currentlayer.name //-1
- ), activeWbId);
+ getBean(ScopeApplicationAdapter.class)
+
.sendToWhiteboard(getClient().getUid(), activeWbId, fi, url);
}
}
};
Modified:
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/room.js
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/room.js?rev=1753521&r1=1753520&r2=1753521&view=diff
==============================================================================
---
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/room.js
(original)
+++
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/room.js
Wed Jul 20 14:30:06 2016
@@ -88,10 +88,18 @@ function sipKeyUp(evt) {
/***** functions required by SWF ******/
function audioActivity(uid, active) {
- var u = $('#user' + uid + ' .user.actions .audio.activity.ui-icon');
+ var u = $('#user' + uid + ' .audio-activity.ui-icon');
if (active) {
u.addClass("speaking");
} else {
u.removeClass("speaking");
}
}
+function typingActivity(uid, active) {
+ var u = $('#user' + uid + ' .typing-activity.ui-icon');
+ if (active) {
+ u.addClass("typing");
+ } else {
+ u.removeClass("typing");
+ }
+}
Modified:
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomClientPanel.html
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomClientPanel.html?rev=1753521&r1=1753520&r2=1753521&view=diff
==============================================================================
---
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomClientPanel.html
(original)
+++
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomClientPanel.html
Wed Jul 20 14:30:06 2016
@@ -23,6 +23,7 @@
<span wicket:id="status" class="ui-icon align-right"></span>
<span wicket:id="refresh"></span>
<div wicket:id="name" class="user name"></div>
+ <span class="ui-icon align-right typing-activity"></span>
<span class="ui-icon align-right clickable audio-activity"
wicket:message="title:372"></span>
<div wicket:id="actions" class="user actions">
<span wicket:id="rights"></span>
Added:
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/webapp/css/images/typing.gif
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/webapp/css/images/typing.gif?rev=1753521&view=auto
==============================================================================
Binary file - no diff available.
Propchange:
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/webapp/css/images/typing.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified:
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/webapp/css/room.css
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/webapp/css/room.css?rev=1753521&r1=1753520&r2=1753521&view=diff
==============================================================================
---
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/webapp/css/room.css
(original)
+++
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/webapp/css/room.css
Wed Jul 20 14:30:06 2016
@@ -63,6 +63,7 @@
background-repeat: no-repeat;
background-position: 5px 5px;
float: right;
+ padding: 0;
}
.room.menu.right .icon.share {
background-image: url(images/monitor_go.png);
@@ -132,6 +133,7 @@
}
.room.sidebar.left .user.list .user .user.actions .ui-icon {
margin-right: 2px;
+ margin-top: 0;
}
.audio-activity.ui-icon.speaking, .ui-icon.moderator-right.granted,
.wb-right.ui-icon.granted
, .screen-share-right.ui-icon.granted, .remote-control-right.ui-icon.granted,
.exclsv-audio.ui-icon.granted
@@ -145,6 +147,14 @@
opacity: 0.2;
background-image: url(images/speaking.png);
}
+.typing-activity.ui-icon {
+ display: none;
+ width: 30px;
+ background-image: url(images/typing.gif);
+}
+.typing-activity.ui-icon.typing {
+ display: inline-block;
+}
.private-chat.ui-icon {
background-image: url(images/page_edit.png);
}
Modified:
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
URL:
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java?rev=1753521&r1=1753520&r2=1753521&view=diff
==============================================================================
---
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
(original)
+++
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
Wed Jul 20 14:30:06 2016
@@ -21,6 +21,7 @@ package org.apache.openmeetings.core.rem
import static org.apache.openmeetings.util.OpenmeetingsVariables.webAppRootKey;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
@@ -29,6 +30,7 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.UUID;
import java.util.concurrent.atomic.AtomicLong;
import org.apache.openmeetings.IApplication;
@@ -49,6 +51,7 @@ import org.apache.openmeetings.db.dao.se
import org.apache.openmeetings.db.dao.user.UserDao;
import org.apache.openmeetings.db.dto.room.BrowserStatus;
import org.apache.openmeetings.db.dto.room.RoomStatus;
+import org.apache.openmeetings.db.entity.file.FileItem;
import org.apache.openmeetings.db.entity.log.ConferenceLog;
import org.apache.openmeetings.db.entity.room.Client;
import org.apache.openmeetings.db.entity.room.Room;
@@ -1342,24 +1345,78 @@ public class ScopeApplicationAdapter ext
*
* @param whiteboardObjParam - array of parameters being sended to
whiteboard
* @param whiteboardId - id of whiteboard parameters will be send to
+ * @return 1 in case of no errors, -1 otherwise
*/
public int sendVarsByWhiteboardId(List<?> whiteboardObjParam, Long
whiteboardId) {
try {
+ IConnection current = Red5.getConnectionLocal();
+ Client client =
sessionManager.getClientByStreamId(current.getClient().getId(), null);
+ return sendToWhiteboard(client, whiteboardObjParam,
whiteboardId);
+ } catch (Exception err) {
+ log.error("[sendVarsByWhiteboardId]", err);
+ return -1;
+ }
+ }
+
+ public void sendToWhiteboard(String uid, Long wbId, FileItem fi, String
url) {
+ int width = 0, height = 0;
+ if (fi.getFlvWidth() != null && fi.getFlvHeight() != null) {
+ width = fi.getFlvWidth();
+ height = fi.getFlvHeight();
+ }
+ String fuid = UUID.randomUUID().toString();
+ Client client =
sessionManager.getClientByPublicSIDAnyServer(uid).getRcl();
+
+ sendToWhiteboard(client, Arrays.asList(
+ "whiteboard"
+ , new Date()
+ , "draw"
+ , Arrays.asList(
+ "swf" // 0
+ , url // urlname
+ , "--dummy--" // baseurl
+ , fi.getHash() // fileName //3
+ , "--dummy--" // moduleName //4
+ , "--dummy--" // parentPath //5
+ , "--dummy--" // room //6
+ , "--dummy--" // domain //7
+ , 1 // slideNumber //8
+ , 0 // innerx //9
+ , 0 // innery //10
+ , width // innerwidth //11
+ , height // innerheight //12
+ , 20 // zoomlevel //13
+ , width // initwidth //14
+ , height // initheight //15
+ , 100 // currentzoom //16 FIXME TODO
+ , fuid // uniquObjectSyncName //17
+ , fi.getName() // standardFileName //18
+ , true // fullFit //19 FIXME TODO
+ , 1 // zIndex //-8 FIXME TODO
+ , null //-7
+ , 0 // this.counter //-6 FIXME TODO
+ , 0 // posx //-5
+ , 0 // posy //-4
+ , width // width //-3
+ , height // height //-2
+ , fuid // this.currentlayer.name //-1
+ )), wbId);
+ }
+
+ private int sendToWhiteboard(Client client, List<?> wbObj, Long wbId) {
+ try {
+ // Check if this User is the Mod:
+ if (client == null) {
+ return -1;
+ }
+
Map<Integer, Object> whiteboardObj = new HashMap<>();
int i = 0;
- for (Object obj : whiteboardObjParam) {
+ for (Object obj : wbObj) {
whiteboardObj.put(i++, obj);
}
- // Check if this User is the Mod:
- IConnection current = Red5.getConnectionLocal();
- Client currentClient =
sessionManager.getClientByStreamId(current.getClient().getId(), null);
-
- if (currentClient == null) {
- return -1;
- }
-
- Long roomId = currentClient.getRoomId();
+ Long roomId = client.getRoomId();
// log.debug("***** sendVars: " + whiteboardObj);
@@ -1390,21 +1447,22 @@ public class ScopeApplicationAdapter ext
whiteboardTempObj.put(3,
tempActionObject);
-
whiteboardManagement.addWhiteBoardObjectById(roomId, whiteboardTempObj,
whiteboardId);
+
whiteboardManagement.addWhiteBoardObjectById(roomId, whiteboardTempObj, wbId);
}
} else {
-
whiteboardManagement.addWhiteBoardObjectById(roomId, whiteboardObj,
whiteboardId);
+
whiteboardManagement.addWhiteBoardObjectById(roomId, whiteboardObj, wbId);
}
Map<String, Object> sendObject = new HashMap<String,
Object>();
- sendObject.put("id", whiteboardId);
- sendObject.put("param", whiteboardObjParam);
+ sendObject.put("id", wbId);
+ sendObject.put("param", wbObj);
boolean showDrawStatus = getWhiteboardDrawStatus();
- sendMessageToCurrentScope("sendVarsToWhiteboardById",
new Object[]{showDrawStatus ? currentClient : null, sendObject}, false);
+ sendToScope(roomId, "sendVarsToWhiteboardById", new
Object[]{showDrawStatus ? client : null, sendObject});
} catch (Exception err) {
- log.error("[sendVarsByWhiteboardId]", err);
+ log.error("[sendToWhiteboard]", err);
+ return -1;
}
return 1;
}
@@ -1603,7 +1661,8 @@ public class ScopeApplicationAdapter ext
if (filter(conn)) {
continue;
}
-
((IServiceCapableConnection) conn).invoke(remoteMethodName, new Object[] {
newMessage }, ScopeApplicationAdapter.this);
+ Object[] msg =
newMessage instanceof Object[] ? (Object[])newMessage : new Object[] {
newMessage };
+
((IServiceCapableConnection) conn).invoke(remoteMethodName, msg,
ScopeApplicationAdapter.this);
count++;
}
}
Modified:
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileTreePanel.html
URL:
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileTreePanel.html?rev=1753521&r1=1753520&r2=1753521&view=diff
==============================================================================
---
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileTreePanel.html
(original)
+++
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileTreePanel.html
Wed Jul 20 14:30:06 2016
@@ -24,7 +24,7 @@
function treeRevert(dropped) {
$('#tree-anchor').get(0).scrollIntoView();
this.parent().parent().get(0).scrollIntoView();
- return !dropped;
+ return !dropped || (!!dropped && !!dropped.context &&
$(dropped.context).hasClass('wb', 'room'));
}
</script>
<div class="file tree item drop area">
Modified:
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/room.js
URL:
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/room.js?rev=1753521&r1=1753520&r2=1753521&view=diff
==============================================================================
---
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/room.js
(original)
+++
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/room.js
Wed Jul 20 14:30:06 2016
@@ -128,10 +128,18 @@ function sipKeyUp(evt) {
/***** functions required by SWF ******/
function audioActivity(uid, active) {
- var u = $('#user' + uid + ' .user.actions .audio.activity.ui-icon');
+ var u = $('#user' + uid + ' .audio-activity.ui-icon');
if (active) {
u.addClass("speaking");
} else {
u.removeClass("speaking");
}
}
+function typingActivity(uid, active) {
+ var u = $('#user' + uid + ' .typing-activity.ui-icon');
+ if (active) {
+ u.addClass("typing");
+ } else {
+ u.removeClass("typing");
+ }
+}
Modified:
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomClientPanel.html
URL:
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomClientPanel.html?rev=1753521&r1=1753520&r2=1753521&view=diff
==============================================================================
---
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomClientPanel.html
(original)
+++
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomClientPanel.html
Wed Jul 20 14:30:06 2016
@@ -23,6 +23,7 @@
<span wicket:id="status" class="ui-icon align-right"></span>
<span wicket:id="refresh"></span>
<div wicket:id="name" class="user name"></div>
+ <span class="ui-icon align-right typing-activity"></span>
<span class="ui-icon align-right clickable audio-activity"
wicket:message="title:372"></span>
<div wicket:id="actions" class="user actions">
<span wicket:id="rights"></span>
Added:
openmeetings/application/trunk/openmeetings-web/src/main/webapp/css/images/typing.gif
URL:
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/webapp/css/images/typing.gif?rev=1753521&view=auto
==============================================================================
Binary file - no diff available.
Propchange:
openmeetings/application/trunk/openmeetings-web/src/main/webapp/css/images/typing.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified:
openmeetings/application/trunk/openmeetings-web/src/main/webapp/css/room.css
URL:
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/webapp/css/room.css?rev=1753521&r1=1753520&r2=1753521&view=diff
==============================================================================
---
openmeetings/application/trunk/openmeetings-web/src/main/webapp/css/room.css
(original)
+++
openmeetings/application/trunk/openmeetings-web/src/main/webapp/css/room.css
Wed Jul 20 14:30:06 2016
@@ -63,6 +63,7 @@
background-repeat: no-repeat;
background-position: 5px 5px;
float: right;
+ padding: 0;
}
.room.menu.right .icon.share {
background-image: url(images/monitor_go.png);
@@ -132,6 +133,7 @@
}
.room.sidebar.left .user.list .user .user.actions .ui-icon {
margin-right: 2px;
+ margin-top: 0;
}
.audio-activity.ui-icon.speaking, .ui-icon.moderator-right.granted,
.wb-right.ui-icon.granted
, .screen-share-right.ui-icon.granted, .remote-control-right.ui-icon.granted,
.exclsv-audio.ui-icon.granted
@@ -145,6 +147,14 @@
opacity: 0.2;
background-image: url(images/speaking.png);
}
+.typing-activity.ui-icon {
+ display: none;
+ width: 30px;
+ background-image: url(images/typing.gif);
+}
+.typing-activity.ui-icon.typing {
+ display: inline-block;
+}
.private-chat.ui-icon {
background-image: url(images/page_edit.png);
}