mirror of
https://github.com/wekan/wekan.git
synced 2025-12-30 14:18:48 +01:00
Allow a user to edit its profile or avatar from a member popover
Fixes the data context on the member popover in the details pane. Also change the way Popover detect if the click is initiated from a parent popover -- from reading Blaze context, to looking at the event target parents.
This commit is contained in:
parent
fad4cba5e2
commit
8cf9ec2660
8 changed files with 70 additions and 55 deletions
|
|
@ -26,6 +26,10 @@ Template.userAvatar.helpers({
|
|||
}
|
||||
});
|
||||
|
||||
Template.userAvatar.events({
|
||||
'click .js-change-avatar': Popup.open('changeAvatar')
|
||||
});
|
||||
|
||||
Template.userAvatarInitials.helpers({
|
||||
initials: function() {
|
||||
var user = Users.findOne(this.userId);
|
||||
|
|
@ -142,9 +146,16 @@ Template.cardMembersPopup.events({
|
|||
}
|
||||
});
|
||||
|
||||
Template.cardMemberPopup.helpers({
|
||||
user: function() {
|
||||
return Users.findOne(this.userId);
|
||||
}
|
||||
});
|
||||
|
||||
Template.cardMemberPopup.events({
|
||||
'click .js-remove-member': function() {
|
||||
Cards.update(this.cardId, {$pull: {members: this.userId}});
|
||||
Popup.close();
|
||||
}
|
||||
},
|
||||
'click .js-edit-profile': Popup.open('editProfile')
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue