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 c650166  [OPENMEETINGS-1815] user count is added to the room
c650166 is described below

commit c65016664055ba2a7ff07626bf76320e330f2bb4
Author: Maxim Solodovnik <solomax...@gmail.com>
AuthorDate: Fri Feb 9 22:14:32 2018 +0700

    [OPENMEETINGS-1815] user count is added to the room
---
 .../openmeetings/web/room/sidebar/RoomSidebar.html    |  2 +-
 .../openmeetings/web/room/sidebar/RoomSidebar.java    |  8 ++++++--
 openmeetings-web/src/main/webapp/css/room.css         | 19 +++++++++++++++++++
 3 files changed, 26 insertions(+), 3 deletions(-)

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 0d8f9d0..f42c61d 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
@@ -24,7 +24,7 @@
                <ul>
                        <li>
                                <a href="#room-sidebar-tab-users" 
class="om-icon big tab user" wicket:message="title:398">
-                                       <wicket:message key="398"/>
+                                       <wicket:message key="398"/>&nbsp;<span 
wicket:id="user-count" class="badge">42</span>
                                </a>
                        </li>
                        <li wicket:enclosure="file-tab">
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 6eed1f9..c2b6fa4 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
@@ -51,10 +51,12 @@ import 
org.apache.wicket.core.request.handler.IPartialPageRequestHandler;
 import org.apache.wicket.markup.head.IHeaderResponse;
 import org.apache.wicket.markup.head.PriorityHeaderItem;
 import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.markup.html.list.ListItem;
 import org.apache.wicket.markup.html.list.ListView;
 import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.Model;
 import org.apache.wicket.util.string.StringValue;
 import org.apache.wicket.util.string.Strings;
 import org.red5.logging.Red5LoggerFactory;
@@ -225,6 +227,7 @@ public class RoomSidebar extends Panel {
                        }
                }
        };
+       private final Label userCount = new Label("user-count", Model.of(""));
 
        public RoomSidebar(String id, final RoomPanel room) {
                super(id);
@@ -249,7 +252,7 @@ public class RoomSidebar extends Panel {
                add(selfRights, 
userList.add(updateUsers()).setOutputMarkupId(true)
                                , fileTab.setVisible(!room.isInterview()), 
roomFiles.setVisible(!room.isInterview()));
 
-               add(addFolder, settings);
+               add(addFolder, settings, userCount.setOutputMarkupId(true));
                add(toggleRight, toggleActivity, roomAction, avSettings);
                add(confirmKick = new ConfirmableAjaxBorder("confirm-kick", 
getString("603"), getString("605")) {
                        private static final long serialVersionUID = 1L;
@@ -290,7 +293,8 @@ public class RoomSidebar extends Panel {
        public void update(IPartialPageRequestHandler handler) {
                updateShowFiles(handler);
                updateUsers();
-               handler.add(selfRights.update(handler), userList);
+               userCount.setDefaultModelObject(users.getList().size());
+               handler.add(selfRights.update(handler), userList, userCount);
        }
 
        public void updateFiles(IPartialPageRequestHandler handler) {
diff --git a/openmeetings-web/src/main/webapp/css/room.css 
b/openmeetings-web/src/main/webapp/css/room.css
index d52f06b..8bae5c5 100644
--- a/openmeetings-web/src/main/webapp/css/room.css
+++ b/openmeetings-web/src/main/webapp/css/room.css
@@ -409,6 +409,25 @@
 .room.sidebar .tab.om-icon.big.file {
        background-image: url(images/folder_explore.png);
 }
+.ui-state-active .badge {
+       color: #337ab7;
+       background-color: #fff;
+}
+
+.badge {
+       display: inline-block;
+       min-width: 10px;
+       padding: 3px 7px;
+       font-size: 12px;
+       font-weight: 700;
+       line-height: 1;
+       color: #fff;
+       text-align: center;
+       white-space: nowrap;
+       vertical-align: middle;
+       background-color: #777;
+       border-radius: 10px;
+}
 /************ VIDEO **************/
 .room.box .user-video {
        display: inline-block !important;

-- 
To stop receiving notification emails like this one, please contact
solo...@apache.org.

Reply via email to