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 2022/12/20 04:35:38 UTC

[openmeetings] branch master updated: [OPENMEETINGS-2754] full screen for WB

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 be1b691d4 [OPENMEETINGS-2754] full screen for WB
be1b691d4 is described below

commit be1b691d41a779e7e079d7642ff1d5d04a558ae0
Author: Maxim Solodovnik <so...@gmail.com>
AuthorDate: Tue Dec 20 11:35:23 2022 +0700

    [OPENMEETINGS-2754] full screen for WB
---
 openmeetings-web/src/main/front/wb/src/wb-area-base.js           | 8 ++++++++
 .../main/java/org/apache/openmeetings/web/room/wb/WbPanel.html   | 6 +++++-
 openmeetings-web/src/main/webapp/css/raw-wb.css                  | 9 +++++++++
 3 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/openmeetings-web/src/main/front/wb/src/wb-area-base.js b/openmeetings-web/src/main/front/wb/src/wb-area-base.js
index 70fc2208e..327a6ac21 100644
--- a/openmeetings-web/src/main/front/wb/src/wb-area-base.js
+++ b/openmeetings-web/src/main/front/wb/src/wb-area-base.js
@@ -16,6 +16,14 @@ module.exports = class WbAreaBase {
 		}
 
 		this.wsinit = () => {
+			$('.room-block .wb-block .wb-area .fullscreen').off().on('click', function() {
+				const area = this.closest('.wb-area');
+				if (document.fullscreenElement) {
+					document.exitFullscreen();
+				} else {
+					this.closest('.wb-area').requestFullscreen();
+				}
+			});
 			// it seems `super` can't be called from lambda
 			Wicket.Event.subscribe("/websocket/message", _wbWsHandler);
 		};
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/WbPanel.html b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/WbPanel.html
index 8a45d0765..d09ca69d1 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/WbPanel.html
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/WbPanel.html
@@ -27,7 +27,11 @@
 				<ul class="scrollable nav nav-tabs" role="tablist"></ul>
 			</div>
 		</div>
-		<div class="wb-tab-content tab-content"></div>
+		<div class="wb-tab-content tab-content">
+			<button type="button" class="fullscreen btn btn-outline-secondary">
+				<i class="fa-solid fa-up-right-and-down-left-from-center"></i>
+			</button>
+		</div>
 	</div>
 
 	<div hidden="hidden">
diff --git a/openmeetings-web/src/main/webapp/css/raw-wb.css b/openmeetings-web/src/main/webapp/css/raw-wb.css
index 74c00f9f2..e234e7a73 100644
--- a/openmeetings-web/src/main/webapp/css/raw-wb.css
+++ b/openmeetings-web/src/main/webapp/css/raw-wb.css
@@ -15,6 +15,7 @@ html[dir="rtl"] .room-block .sb-wb .wb-block {
 }
 .room-block .sb-wb .wb-block .wb-area {
 	height: 100%;
+	background-color: var(--bs-body-bg);
 }
 .room-block .sb-wb .wb-block.droppable-hover .wb-area {
 	visibility: hidden;
@@ -60,6 +61,14 @@ html[dir="rtl"] .room-block .sb-wb .wb-block {
 	height: calc(100% - var(--room-wb-tabs-height));
 	position: relative;
 }
+.room-block .sb-wb .wb-block .tabs .wb-tab-content .fullscreen {
+	position: absolute;
+	right: 40px;
+}
+html[dir="rtl"] .room-block .sb-wb .wb-block .tabs .wb-tab-content .fullscreen {
+	right: initial;
+	left: 40px;
+}
 .room-block .sb-wb .wb-block .tabs .wb-tab-content .tab-pane {
 	height: 100%;
 }