mirror of
https://github.com/wekan/wekan.git
synced 2025-12-30 06:08:48 +01:00
Implement presence indicators
This commit is contained in:
parent
6db01bb3c7
commit
f4c80d1315
18 changed files with 116 additions and 228 deletions
39
client/components/users/userHeader.js
Normal file
39
client/components/users/userHeader.js
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
Template.headerUserBar.events({
|
||||
'click .js-open-header-member-menu': Popup.open('memberMenu')
|
||||
});
|
||||
|
||||
Template.setLanguagePopup.helpers({
|
||||
languages: function() {
|
||||
return _.map(TAPi18n.getLanguages(), function(lang, tag) {
|
||||
return {
|
||||
tag: tag,
|
||||
name: lang.name
|
||||
};
|
||||
});
|
||||
},
|
||||
isCurrentLanguage: function() {
|
||||
return this.tag === TAPi18n.getLanguage();
|
||||
}
|
||||
});
|
||||
|
||||
Template.memberMenuPopup.events({
|
||||
'click .js-language': Popup.open('setLanguage'),
|
||||
'click .js-logout': function(evt) {
|
||||
evt.preventDefault();
|
||||
|
||||
Meteor.logout(function() {
|
||||
Router.go('Home');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Template.setLanguagePopup.events({
|
||||
'click .js-set-language': function(evt) {
|
||||
Users.update(Meteor.userId(), {
|
||||
$set: {
|
||||
'profile.language': this.tag
|
||||
}
|
||||
});
|
||||
evt.preventDefault();
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue