summaryrefslogtreecommitdiffstats
path: root/client/components
diff options
context:
space:
mode:
authorNicu Tofan <nicu.tofan@gmail.com>2018-06-26 19:55:23 +0300
committerNicu Tofan <nicu.tofan@gmail.com>2018-06-26 19:55:23 +0300
commit226d25ca943e3be8256639f0fc9b517cb0c217a0 (patch)
treeb03de764d9675d8a89138668cb5b7a5942b825ad /client/components
parent43dde4a10fc7980089f9344a7be04b8fe673cf28 (diff)
downloadwekan-226d25ca943e3be8256639f0fc9b517cb0c217a0.tar.gz
wekan-226d25ca943e3be8256639f0fc9b517cb0c217a0.tar.bz2
wekan-226d25ca943e3be8256639f0fc9b517cb0c217a0.zip
Introducing third board view: calendar.
A dependency to rzymek:fullcalendar has also been added.
Diffstat (limited to 'client/components')
-rw-r--r--client/components/boards/boardBody.js6
-rw-r--r--client/components/boards/boardHeader.js4
-rw-r--r--client/components/lists/listBody.js2
-rw-r--r--client/components/swimlanes/swimlanes.js2
4 files changed, 12 insertions, 2 deletions
diff --git a/client/components/boards/boardBody.js b/client/components/boards/boardBody.js
index dfe7b8d2..a377dd73 100644
--- a/client/components/boards/boardBody.js
+++ b/client/components/boards/boardBody.js
@@ -98,6 +98,12 @@ BlazeComponent.extendComponent({
return (currentUser.profile.boardView === 'board-view-lists');
},
+ isViewCalendar() {
+ const currentUser = Meteor.user();
+ if (!currentUser) return true;
+ return (currentUser.profile.boardView === 'board-view-cal');
+ },
+
openNewListForm() {
if (this.isViewSwimlanes()) {
this.childComponents('swimlane')[0]
diff --git a/client/components/boards/boardHeader.js b/client/components/boards/boardHeader.js
index b2640474..222cc404 100644
--- a/client/components/boards/boardHeader.js
+++ b/client/components/boards/boardHeader.js
@@ -89,9 +89,11 @@ BlazeComponent.extendComponent({
'click .js-toggle-board-view'() {
const currentUser = Meteor.user();
if (currentUser.profile.boardView === 'board-view-swimlanes') {
- currentUser.setBoardView('board-view-lists');
+ currentUser.setBoardView('board-view-cal');
} else if (currentUser.profile.boardView === 'board-view-lists') {
currentUser.setBoardView('board-view-swimlanes');
+ } else if (currentUser.profile.boardView === 'board-view-cal') {
+ currentUser.setBoardView('board-view-lists');
}
},
'click .js-open-filter-view'() {
diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js
index 4bf7b369..adb2fadb 100644
--- a/client/components/lists/listBody.js
+++ b/client/components/lists/listBody.js
@@ -45,7 +45,7 @@ BlazeComponent.extendComponent({
const boardView = Meteor.user().profile.boardView;
if (boardView === 'board-view-swimlanes')
swimlaneId = this.parentComponent().parentComponent().data()._id;
- else if (boardView === 'board-view-lists')
+ else if ((boardView === 'board-view-lists') || (boardView === 'board-view-cal'))
swimlaneId = Swimlanes.findOne({boardId})._id;
if (title) {
diff --git a/client/components/swimlanes/swimlanes.js b/client/components/swimlanes/swimlanes.js
index 7965c2bc..c67fe6af 100644
--- a/client/components/swimlanes/swimlanes.js
+++ b/client/components/swimlanes/swimlanes.js
@@ -7,6 +7,8 @@ function currentCardIsInThisList(listId, swimlaneId) {
return currentCard && currentCard.listId === listId;
else if (currentUser.profile.boardView === 'board-view-swimlanes')
return currentCard && currentCard.listId === listId && currentCard.swimlaneId === swimlaneId;
+ else if (currentUser.profile.boardView === 'board-view-cal')
+ return currentCard;
else
return false;
}