Show tooltip with displayname and add contactsmenu to avatars

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2017-12-16 17:07:30 +01:00
parent 63da73600f
commit 183c2665eb
6 changed files with 23 additions and 16 deletions

View File

@@ -26,11 +26,12 @@ app.directive('avatar', function() {
restrict: 'A',
scope: true,
link: function(scope, element, attr){
attr.$observe('displayname', function(value){
if(value!==undefined) {
$(element).avatar(value, 32);
}
});
var value = attr.user;
$(element).wrap('<div class="avatardiv-container"></div>');
if(attr.contactsmenu && oc_current_user !== value) {
$(element).contactsMenu(value, 0, $(element).parent());
}
$(element).avatar(value, 32, false, false, false, attr.displayname);
}
};
});