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 2023/04/28 02:33:38 UTC

[openmeetings] branch master updated: [OPENMEETINGS-2769] 'ask permission' dialog should be fixed

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 287146a6e [OPENMEETINGS-2769] 'ask permission' dialog should be fixed
287146a6e is described below

commit 287146a6e9d9eb6bba1ee52f0f32f24e60ba1ac2
Author: Maxim Solodovnik <so...@gmail.com>
AuthorDate: Fri Apr 28 09:33:27 2023 +0700

    [OPENMEETINGS-2769] 'ask permission' dialog should be fixed
---
 .../src/main/front/settings/src/video-util.js      | 38 ++++++++++------------
 1 file changed, 18 insertions(+), 20 deletions(-)

diff --git a/openmeetings-web/src/main/front/settings/src/video-util.js b/openmeetings-web/src/main/front/settings/src/video-util.js
index 8b19cf614..a3f55137c 100644
--- a/openmeetings-web/src/main/front/settings/src/video-util.js
+++ b/openmeetings-web/src/main/front/settings/src/video-util.js
@@ -231,26 +231,24 @@ function _setPos(v, pos) {
 	}
 }
 function _askPermission(callback) {
-	const data = $('.sidebar').data('bs.confirmation');
-	if (typeof(data) === 'object') {
-		data.config.buttons[0].onClick = function() {callback();};
-	} else {
-		const perm = $('#ask-permission');
-		$('.sidebar').confirmation({
-			title: perm.attr('title')
-			, placement: Settings.isRtl ? 'right' : 'left'
-			, singleton: true
-			, rootSelector: '.sidebar'
-			, html: true
-			, content: perm.html()
-			, buttons: [{
-				class: 'btn btn-sm btn-warning'
-				, label: perm.data('btn-ok')
-				, value: perm.data('btn-ok')
-				, onClick: function() {callback();}
-			}]
-		});
-	}
+	const perm = $('#ask-permission');
+	$('.sidebar').confirmation({
+		title: perm.attr('title')
+		, placement: Settings.isRtl ? 'right' : 'left'
+		, singleton: true
+		, rootSelector: '.sidebar'
+		, html: true
+		, content: perm.html()
+		, buttons: [{
+			class: 'btn btn-sm btn-warning'
+			, label: perm.data('btn-ok')
+			, value: perm.data('btn-ok')
+			, onClick: function() {
+				callback();
+				$('.sidebar').confirmation('dispose');
+			}
+		}]
+	});
 	$('.sidebar').confirmation('show');
 }
 function _disconnect(node) {