diff options
author | Julius Härtl <jus@bitgrid.net> | 2018-11-09 12:45:50 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2018-11-09 12:45:50 +0300 |
commit | 337dbf3239c4cb6a3941d7114a62c1b884f63ccb (patch) | |
tree | 4e4cb3af3b120bf6bcc748579b2922b65a129c92 /js | |
parent | 1680ac56cd83f7dc8bc9f90cbaf00d9fec4a2a0d (diff) |
Fix tooltip positioning
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'js')
-rw-r--r-- | js/documents.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/js/documents.js b/js/documents.js index b85278ad..5f8fbc2d 100644 --- a/js/documents.js +++ b/js/documents.js @@ -184,21 +184,25 @@ var documentsMain = { if (view.UserId !== "" && users.indexOf(view.UserId) > -1) { continue; } + var userName = view.UserName !== '' ? view.UserName : t('richdocuments', 'Guest'); +console.log(view); users.push(view.UserId); var avatarContainer = $('<div class="richdocuments-avatar"><div class="avatar" title="' + view.UserName + '" data-user="' + view.UserId + '"></div></div>'); var avatar = avatarContainer.find('.avatar'); avatardiv.append(avatarContainer); - $(avatar).avatar(view.UserId, 32); if (view.ReadOnly === '1') { - var userName = view.UserName !== '' ? view.UserName : t('richdocuments', 'Guest'); avatarContainer.addClass('read-only'); $(avatar).attr('title', userName + ' ' + t('richdocuments', '(read only)')); + } else { + $(avatar).attr('title', userName); } - $(avatar).tooltip({placement: 'bottom'}); + + $(avatar).avatar(view.UserId, 32); if (parent.OC.currentUser !== null && view.UserId !== '') { $(avatar).contactsMenu(view.UserId, 0, avatarContainer); } }; + parent.$('.richdocuments-avatar .avatar').tooltip({placement: 'bottom', container: '#header'}); }, showViewer: function(fileId, title){ |