You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by se...@apache.org on 2022/04/25 01:28:36 UTC

[openmeetings] branch feature/OPENMEETINGS-2727-add-tooltips-disable-scroll-btns-when-only-1-whiteboard created (now be84eea96)

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

sebawagner pushed a change to branch feature/OPENMEETINGS-2727-add-tooltips-disable-scroll-btns-when-only-1-whiteboard
in repository https://gitbox.apache.org/repos/asf/openmeetings.git


      at be84eea96 OPENMEETINGS-2727 Add tooltips to whiteboard tab bar buttons and only show scroll button when there is more then 1 whiteboard to scroll

This branch includes the following new commits:

     new be84eea96 OPENMEETINGS-2727 Add tooltips to whiteboard tab bar buttons and only show scroll button when there is more then 1 whiteboard to scroll

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[openmeetings] 01/01: OPENMEETINGS-2727 Add tooltips to whiteboard tab bar buttons and only show scroll button when there is more then 1 whiteboard to scroll

Posted by se...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sebawagner pushed a commit to branch feature/OPENMEETINGS-2727-add-tooltips-disable-scroll-btns-when-only-1-whiteboard
in repository https://gitbox.apache.org/repos/asf/openmeetings.git

commit be84eea963996a1745e2dafa10aed3c24157e123
Author: Sebastian <se...@apache.org>
AuthorDate: Mon Apr 25 13:28:15 2022 +1200

    OPENMEETINGS-2727 Add tooltips to whiteboard tab bar buttons and only show scroll button when there is more then 1 whiteboard to scroll
---
 openmeetings-web/src/main/front/wb/src/wb-area.js         | 15 +++++++++++++++
 .../openmeetings/web/app/Application.properties.xml       |  3 +++
 .../java/org/apache/openmeetings/web/room/wb/WbPanel.html |  6 +++---
 3 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/openmeetings-web/src/main/front/wb/src/wb-area.js b/openmeetings-web/src/main/front/wb/src/wb-area.js
index 55abe771f..95937202c 100644
--- a/openmeetings-web/src/main/front/wb/src/wb-area.js
+++ b/openmeetings-web/src/main/front/wb/src/wb-area.js
@@ -193,6 +193,7 @@ module.exports = class DrawWbArea extends WbAreaBase {
 				links.prop('disabled', true).addClass('disabled');
 				elems.find('button').remove();
 			}
+			__updateTabBarPreNextWhiteboardBTNs();
 			links.off()
 				.click(function(e) {
 					e.preventDefault();
@@ -221,6 +222,19 @@ module.exports = class DrawWbArea extends WbAreaBase {
 				textSpan.trigger('dblclick');
 			});
 		}
+		function __updateTabBarPreNextWhiteboardBTNs() {
+			if (role === Role.PRESENTER) {
+				const tabs = $('.room-block .wb-block .tabs');
+				const tabsNav = tabs.find('ul.nav-tabs li');
+				if (tabsNav.length > 1) {
+					tabs.find('.prev.om-icon').prop('disabled', false).removeClass('disabled');
+					tabs.find('.next.om-icon').prop('disabled', false).removeClass('disabled');
+				} else {
+					tabs.find('.prev.om-icon').prop('disabled', true).addClass('disabled');
+					tabs.find('.next.om-icon').prop('disabled', true).addClass('disabled');
+				}
+			}
+		}
 
 		this.init = (callback) => {
 			// it seems `super` can't be called from lambda
@@ -341,6 +355,7 @@ module.exports = class DrawWbArea extends WbAreaBase {
 			_getWbTab(obj.wbId).parent().remove();
 			_getWbContent(obj.wbId).remove();
 			_actionActivateWb(obj.prevWbId);
+			__updateTabBarPreNextWhiteboardBTNs();
 		};
 		this.load = (json) => {
 			if (!_inited) {
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.properties.xml b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.properties.xml
index 957ee1db4..3c0337972 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.properties.xml
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.properties.xml
@@ -986,4 +986,7 @@ Please visit {3} OM server and check them under Admin -> Groups]]></entry>
 	<entry key="wizard.button.finish"><![CDATA[Finish]]></entry>
 	<entry key="zoom.FULL_FIT"><![CDATA[Full-Fit]]></entry>
 	<entry key="zoom.PAGE_WIDTH"><![CDATA[Page Width]]></entry>
+	<entry key="wb.add.whiteboard"><![CDATA[Add new whiteboard to conference room]]></entry>
+	<entry key="wb.pre.whiteboard"><![CDATA[Scroll whiteboard tabbar right]]></entry>
+	<entry key="wb.next.whiteboard"><![CDATA[Scroll whiteboard tabbar left]]></entry>
 </properties>
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 12c5248ba..74e87531b 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
@@ -33,11 +33,11 @@
 	<div hidden="hidden">
 		<div id="wb-text-style-block"></div>
 		<div id="wb-tabbar-ctrls-left">
-			<div class="add clickable om-icon big"></div>
-			<div class="prev clickable om-icon big"></div>
+			<div wicket:message="title:wb.add.whiteboard" class="add clickable om-icon big"></div>
+			<div wicket:message="title:wb.pre.whiteboard" class="prev clickable om-icon big disabled"></div>
 		</div>
 		<div id="wb-tabbar-ctrls-right">
-			<div class="next clickable om-icon big"></div>
+			<div wicket:message="title:wb.next.whiteboard" class="next clickable om-icon big disabled"></div>
 		</div>
 		<ul>
 			<li id="wb-area-tab" class="nav-item">