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 2018/08/09 07:41:13 UTC

[openmeetings] branch 4.0.x updated: [OPENMEETINGS-1142] additional JS changes for IE

This is an automated email from the ASF dual-hosted git repository.

solomax pushed a commit to branch 4.0.x
in repository https://gitbox.apache.org/repos/asf/openmeetings.git


The following commit(s) were added to refs/heads/4.0.x by this push:
     new 70fe760  [OPENMEETINGS-1142] additional JS changes for IE
70fe760 is described below

commit 70fe760213daa6c16a0b497f51e846ec82797c3b
Author: Maxim Solodovnik <so...@gmail.com>
AuthorDate: Thu Aug 9 14:41:05 2018 +0700

    [OPENMEETINGS-1142] additional JS changes for IE
---
 .../org/apache/openmeetings/web/room/raw-video.js  | 10 +++++++--
 .../openmeetings/web/room/wb/raw-interview-area.js | 24 ++++++++++++++++------
 2 files changed, 26 insertions(+), 8 deletions(-)

diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video.js b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video.js
index 12f0880..f21125d 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video.js
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video.js
@@ -233,6 +233,12 @@ var Video = (function() {
 		}
 		vc = v.find('.video');
 		vc.width(_w).height(_h);
+		_reinitSwf();
+		v.dialog('widget').css(_pos);
+	}
+	function _reinitSwf() {
+		const _id = VideoUtil.getVid(c.uid);
+		swf && swf.remove();
 		//broadcast
 		const o = Room.getOptions();
 		if (c.self) {
@@ -254,8 +260,7 @@ var Video = (function() {
 		o.type = c.type;
 		delete o.keycode;
 		swf = initSwf(vc, 'main.swf', _id + '-swf', o);
-		swf.attr('width', _w).attr('height', _h);
-		v.dialog('widget').css(_pos);
+		swf.attr('width', vc.width()).attr('height', vc.height());
 	}
 	function _update(_c) {
 		const opts = Room.getOptions();
@@ -316,5 +321,6 @@ var Video = (function() {
 	self.setRights = _setRights;
 	self.cleanup = _cleanup;
 	self.resizePod = _resizePod;
+	self.reinitSwf = _reinitSwf;
 	return self;
 });
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 8887d1b..23b3ce8 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
@@ -17,19 +17,27 @@ var InterviewWbArea = function() {
 		}).click(function() {
 			wbAction($(this).data('mode') === 'rec' ? 'startRecording' : 'stopRecording', '');
 		});
-		pArea.find('.pod-big').droppable({
+		const bigSel = '.wb-area .pod-area .pod-big'
+			, big = pArea.find('.pod-big');
+		big.droppable({
 			accept: '.pod'
 			, activeClass: 'ui-hightlight'
 			, drop: function(event, ui) {
-				const big = $(this)
-					, vid = ui.draggable.find('.ui-dialog-content')
+				const vid = ui.draggable.find('.ui-dialog-content')
 					, cvid = big.find('.ui-dialog-content');
 				if (cvid.length === 0) {
-					vid.dialog('option', 'appendTo', big);
+					vid.dialog('option', 'appendTo', bigSel);
 					ui.draggable.remove();
+					if (OmUtil.isIe()) {
+						vid.data().reinitSwf();
+					}
 				} else {
-					cvid.dialog('option', 'appendTo', ui.draggable);
-					vid.dialog('option', 'appendTo', big);
+					cvid.dialog('option', 'appendTo', '#' + ui.draggable.attr('id'));
+					vid.dialog('option', 'appendTo', bigSel);
+					if (OmUtil.isIe()) {
+						vid.data().reinitSwf();
+						cvid.data().reinitSwf();
+					}
 				}
 				pArea.find('.ui-sortable-placeholder.pod').hide();
 				_updateAreaClass();
@@ -44,6 +52,9 @@ var InterviewWbArea = function() {
 			}
 			, stop: function(event, ui) {
 				OmUtil.log('stopped');
+				if (OmUtil.isIe()) {
+					ui.item.find('.ui-dialog-content').data().reinitSwf();
+				}
 				_ieLayout();
 			}
 		});
@@ -80,6 +91,7 @@ var InterviewWbArea = function() {
 	}
 	function _ieLayout() {
 		if (OmUtil.isIe()) {
+			pArea.find('.pod.ui-sortable-helper').css('-ms-grid-row', '').css('-ms-grid-column', '');;
 			const pods = pArea.find('.pod:not(.ui-sortable-helper)')
 				, count = pods.length
 			if (count < 2) {