[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/css loleaflet/js

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Mar 12 08:20:48 UTC 2019


 loleaflet/css/loleaflet.css |    8 ++++++++
 loleaflet/css/toolbar.css   |   20 ++------------------
 loleaflet/js/toolbar.js     |    9 +++------
 3 files changed, 13 insertions(+), 24 deletions(-)

New commits:
commit abde785af0e56ed22cb6019024a616a704c6b501
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Mon Mar 11 20:00:31 2019 +0100
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Mon Mar 11 20:00:31 2019 +0100

    Show user colors when no avatar is available

diff --git a/loleaflet/css/loleaflet.css b/loleaflet/css/loleaflet.css
index a6aefc2b2..b79b56a53 100644
--- a/loleaflet/css/loleaflet.css
+++ b/loleaflet/css/loleaflet.css
@@ -307,6 +307,14 @@ body {
 	border-radius: 50%;
 }
 
+.user-info {
+	border-radius: 50%;
+	width: 24px;
+	height: 24px;
+	overflow: auto;
+	margin: auto;
+}
+
 .loleaflet-annotation-author {
 	padding-left: 10px;
 	padding-right: 10px;
diff --git a/loleaflet/css/toolbar.css b/loleaflet/css/toolbar.css
index 33f9c3a99..2ef829052 100644
--- a/loleaflet/css/toolbar.css
+++ b/loleaflet/css/toolbar.css
@@ -714,27 +714,11 @@ tr.useritem > td {
 
 tr.useritem > td.usercolor {
     display: inline-block;
-    top: 5px;
+    top: 0px;
     left: 3px;
     position: relative;
 }
 
-tr.useritem-avatar:hover {
-    cursor: default;
-    background-color: rgba(67, 172, 232, 0.25);
-}
-
-tr.useritem-avatar > td {
-    padding: 7px;
-}
-
-tr.useritem-avatar > td > img {
+tr.useritem > td > img {
     border-radius: 100px;
 }
-
-tr.useritem-avatar > td.usercolor {
-    display: inline-block;
-    top: 0px;
-    left: 3px;
-    position: relative;
-}
diff --git a/loleaflet/js/toolbar.js b/loleaflet/js/toolbar.js
index 23c26faf8..b6c13c35e 100644
--- a/loleaflet/js/toolbar.js
+++ b/loleaflet/js/toolbar.js
@@ -2322,15 +2322,12 @@ function deselectUser(e) {
 }
 
 function getUserItem(viewId, userName, extraInfo, color) {
-	var className = 'useritem';
-	if (extraInfo !== undefined && extraInfo.avatar !== undefined) {
-		className = 'useritem-avatar';
-	}
-
-	var html = '<tr class="' + className + '" id="user-' + viewId + '" onclick="onUseritemClicked(event)">' +
+	var html = '<tr class="useritem" id="user-' + viewId + '" onclick="onUseritemClicked(event)">' +
 		     '<td class=usercolor>';
 	if (extraInfo !== undefined && extraInfo.avatar !== undefined) {
 		html += '<img class="avatar-img" src="' + extraInfo.avatar + '" style="border-color: ' + color  + ';" />';
+	} else {
+		html += '<div class="user-info" style="background-color: ' + color  + ';" />';
 	}
 
 	// TODO: Add mail and other links as sub-menu.


More information about the Libreoffice-commits mailing list