mirror of https://github.com/wekan/wekan
The Open Source kanban (built with Meteor). Keep variable/table/field names camelCase. For translations, only add Pull Request changes to wekan/i18n/en.i18n.json , other translations are done at https://transifex.com/wekan/wekan only.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
834 B
40 lines
834 B
|
11 years ago
|
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();
|
||
|
|
}
|
||
|
|
});
|