зеркало из https://github.com/nextcloud/deck.git
Hide "no actions" from current users avatar menu
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Родитель
75f95db0b1
Коммит
e70045f7d3
|
@ -33,7 +33,7 @@ app.directive('avatar', function() {
|
|||
scope.displayname = attr.displayname;
|
||||
var value = attr.user;
|
||||
var avatardiv = $(element).find('.avatardiv');
|
||||
if(typeof attr.contactsmenu !== 'undefined' && attr.contactsmenu !== 'false' && oc_current_user !== value) {
|
||||
if(typeof attr.contactsmenu !== 'undefined' && attr.contactsmenu !== 'false') {
|
||||
avatardiv.contactsMenu(value, 0, $(element));
|
||||
avatardiv.addClass('has-contactsmenu');
|
||||
}
|
||||
|
|
|
@ -28,6 +28,9 @@ app.directive('contactsmenudelete', function() {
|
|||
link: function(scope, element, attr){
|
||||
var user = attr.user;
|
||||
var menu = $(element).parent().find('.contactsmenu-popover');
|
||||
if (oc_current_user === user) {
|
||||
menu.children(':first').remove();
|
||||
}
|
||||
var menuEntry = $('<li><a><span class="icon icon-delete"></span><span>' + t('deck', 'Remove user from card') + '</span></a></li>');
|
||||
menuEntry.on('click', function () {
|
||||
scope.removeAssignedUser(user);
|
||||
|
|
Загрузка…
Ссылка в новой задаче