This is an automated email from the ASF dual-hosted git repository.
solomax pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openmeetings.git
The following commit(s) were added to refs/heads/master by this push:
new 1393c87 [OPENMEETINGS-1649] initial commit on WB generalization
1393c87 is described below
commit 1393c8736ad232e3a85d8097035b9314cb0328b4
Author: Maxim Solodovnik <[email protected]>
AuthorDate: Fri Aug 31 14:38:43 2018 +0700
[OPENMEETINGS-1649] initial commit on WB generalization
---
.../src/site/xdoc/BuildInstructions.xml | 6 ------
openmeetings-web/pom.xml | 4 ++--
.../openmeetings/web/room/wb/raw-interview-area.js | 6 +++---
.../apache/openmeetings/web/room/wb/raw-wb-all.js | 15 ---------------
.../openmeetings/web/room/wb/raw-wb-area-base.js | 22 ++++++++++++++++++++++
.../apache/openmeetings/web/room/wb/raw-wb-area.js | 6 +++---
6 files changed, 30 insertions(+), 29 deletions(-)
diff --git a/openmeetings-server/src/site/xdoc/BuildInstructions.xml
b/openmeetings-server/src/site/xdoc/BuildInstructions.xml
index a5c4a6f..6865c5d 100644
--- a/openmeetings-server/src/site/xdoc/BuildInstructions.xml
+++ b/openmeetings-server/src/site/xdoc/BuildInstructions.xml
@@ -69,12 +69,6 @@ MAVEN_OPTS='-Xdebug
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=
cd ..; mvn clean install -PallModules,quick,mysql -pl
openmeetings-util,openmeetings-core; cd openmeetings-web; MAVEN_OPTS='-Xdebug
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n' mvn clean -P
allModules,quick,mysql jetty:run-exploded
]]></source>
- <p>To compile only client you can run following
command: </p>
- <source>
-<![CDATA[
-mvn install -P allModules -pl openmeetings-flash # compiles a
complete package into the folder openmeetings-flash/target
-]]>
- </source>
<p>In case you would like to develop Openmeetings you
need to run <i>"unpacked"</i> build: </p>
<source>
<;
- }
- } catch (err) {
- //no-op
- }
-}
diff --git
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/raw-wb-area-base.js
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/raw-wb-area-base.js
new file mode 100644
index 0000000..6a0f4b6
--- /dev/null
+++
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/raw-wb-area-base.js
@@ -0,0 +1,22 @@
+/* Licensed under the Apache License, Version 2.0 (the "License")
http://www.apache.org/licenses/LICENSE-2.0 */
+var NONE = 'none';
+var BaseWbArea = function() {
+ const self = {};
+
+ function _wbWsHandler(jqEvent, msg) {
+ try {
+ if (msg instanceof Blob) {
+ return; //ping
+ }
+ const m = jQuery.parseJSON(msg);
+ if (m && 'wb' === m.type && typeof(WbArea) !==
'undefined' && !!m.func) {
+ WbArea[m.func](m.param);
+ }
+ } catch (err) {
+ //no-op
+ }
+ }
+
+ self.wbWsHandler = _wbWsHandler;
+ return self;
+};
diff --git
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/raw-wb-area.js
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/raw-wb-area.js
index 2aa4b21..f404c35 100644
---
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/raw-wb-area.js
+++
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/raw-wb-area.js
@@ -2,7 +2,7 @@
var PRESENTER = 'presenter';
var WHITEBOARD = 'whiteBoard';
var DrawWbArea = function() {
- const self = {};
+ const self = BaseWbArea();;
let container, area, tabs, scroll, role = NONE, _inited = false;
function refreshTabs() {
@@ -156,7 +156,7 @@ var DrawWbArea = function() {
wbAction('activateWb', JSON.stringify({wbId: _wbId}));
}
self.init = function() {
- Wicket.Event.subscribe('/websocket/message', wbWsHandler);
+ Wicket.Event.subscribe('/websocket/message', self.wbWsHandler);
container = $('.room.wb.area');
tabs = container.find('.tabs');
if (tabs.length === 0) return;
@@ -191,7 +191,7 @@ var DrawWbArea = function() {
};
self.destroy = function() {
self.removeDeleteHandler();
- Wicket.Event.unsubscribe('/websocket/message', wbWsHandler);
+ Wicket.Event.unsubscribe('/websocket/message',
self.wbWsHandler);
};
self.create = function(obj) {
if (!_inited) return;