You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by so...@apache.org on 2017/10/30 04:18:49 UTC

openmeetings git commit: [OPENMEETINGS-1731] room without WB works as expected

Repository: openmeetings
Updated Branches:
  refs/heads/4.0.x f71068a40 -> f462cf3fc


[OPENMEETINGS-1731] room without WB works as expected


Project: http://git-wip-us.apache.org/repos/asf/openmeetings/repo
Commit: http://git-wip-us.apache.org/repos/asf/openmeetings/commit/f462cf3f
Tree: http://git-wip-us.apache.org/repos/asf/openmeetings/tree/f462cf3f
Diff: http://git-wip-us.apache.org/repos/asf/openmeetings/diff/f462cf3f

Branch: refs/heads/4.0.x
Commit: f462cf3fccc1f4e40f534fe441aa7ccd067bfd68
Parents: f71068a
Author: Maxim Solodovnik <so...@gmail.com>
Authored: Mon Oct 30 11:18:41 2017 +0700
Committer: Maxim Solodovnik <so...@gmail.com>
Committed: Mon Oct 30 11:18:41 2017 +0700

----------------------------------------------------------------------
 .../main/java/org/apache/openmeetings/web/room/room.js  |  7 ++++++-
 .../java/org/apache/openmeetings/web/room/wb/wb-area.js | 12 +++++++++---
 2 files changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/openmeetings/blob/f462cf3f/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/room.js
----------------------------------------------------------------------
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/room.js b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/room.js
index 5901316..1abd551 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/room.js
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/room.js
@@ -1,5 +1,7 @@
 /* Licensed under the Apache License, Version 2.0 (the "License") http://www.apache.org/licenses/LICENSE-2.0 */
-const WBA_SEL = '.room.wb.area .ui-tabs-panel.ui-corner-bottom.ui-widget-content:visible';
+const WB_AREA_SEL = '.room.wb.area';
+const WBA_WB_SEL = '.room.wb.area .ui-tabs-panel.ui-corner-bottom.ui-widget-content:visible';
+var WBA_SEL = WB_AREA_SEL;
 const VID_SEL = '.video.user-video';
 var VideoUtil = (function() {
 	const self = {};
@@ -366,6 +368,9 @@ var VideoManager = (function() {
 	let share, inited = false;
 
 	function _init() {
+		if ($(WB_AREA_SEL + ' .wb-area .tabs').length > 0) {
+			WBA_SEL = WBA_WB_SEL;
+		}
 		VideoSettings.init(Room.getOptions());
 		share = $('.room.box').find('.icon.shared.ui-button');
 		inited = true;

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/f462cf3f/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/wb-area.js
----------------------------------------------------------------------
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/wb-area.js b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/wb-area.js
index 7cc8561..d49721b 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/wb-area.js
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/wb-area.js
@@ -151,7 +151,9 @@ var DrawWbArea = function() {
 	}
 	self.init = function() {
 		container = $(".room.wb.area");
-		tabs = container.find('.tabs').tabs({
+		tabs = container.find('.tabs');
+		if (tabs.length === 0) return;
+		tabs.tabs({
 			beforeActivate: function(e) {
 				let res = true;
 				if (e.originalEvent && e.originalEvent.type === 'click') {
@@ -241,9 +243,9 @@ var DrawWbArea = function() {
 		refreshTabs();
 	};
 	self.resize = function(posX, w, h) {
-		if (!container || !_inited) return;
 		const hh = h - 5;
 		container.width(w).height(h).css('left', (isRtl ? 0 : posX) + "px");
+		if (!container || !_inited) return;
 		area.width(w).height(hh);
 
 		const wbTabs = area.find(".tabs.ui-tabs");
@@ -255,6 +257,7 @@ var DrawWbArea = function() {
 		self.getWb(json.wbId).setSize(json);
 	}
 	self.download = function(fmt) {
+		if (!_inited) return;
 		const wb = getActive().data();
 		if ('pdf' === fmt) {
 			const arr = [];
@@ -274,7 +277,10 @@ var DrawWbArea = function() {
 		}
 	}
 	self.videoStatus = _videoStatus;
-	self.loadVideos = function() { wbAction('loadVideos'); };
+	self.loadVideos = function() {
+		if (!_inited) return;
+		wbAction('loadVideos');
+	};
 	self.initVideos = _initVideos;
 	return self;
 };