mirror of
https://github.com/wekan/wekan.git
synced 2025-12-15 23:10:13 +01:00
We now replace native scrollbar by custom ones on the list card (which is required by the new ergonomics in the parent commit), but the "scrolling engine", is still native, we just hide the scrollbar and draw our own in HTML/CSS using the perfect-scrollbar package (from bower). This commit also implements component scrolling when certain actions are performed, eg scroll to the bottom when the new card composer is opened.
51 lines
1.2 KiB
JavaScript
51 lines
1.2 KiB
JavaScript
var widgetTitles = {
|
|
filter: 'filter-cards',
|
|
background: 'change-background'
|
|
};
|
|
|
|
Template.sidebar.helpers({
|
|
currentWidget: function() {
|
|
return Session.get('currentWidget') + 'Sidebar';
|
|
},
|
|
currentWidgetTitle: function() {
|
|
return TAPi18n.__(widgetTitles[Session.get('currentWidget')]);
|
|
}
|
|
});
|
|
|
|
// Template.addMemberPopup.helpers({
|
|
// isBoardMember: function() {
|
|
// var user = Users.findOne(this._id);
|
|
// return user && user.isBoardMember();
|
|
// }
|
|
// });
|
|
|
|
Template.memberPopup.helpers({
|
|
user: function() {
|
|
return Users.findOne(this.userId);
|
|
},
|
|
memberType: function() {
|
|
var type = Users.findOne(this.userId).isBoardAdmin() ? 'admin' : 'normal';
|
|
return TAPi18n.__(type).toLowerCase();
|
|
}
|
|
});
|
|
|
|
// Template.removeMemberPopup.helpers({
|
|
// user: function() {
|
|
// return Users.findOne(this.userId)
|
|
// },
|
|
// board: function() {
|
|
// return currentBoard();
|
|
// }
|
|
// });
|
|
|
|
// Template.changePermissionsPopup.helpers({
|
|
// isAdmin: function() {
|
|
// return this.user.isBoardAdmin();
|
|
// },
|
|
// isLastAdmin: function() {
|
|
// if (! this.user.isBoardAdmin())
|
|
// return false;
|
|
// var nbAdmins = _.where(currentBoard().members, { isAdmin: true }).length;
|
|
// return nbAdmins === 1;
|
|
// }
|
|
// });
|