From ffd184d50e1a61430ded0fcb111e3a8aa928ece3 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 3 Jul 2017 17:41:34 +0200 Subject: [PATCH] Fix overflowing names in the new userlist --- customize.dist/src/less/toolbar.less | 7 +++++++ www/common/toolbar2.js | 5 +++-- www/drive/main.js | 3 ++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/customize.dist/src/less/toolbar.less b/customize.dist/src/less/toolbar.less index 298c93669..c93cc72af 100644 --- a/customize.dist/src/less/toolbar.less +++ b/customize.dist/src/less/toolbar.less @@ -138,7 +138,14 @@ body .userlist-drawer { color: black; font-size: 40px; } + .name { + flex: 1; + overflow: hidden; + text-overflow: ellipsis; + } media-tag { + min-height: 50px; + min-width: 50px; max-height: 50px; max-width: 50px; img { diff --git a/www/common/toolbar2.js b/www/common/toolbar2.js index 246a98688..78f4bf946 100644 --- a/www/common/toolbar2.js +++ b/www/common/toolbar2.js @@ -206,6 +206,7 @@ define([ // Editors editUsersNames.forEach(function (data) { var name = data.name || Messages.anonymous; + var $name = $('', {'class': 'name'}).text(name); var $span = $('', {'title': name}); if (data.profile) { $span.addClass('clickable'); @@ -215,13 +216,13 @@ define([ } if (data.avatar && avatars[data.avatar]) { $span.append(avatars[data.avatar]); - $span.append(name); + $span.append($name); } else { Cryptpad.displayAvatar($span, data.avatar, name, function ($img) { if (data.avatar && $img) { avatars[data.avatar] = $img[0].outerHTML; } - $span.append(name); + $span.append($name); }); } $span.data('uid', data.uid); diff --git a/www/drive/main.js b/www/drive/main.js index b67d11c74..d31c701a6 100644 --- a/www/drive/main.js +++ b/www/drive/main.js @@ -1170,7 +1170,7 @@ define([ var element = filesOp.find(newPath); var $icon = !isFolder ? getFileIcon(element) : undefined; 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 liClass = 'file-item file-element element' + roClass; if (isFolder) { @@ -2140,6 +2140,7 @@ define([ $trashContextMenu.hide(); $contentContextMenu.hide(); $defaultContextMenu.hide(); + $iframe.find('.cryptpad-dropdown').hide(); }; var stringifyPath = function (path) {