Merge pull request #358 from nextcloud/add-tooltips
Add tooltips and support for contacts menu at avatars
This commit is contained in:
@@ -74,4 +74,9 @@ app.run(function ($document, $rootScope, $transitions, BoardService) {
|
||||
}
|
||||
}
|
||||
});
|
||||
// Select all elements with data-toggle="tooltips" in the document
|
||||
$('body').tooltip({
|
||||
selector: '[data-toggle="tooltip"]'
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user