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 059b363  [OPENMEETINGS-2514] unenroll should be fixed
059b363 is described below

commit 059b3638c4c4f821c8d543c7bacb3799fd158054
Author: Maxim Solodovnik <solomax...@gmail.com>
AuthorDate: Thu Nov 19 10:33:07 2020 +0700

    [OPENMEETINGS-2514] unenroll should be fixed
---
 .../org/apache/openmeetings/web/app/Application.java    |  1 -
 .../java/org/apache/openmeetings/web/room/raw-room.js   | 17 ++++++++++++++---
 .../openmeetings/web/room/sidebar/RoomSidebar.html      | 10 ++++++----
 .../openmeetings/web/room/sidebar/RoomSidebar.java      | 16 ++--------------
 .../org/apache/openmeetings/web/room/wb/WbPanel.html    | 12 ++++++------
 .../org/apache/openmeetings/web/room/wb/raw-wb-board.js |  8 +++-----
 6 files changed, 31 insertions(+), 33 deletions(-)

diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java
index e431f7c..5debb49 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java
@@ -425,7 +425,6 @@ public class Application extends 
AuthenticatedWebApplication implements IApplica
        public static void kickUser(Client client) {
                if (client != null) {
                        WebSocketHelper.sendRoom(new 
TextRoomMessage(client.getRoom().getId(), client, RoomMessage.Type.KICK, 
client.getUid()));
-                       get().cm.exitRoom(client);
                }
        }
 
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-room.js 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-room.js
index 025f98a..a54e350 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-room.js
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-room.js
@@ -308,14 +308,20 @@ var Room = (function() {
                        icon.hide();
                }
        }
