Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-11-09 12:45:50 +0300
committerJulius Härtl <jus@bitgrid.net>2018-11-09 12:45:50 +0300
commit337dbf3239c4cb6a3941d7114a62c1b884f63ccb (patch)
tree4e4cb3af3b120bf6bcc748579b2922b65a129c92 /js
parent1680ac56cd83f7dc8bc9f90cbaf00d9fec4a2a0d (diff)
Fix tooltip positioning
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'js')
-rw-r--r--js/documents.js10
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){