Introducing third board view: calendar.

A dependency to rzymek:fullcalendar has also been added.
This commit is contained in:
Nicu Tofan 2018-06-26 19:55:23 +03:00
parent 43dde4a10f
commit 226d25ca94
No known key found for this signature in database
GPG key ID: 7EE66E95E64FD0B7
8 changed files with 21 additions and 2 deletions

View file

@ -84,3 +84,4 @@ accounts-password@1.5.0
cfs:gridfs cfs:gridfs
browser-policy browser-policy
eluck:accounts-lockout eluck:accounts-lockout
rzymek:fullcalendar

View file

@ -103,6 +103,7 @@ mixmax:smart-disconnect@0.0.4
mobile-status-bar@1.0.14 mobile-status-bar@1.0.14
modules@0.11.0 modules@0.11.0
modules-runtime@0.9.1 modules-runtime@0.9.1
momentjs:moment@2.8.4
mongo@1.3.1 mongo@1.3.1
mongo-dev-server@1.1.0 mongo-dev-server@1.1.0
mongo-id@1.0.6 mongo-id@1.0.6
@ -139,6 +140,7 @@ reactive-var@1.0.11
reload@1.1.11 reload@1.1.11
retry@1.0.9 retry@1.0.9
routepolicy@1.0.12 routepolicy@1.0.12
rzymek:fullcalendar@3.8.0
service-configuration@1.0.11 service-configuration@1.0.11
session@1.1.7 session@1.1.7
sha@1.0.9 sha@1.0.9

View file

@ -98,6 +98,12 @@ BlazeComponent.extendComponent({
return (currentUser.profile.boardView === 'board-view-lists'); return (currentUser.profile.boardView === 'board-view-lists');
}, },
isViewCalendar() {
const currentUser = Meteor.user();
if (!currentUser) return true;
return (currentUser.profile.boardView === 'board-view-cal');
},
openNewListForm() { openNewListForm() {
if (this.isViewSwimlanes()) { if (this.isViewSwimlanes()) {
this.childComponents('swimlane')[0] this.childComponents('swimlane')[0]

View file

@ -89,9 +89,11 @@ BlazeComponent.extendComponent({
'click .js-toggle-board-view'() { 'click .js-toggle-board-view'() {
const currentUser = Meteor.user(); const currentUser = Meteor.user();
if (currentUser.profile.boardView === 'board-view-swimlanes') { 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') { } else if (currentUser.profile.boardView === 'board-view-lists') {
currentUser.setBoardView('board-view-swimlanes'); currentUser.setBoardView('board-view-swimlanes');
} else if (currentUser.profile.boardView === 'board-view-cal') {
currentUser.setBoardView('board-view-lists');
} }
}, },
'click .js-open-filter-view'() { 'click .js-open-filter-view'() {

View file

@ -45,7 +45,7 @@ BlazeComponent.extendComponent({
const boardView = Meteor.user().profile.boardView; const boardView = Meteor.user().profile.boardView;
if (boardView === 'board-view-swimlanes') if (boardView === 'board-view-swimlanes')
swimlaneId = this.parentComponent().parentComponent().data()._id; 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; swimlaneId = Swimlanes.findOne({boardId})._id;
if (title) { if (title) {

View file

@ -7,6 +7,8 @@ function currentCardIsInThisList(listId, swimlaneId) {
return currentCard && currentCard.listId === listId; return currentCard && currentCard.listId === listId;
else if (currentUser.profile.boardView === 'board-view-swimlanes') else if (currentUser.profile.boardView === 'board-view-swimlanes')
return currentCard && currentCard.listId === listId && currentCard.swimlaneId === swimlaneId; return currentCard && currentCard.listId === listId && currentCard.swimlaneId === swimlaneId;
else if (currentUser.profile.boardView === 'board-view-cal')
return currentCard;
else else
return false; return false;
} }

View file

@ -100,6 +100,7 @@
"boardMenuPopup-title": "Board Menu", "boardMenuPopup-title": "Board Menu",
"boards": "Boards", "boards": "Boards",
"board-view": "Board View", "board-view": "Board View",
"board-view-cal": "Calendar",
"board-view-swimlanes": "Swimlanes", "board-view-swimlanes": "Swimlanes",
"board-view-lists": "Lists", "board-view-lists": "Lists",
"bucket-example": "Like “Bucket List” for example", "bucket-example": "Like “Bucket List” for example",

View file

@ -100,6 +100,11 @@ Users.attachSchema(new SimpleSchema({
'profile.boardView': { 'profile.boardView': {
type: String, type: String,
optional: true, optional: true,
allowedValues: [
'board-view-lists',
'board-view-swimlanes',
'board-view-cal',
],
}, },
services: { services: {
type: Object, type: Object,