summaryrefslogtreecommitdiffstats
path: root/client/components
diff options
context:
space:
mode:
authorNicu Tofan <nicu.tofan@gmail.com>2018-06-27 22:37:32 +0300
committerNicu Tofan <nicu.tofan@gmail.com>2018-06-27 22:37:32 +0300
commit374e9865792dd8219d1d7d10fcc23f98ed7c5817 (patch)
treed66c5c93aefb16e4526ce3a4d5e9c0bdea2bf032 /client/components
parent3c4549fe64c8b57f1f9e2eb700889aa1488ad056 (diff)
downloadwekan-374e9865792dd8219d1d7d10fcc23f98ed7c5817.tar.gz
wekan-374e9865792dd8219d1d7d10fcc23f98ed7c5817.tar.bz2
wekan-374e9865792dd8219d1d7d10fcc23f98ed7c5817.zip
Can show card on event click
Diffstat (limited to 'client/components')
-rw-r--r--client/components/boards/boardBody.jade4
-rw-r--r--client/components/boards/boardBody.js24
2 files changed, 26 insertions, 2 deletions
diff --git a/client/components/boards/boardBody.jade b/client/components/boards/boardBody.jade
index 0a454e92..9e4b9c61 100644
--- a/client/components/boards/boardBody.jade
+++ b/client/components/boards/boardBody.jade
@@ -29,7 +29,7 @@ template(name="boardBody")
+calendarView
template(name="calendarView")
- .swimlane.list-group.js-lists
+ .calendar-view.swimlane
if currentCard
+cardDetails(currentCard)
- +fullcalendar
+ +fullcalendar(calendarOptions)
diff --git a/client/components/boards/boardBody.js b/client/components/boards/boardBody.js
index 911b0120..1308c280 100644
--- a/client/components/boards/boardBody.js
+++ b/client/components/boards/boardBody.js
@@ -150,4 +150,28 @@ BlazeComponent.extendComponent({
onRendered() {
},
+ calendarOptions() {
+ return {
+ id: 'calendar-view',
+ defaultView: 'basicWeek',
+ events(start, end, timezone, callback) {
+ const currentBoard = Boards.findOne(Session.get('currentBoard'));
+ const events = [];
+ currentBoard.cardsInInterval(start.toDate(), end.toDate()).forEach(function(card){
+ events.push({
+ id: card.id,
+ title: card.title,
+ start: card.startAt,
+ end: card.endAt,
+ url: FlowRouter.url('card', {
+ boardId: currentBoard._id,
+ slug: currentBoard.slug,
+ cardId: card._id,
+ }),
+ });
+ });
+ callback(events);
+ },
+ };
+ },
}).register('calendarView');