mirror of
https://github.com/wekan/wekan.git
synced 2026-01-04 16:48:49 +01:00
Implement presence indicators
This commit is contained in:
parent
6db01bb3c7
commit
f4c80d1315
18 changed files with 116 additions and 228 deletions
31
client/components/users/userProfile.js
Normal file
31
client/components/users/userProfile.js
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
Template.profileEditForm.events({
|
||||
'click .js-edit-profile': function() {
|
||||
Session.set('ProfileEditForm', true);
|
||||
},
|
||||
'click .js-cancel-edit-profile': function() {
|
||||
Session.set('ProfileEditForm', false);
|
||||
},
|
||||
'submit #ProfileEditForm': function(evt, t) {
|
||||
var name = t.find('#name').value;
|
||||
var bio = t.find('#bio').value;
|
||||
|
||||
// trim and update
|
||||
if ($.trim(name)) {
|
||||
Users.update(this.profile()._id, {
|
||||
$set: {
|
||||
'profile.name': name,
|
||||
'profile.bio': bio
|
||||
}
|
||||
}, function() {
|
||||
|
||||
// update complete close profileEditForm
|
||||
Session.set('ProfileEditForm', false);
|
||||
});
|
||||
}
|
||||
evt.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
Template.memberName.events({
|
||||
'click .js-show-mem-menu': Popup.open('user')
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue