summaryrefslogtreecommitdiffstats
path: root/client/components/boards/boardHeader.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2018-01-28 00:02:35 +0200
committerLauri Ojansivu <x@xet7.org>2018-01-28 00:02:35 +0200
commit6aca70f0d11cd93355f65356c5550e7071f42aaa (patch)
tree62f9fb26fb52ae9f71c1f09d37af9058fa00ed75 /client/components/boards/boardHeader.js
parent963e3193451327cec89da2abc1f4aee7ee308f08 (diff)
parent081c1fdf835c6f1d2030b3b9e23229378d4f8cce (diff)
downloadwekan-6aca70f0d11cd93355f65356c5550e7071f42aaa.tar.gz
wekan-6aca70f0d11cd93355f65356c5550e7071f42aaa.tar.bz2
wekan-6aca70f0d11cd93355f65356c5550e7071f42aaa.zip
Merge branch 'devel'
Diffstat (limited to 'client/components/boards/boardHeader.js')
-rw-r--r--client/components/boards/boardHeader.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/client/components/boards/boardHeader.js b/client/components/boards/boardHeader.js
index fe10dab1..67b05446 100644
--- a/client/components/boards/boardHeader.js
+++ b/client/components/boards/boardHeader.js
@@ -76,6 +76,22 @@ BlazeComponent.extendComponent({
'click .js-open-archived-board'() {
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',
+ },
+ });
+ }
+ },
'click .js-open-filter-view'() {
Sidebar.setView('filter');
},
@@ -164,6 +180,11 @@ const CreateBoard = BlazeComponent.extendComponent({
permission: visibility,
}));
+ Swimlanes.insert({
+ title: 'Default',
+ boardId: this.boardId.get(),
+ });
+
Utils.goBoardId(this.boardId.get());
},