Fix overflowing names in the new userlist

pull/1/head
yflory 8 years ago
parent fcf983854d
commit ffd184d50e

@ -138,7 +138,14 @@ body .userlist-drawer {
color: black; color: black;
font-size: 40px; font-size: 40px;
} }
.name {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
}
media-tag { media-tag {
min-height: 50px;
min-width: 50px;
max-height: 50px; max-height: 50px;
max-width: 50px; max-width: 50px;
img { img {

@ -206,6 +206,7 @@ define([
// Editors // Editors
editUsersNames.forEach(function (data) { editUsersNames.forEach(function (data) {
var name = data.name || Messages.anonymous; var name = data.name || Messages.anonymous;
var $name = $('<span>', {'class': 'name'}).text(name);
var $span = $('<span>', {'title': name}); var $span = $('<span>', {'title': name});
if (data.profile) { if (data.profile) {
$span.addClass('clickable'); $span.addClass('clickable');
@ -215,13 +216,13 @@ define([
} }
if (data.avatar && avatars[data.avatar]) { if (data.avatar && avatars[data.avatar]) {
$span.append(avatars[data.avatar]); $span.append(avatars[data.avatar]);
$span.append(name); $span.append($name);
} else { } else {
Cryptpad.displayAvatar($span, data.avatar, name, function ($img) { Cryptpad.displayAvatar($span, data.avatar, name, function ($img) {
if (data.avatar && $img) { if (data.avatar && $img) {
avatars[data.avatar] = $img[0].outerHTML; avatars[data.avatar] = $img[0].outerHTML;
} }
$span.append(name); $span.append($name);
}); });
} }
$span.data('uid', data.uid); $span.data('uid', data.uid);

@ -1170,7 +1170,7 @@ define([
var element = filesOp.find(newPath); var element = filesOp.find(newPath);
var $icon = !isFolder ? getFileIcon(element) : undefined; var $icon = !isFolder ? getFileIcon(element) : undefined;
var ro = filesOp.isReadOnlyFile(element); var ro = filesOp.isReadOnlyFile(element);
// ro undefined mens it's an old hash which doesn't support read-only // ro undefined means it's an old hash which doesn't support read-only
var roClass = typeof(ro) === 'undefined' ? ' noreadonly' : ro ? ' readonly' : ''; var roClass = typeof(ro) === 'undefined' ? ' noreadonly' : ro ? ' readonly' : '';
var liClass = 'file-item file-element element' + roClass; var liClass = 'file-item file-element element' + roClass;
if (isFolder) { if (isFolder) {
@ -2140,6 +2140,7 @@ define([
$trashContextMenu.hide(); $trashContextMenu.hide();
$contentContextMenu.hide(); $contentContextMenu.hide();
$defaultContextMenu.hide(); $defaultContextMenu.hide();
$iframe.find('.cryptpad-dropdown').hide();
}; };
var stringifyPath = function (path) { var stringifyPath = function (path) {

Loading…
Cancel
Save