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>
 <![CDATA[
diff --git a/openmeetings-web/pom.xml b/openmeetings-web/pom.xml
index 676726b..db90eeb 100644
--- a/openmeetings-web/pom.xml
+++ b/openmeetings-web/pom.xml
@@ -132,7 +132,7 @@
                                                        <charset>UTF-8</charset>
                                                        
<jsSourceDir>../java/org/apache/openmeetings/web/room/wb</jsSourceDir>
                                                        <jsSourceFiles>
-                                                               
<jsSourceFile>raw-wb-all.js</jsSourceFile>
+                                                               
<jsSourceFile>raw-wb-area-base.js</jsSourceFile>
                                                                
<jsSourceFile>raw-interview-area.js</jsSourceFile>
                                                        </jsSourceFiles>
                                                        
<jsFinalFile>interviewwb.js</jsFinalFile>
@@ -152,7 +152,7 @@
                                                                
<jsSourceFile>fabric.js</jsSourceFile>
                                                                
<jsSourceFile>MathJax-config.js</jsSourceFile>
                                                                
<jsSourceFile>MathJax.js</jsSourceFile>
-                                                               
<jsSourceFile>raw-wb-all.js</jsSourceFile>
+                                                               
<jsSourceFile>raw-wb-area-base.js</jsSourceFile>
                                                                
<jsSourceFile>raw-tool-util.js</jsSourceFile>
                                                                
<jsSourceFile>raw-player.js</jsSourceFile>
                                                                
<jsSourceFile>raw-tool-base.js</jsSourceFile>
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/raw-interview-area.js
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/raw-interview-area.js
index e0d7c48..d46738b 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/raw-interview-area.js
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/raw-interview-area.js
@@ -1,11 +1,11 @@
 /* Licensed under the Apache License, Version 2.0 (the "License") 
http://www.apache.org/licenses/LICENSE-2.0 */
 var InterviewWbArea = function() {
-       const self = {};
+       const self = BaseWbArea();;
        let container, area, pArea, role = NONE, choose
                , _inited = false, rec;
 
        function _init() {
-               Wicket.Event.subscribe("/websocket/message", wbWsHandler);
+               Wicket.Event.subscribe("/websocket/message", self.wbWsHandler);
                container = $(".room.wb.area");
                area = container.find(".wb-area");
                pArea = area.find(".pod-area");
@@ -106,7 +106,7 @@ var InterviewWbArea = function() {
 
        self.init = _init;
        self.destroy = function() {
-               Wicket.Event.unsubscribe("/websocket/message", wbWsHandler);
+               Wicket.Event.unsubscribe("/websocket/message", 
self.wbWsHandler);
        };
        self.setRole = _setRole;
        self.resize = _resize;
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/raw-wb-all.js
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/raw-wb-all.js
deleted file mode 100644
index 0764189..0000000
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/raw-wb-all.js
+++ /dev/null
@@ -1,15 +0,0 @@
-/* Licensed under the Apache License, Version 2.0 (the "License") 
http://www.apache.org/licenses/LICENSE-2.0 */
-var NONE = 'none';
-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
-       }
-}
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;

Reply via email to