-       function __activityIcon(elem, selector, predicate, action) {
+       function __activityIcon(elem, selector, predicate, action, confirm) {
                let icon = elem.find(selector);
                if (predicate()) {
                        if (icon.length === 0) {
                                icon = OmUtil.tmpl('#user-actions-stub ' + 
selector);
                                elem.append(icon);
                        }
-                       icon.off().click(action);
+                       icon.off();
+                       if (confirm) {
+                               icon.confirmation('dispose');
+                               icon.confirmation(confirm)
+                       } else {
+                               icon.click(action);
+                       }
                } else {
                        icon.hide();
                }
@@ -440,7 +446,12 @@ var Room = (function() {
                __rightOtherIcons(c, actions);
                __activityIcon(actions, '.kick'
                        , () => !self && _hasRight('MODERATOR') && 
!_hasRight('SUPER_MODERATOR', c.rights)
-                       , function() { OmUtil.roomAction({action: 'kick', uid: 
c.uid}); });
+                       , null
+                       , {
+                               confirmationEvent: 'om-kick'
+                               , placement: Settings.isRtl ? 'left' : 'right'
+                               , onConfirm: () => OmUtil.roomAction({action: 
'kick', uid: c.uid})
+                       });
                __activityIcon(actions, '.private-chat'
                                , () => options.userId !== c.user.id && 
$('#chatPanel').is(':visible')
                                , function() {
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.html
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.html
index 7b37644..14123fe 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.html
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.html
@@ -60,7 +60,6 @@
        <div wicket:id="activities"></div>
        <div wicket:id="addFolder"></div>
        <div wicket:id="upload"></div>
-       <div wicket:id="confirm-kick" />
        <div wicket:id="settings" />
        <div hidden="hidden">
                <div id="user-entry-stub" class="user entry clearfix" >
@@ -73,14 +72,14 @@
                        <div class="user actions clearfix">
                        </div>
                </div>
-               <span id="volume-control-stub" class="om-icon dropdown 
dropright volume-control align-right">
+               <div id="volume-control-stub" class="om-icon dropdown dropright 
volume-control align-right">
                        <a class="fas volume-on" type="button" href="#" 
wicket:message="title:volume.label"></a>
                        <div class="dropdown-menu">
                                <div class="slider" 
wicket:message="title:volume.label">
                                        <div class="ui-slider-handle 
handle"></div>
                                </div>
                        </div>
-               </span>
+               </div>
                <span id="user-av-restart" class="om-icon align-right restart 
clickable" wicket:message="title:lbl.refresh">
                        <i class="fas fa-sync-alt"></i>
                </span>
@@ -106,7 +105,10 @@
                        <span class="om-icon align-left right moderator bumper 
clickable" 
wicket:message="data-request:ulist.right.moderator.request,data-revoke:ulist.right.moderator.revoke,data-grant:ulist.right.moderator.grant">
                                <i class="fas"></i>
                        </span>
-                       <span class="om-icon align-left kick bumper clickable" 
wicket:message="title:603">
+                       <span class="om-icon align-left kick bumper clickable"
+                                       
wicket:message="title:603,data-btn-ok-label:54,data-btn-cancel-label:lbl.cancel,data-title:603,data-content:605"
+                                       data-btn-ok-class="btn btn-sm 
btn-danger"
+                                       data-btn-ok-icon-class="fas 
fa-exclamation-triangle">
                                <i class="fas fa-ban text-danger"></i>
                        </span>
                        <span class="om-icon align-right private-chat 
clickable" wicket:message="title:1493">
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java
index c07ce2e..a506b1a 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java
@@ -29,7 +29,6 @@ import org.apache.openmeetings.db.util.ws.RoomMessage;
 import org.apache.openmeetings.db.util.ws.TextRoomMessage;
 import org.apache.openmeetings.web.app.ClientManager;
 import org.apache.openmeetings.web.common.NameDialog;
-import org.apache.openmeetings.web.common.confirmation.ConfirmationDialog;
 import org.apache.openmeetings.web.room.RoomPanel;
 import org.apache.openmeetings.web.room.RoomPanel.Action;
 import org.apache.openmeetings.web.room.VideoSettings;
@@ -39,7 +38,6 @@ import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.core.request.handler.IPartialPageRequestHandler;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.panel.Panel;
-import org.apache.wicket.model.ResourceModel;
 import org.apache.wicket.spring.injection.annot.SpringBean;
 import org.apache.wicket.util.string.Strings;
 import org.slf4j.Logger;
@@ -59,9 +57,7 @@ public class RoomSidebar extends Panel {
        private UploadDialog upload;
        private RoomFilePanel roomFiles;
        private final WebMarkupContainer fileTab = new 
WebMarkupContainer("file-tab");
-       private ConfirmationDialog confirmKick;
        private boolean showFiles;
-       private Client kickedClient;
        private VideoSettings settings = new VideoSettings("settings");
        private ActivitiesPanel activities;
 
@@ -91,14 +87,6 @@ public class RoomSidebar extends Panel {
                add(fileTab.setVisible(!room.isInterview()), 
roomFiles.setVisible(!room.isInterview()));
 
                add(addFolder, settings);
-               add(confirmKick = new ConfirmationDialog("confirm-kick", new 
ResourceModel("603"), new ResourceModel("605")) {
-                       private static final long serialVersionUID = 1L;
-
-                       @Override
-                       protected void onConfirm(AjaxRequestTarget target) {
-                               kickUser(kickedClient);
-                       }
-               });
                add(upload = new UploadDialog("upload", room, roomFiles));
                updateShowFiles(null);
                add(activities = new ActivitiesPanel("activities", room));
@@ -158,12 +146,12 @@ public class RoomSidebar extends Panel {
                        switch (a) {
                                case kick:
                                        if (self.hasRight(Right.MODERATOR)) {
-                                               kickedClient = cm.get(uid);
+                                               final Client kickedClient = 
cm.get(uid);
                                                if (kickedClient == null) {
                                                        return;
                                                }
                                                if 
(!kickedClient.hasRight(Right.SUPER_MODERATOR) && 
!self.getUid().equals(kickedClient.getUid())) {
-                                                       
confirmKick.show(handler);
+                                                       kickUser(kickedClient);
                                                }
                                        }
                                        break;
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 08b390c..81fdd3c 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
@@ -142,13 +142,13 @@
                </div>
                <div id="wb-tools">
                        <div class="clickable om-icon big clear-all"
-                                
wicket:message="title:62,data-btn-ok-label:54,data-btn-cancel-label:lbl.cancel,data-title:80,data-content:1340"
-                                data-btn-ok-class="btn btn-sm btn-danger"
-                                data-btn-ok-icon-class="fas 
fa-exclamation-triangle"></div>
+                               
wicket:message="title:62,data-btn-ok-label:54,data-btn-cancel-label:lbl.cancel,data-title:80,data-content:1340"
+                               data-btn-ok-class="btn btn-sm btn-danger"
+                               data-btn-ok-icon-class="fas 
fa-exclamation-triangle"></div>
                        <div class="clickable om-icon big clear-slide"
-                                
wicket:message="title:1005,data-btn-ok-label:54,data-btn-cancel-label:lbl.cancel,data-title:80,data-content:1359"
-                                data-btn-ok-class="btn btn-sm btn-danger"
-                                data-btn-ok-icon-class="fas 
fa-exclamation-triangle"></div>
+                               
wicket:message="title:1005,data-btn-ok-label:54,data-btn-cancel-label:lbl.cancel,data-title:80,data-content:1359"
+                               data-btn-ok-class="btn btn-sm btn-danger"
+                               data-btn-ok-icon-class="fas 
fa-exclamation-triangle"></div>
                        <div wicket:message="title:199" class="clickable 
om-icon big save"></div>
                        <div wicket:message="title:70" class="clickable om-icon 
big undo"></div>
 
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/raw-wb-board.js
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/raw-wb-board.js
index 65bada2..8425dc7 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/raw-wb-board.js
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/raw-wb-board.js
@@ -263,10 +263,8 @@ var Wb = function() {
                switch (role) {
                        case PRESENTER:
                                clearAll.confirmation({
-                                       confirmationEvent: 'bla'
-                                       , onConfirm: function() {
-                                               OmUtil.wbAction({action: 
'clearAll', data: {wbId: wb.id}});
-                                       }
+                                       confirmationEvent: 'om-clear-all'
+                                       , onConfirm: () => 
OmUtil.wbAction({action: 'clearAll', data: {wbId: wb.id}})
                                }).removeClass('disabled');
                                zoomBar.find('.curr-slide').change(function() {
                                        _setSlide($(this).val() - 1);
@@ -316,7 +314,7 @@ var Wb = function() {
                                });
                                tools.find('.om-icon.clear-slide')
                                        .confirmation({
-                                               confirmationEvent: 'bla'
+                                               confirmationEvent: 
'om-clear-slide'
                                                , onConfirm: function() {
                                                        
OmUtil.wbAction({action: 'clearSlide', data: {wbId: wb.id, slide: slide}});
                                                }

Reply via email to