mirror of
https://github.com/wekan/wekan.git
synced 2026-02-23 08:24:07 +01:00
Fix #1567
This commit is contained in:
parent
c12e003fd3
commit
e5995477b8
8 changed files with 44 additions and 38 deletions
|
|
@ -87,15 +87,13 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
|
||||
isViewSwimlanes() {
|
||||
const currentBoardId = Session.get('currentBoard');
|
||||
const board = Boards.findOne(currentBoardId);
|
||||
return (board.view === 'board-view-swimlanes');
|
||||
const currentUser = Meteor.user();
|
||||
return (currentUser.profile.boardView === 'board-view-swimlanes');
|
||||
},
|
||||
|
||||
isViewLists() {
|
||||
const currentBoardId = Session.get('currentBoard');
|
||||
const board = Boards.findOne(currentBoardId);
|
||||
return (board.view === 'board-view-lists');
|
||||
const currentUser = Meteor.user();
|
||||
return (currentUser.profile.boardView === 'board-view-lists');
|
||||
},
|
||||
|
||||
openNewListForm() {
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ template(name="boardHeaderBar")
|
|||
a.board-header-btn.js-toggle-board-view(
|
||||
title="{{_ 'board-view'}}")
|
||||
i.fa.fa-th-large
|
||||
span {{_ currentBoard.view}}
|
||||
span {{_ currentUser.profile.boardView}}
|
||||
|
||||
if canModifyBoard
|
||||
a.board-header-btn.js-multiselection-activate(
|
||||
|
|
|
|||
|
|
@ -77,19 +77,11 @@ BlazeComponent.extendComponent({
|
|||
Modal.open('archivedBoards');
|
||||
},
|
||||
'click .js-toggle-board-view'() {
|
||||
const currentBoard = Boards.findOne(Session.get('currentBoard'));
|
||||
if (currentBoard.view === 'board-view-swimlanes') {
|
||||
Boards.update(currentBoard._id, {
|
||||
$set: {
|
||||
view: 'board-view-lists',
|
||||
},
|
||||
});
|
||||
} else if (currentBoard.view === 'board-view-lists') {
|
||||
Boards.update(currentBoard._id, {
|
||||
$set: {
|
||||
view: 'board-view-swimlanes',
|
||||
},
|
||||
});
|
||||
const currentUser = Meteor.user();
|
||||
if (currentUser.profile.boardView === 'board-view-swimlanes') {
|
||||
currentUser.setBoardView('board-view-lists');
|
||||
} else if (currentUser.profile.boardView === 'board-view-lists') {
|
||||
currentUser.setBoardView('board-view-swimlanes');
|
||||
}
|
||||
},
|
||||
'click .js-open-filter-view'() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue