diff options
author | Lauri Ojansivu <x@xet7.org> | 2018-06-28 00:15:24 +0300 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2018-06-28 00:15:24 +0300 |
commit | 7b9aaddb5be63d04a7dc28078c267628303c20f9 (patch) | |
tree | a06fc10deb885a68d6aa461f87a7923f8abd45ce | |
parent | ae5d2b790845d93ca12445147dcaa02eb5b76dbe (diff) | |
parent | 541dc67a02fbcaaddd106d9aded49c60184d9ce6 (diff) | |
download | wekan-7b9aaddb5be63d04a7dc28078c267628303c20f9.tar.gz wekan-7b9aaddb5be63d04a7dc28078c267628303c20f9.tar.bz2 wekan-7b9aaddb5be63d04a7dc28078c267628303c20f9.zip |
Merge branch 'devel'
60 files changed, 214 insertions, 37 deletions
diff --git a/.meteor/packages b/.meteor/packages index c1b8ab88..8f83280f 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -77,10 +77,11 @@ email@1.2.3 horka:swipebox dynamic-import@0.2.0 staringatlights:fast-render -staringatlights:flow-router mixmax:smart-disconnect accounts-password@1.5.0 cfs:gridfs browser-policy eluck:accounts-lockout +rzymek:fullcalendar +momentjs:moment@2.22.2 diff --git a/.meteor/versions b/.meteor/versions index 2ab1af11..a173e7e4 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -103,6 +103,7 @@ mixmax:smart-disconnect@0.0.4 mobile-status-bar@1.0.14 modules@0.11.0 modules-runtime@0.9.1 +momentjs:moment@2.22.2 mongo@1.3.1 mongo-dev-server@1.1.0 mongo-id@1.0.6 @@ -139,6 +140,7 @@ reactive-var@1.0.11 reload@1.1.11 retry@1.0.9 routepolicy@1.0.12 +rzymek:fullcalendar@3.8.0 service-configuration@1.0.11 session@1.1.7 sha@1.0.9 @@ -155,7 +157,6 @@ srp@1.0.10 standard-minifier-css@1.3.5 standard-minifier-js@2.2.3 staringatlights:fast-render@2.16.5 -staringatlights:flow-router@2.12.2 staringatlights:inject-data@2.0.5 stylus@2.513.13 tap:i18n@1.8.2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 67bf5d07..c7701572 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,18 @@ +# v1.09 2018-06-28 Wekan release + +This release adds the following new features: + +* [Calendar](https://github.com/wekan/wekan/pull/1728). Click Lists / Swimlanes / Calendar. + +and fixes the following bugs: + +* To fix ["title is required"](https://github.com/wekan/wekan/issues/1576) fix only + add-checklist-items and revert all other migration changes](https://github.com/wekan/wekan/issues/1734); +* [Restore invitation code logic](https://github.com/wekan/wekan/pull/1732). Please test and add comment + to those invitation code issues that this fixes. + +Thanks to GitHub users TNick and xet7 for their contributions. + # v1.08 2018-06-27 Wekan release This release adds the following new features: diff --git a/client/components/boards/boardBody.jade b/client/components/boards/boardBody.jade index 29a613b9..b480bc0f 100644 --- a/client/components/boards/boardBody.jade +++ b/client/components/boards/boardBody.jade @@ -25,3 +25,5 @@ template(name="boardBody") +swimlane(this) if isViewLists +listsGroup + if isViewCalendar + +fullcalendar(calendarOptions) diff --git a/client/components/boards/boardBody.js b/client/components/boards/boardBody.js index dfe7b8d2..935c550f 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] @@ -108,6 +114,62 @@ BlazeComponent.extendComponent({ } }, + calendarOptions() { + return { + id: 'calendar-view', + defaultView: 'basicWeek', + header: { + left: 'title', + center: 'agendaDay,listDay,timelineDay agendaWeek,listWeek,timelineWeek month,timelineMonth timelineYear', + right: 'today prev,next', + }, + views: { + basic: { + // options apply to basicWeek and basicDay views + }, + agenda: { + // options apply to agendaWeek and agendaDay views + }, + week: { + // options apply to basicWeek and agendaWeek views + }, + day: { + // options apply to basicDay and agendaDay views + }, + }, + themeSystem: 'jquery-ui', + height: 'parent', + /* TODO: lists as resources: https://fullcalendar.io/docs/vertical-resource-view */ + navLinks: true, + nowIndicator: true, + businessHours: { + // days of week. an array of zero-based day of week integers (0=Sunday) + dow: [ 1, 2, 3, 4, 5 ], // Monday - Thursday + start: '8:00', + end: '18:00', + }, + locale: TAPi18n.getLanguage(), + 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); + }, + }; + }, + events() { return [{ // XXX The board-overlay div should probably be moved to the parent 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/cards/cardDate.js b/client/components/cards/cardDate.js index c3e0524d..02ea09ae 100644 --- a/client/components/cards/cardDate.js +++ b/client/components/cards/cardDate.js @@ -218,10 +218,13 @@ class CardReceivedDate extends CardDate { } classes() { - let classes = 'received-date' + ' '; - if (this.date.get().isBefore(this.now.get(), 'minute') && - this.now.get().isBefore(this.data().dueAt)) { - classes += 'current'; + let classes = 'received-date '; + const dueAt = this.data().dueAt; + if (dueAt) { + if (this.date.get().isBefore(this.now.get(), 'minute') && + this.now.get().isBefore(dueAt)) { + classes += 'current'; + } } return classes; } @@ -249,9 +252,12 @@ class CardStartDate extends CardDate { classes() { let classes = 'start-date' + ' '; - if (this.date.get().isBefore(this.now.get(), 'minute') && - this.now.get().isBefore(this.data().dueAt)) { - classes += 'current'; + const dueAt = this.data().dueAt; + if (dueAt) { + if (this.date.get().isBefore(this.now.get(), 'minute') && + this.now.get().isBefore(dueAt)) { + classes += 'current'; + } } return classes; } @@ -279,18 +285,23 @@ class CardDueDate extends CardDate { classes() { let classes = 'due-date' + ' '; + // if endAt exists & is < dueAt, dueAt doesn't need to be flagged - if ((this.data().endAt !== 0) && - (this.data().endAt !== null) && - (this.data().endAt !== '') && - (this.data().endAt !== undefined) && - (this.date.get().isBefore(this.data().endAt))) + const endAt = this.data().endAt; + const theDate = this.date.get(); + const now = this.now.get(); + + if ((endAt !== 0) && + (endAt !== null) && + (endAt !== '') && + (endAt !== undefined) && + (theDate.isBefore(endAt))) classes += 'current'; - else if (this.now.get().diff(this.date.get(), 'days') >= 2) + else if (now.diff(theDate, 'days') >= 2) classes += 'long-overdue'; - else if (this.now.get().diff(this.date.get(), 'minute') >= 0) + else if (now.diff(theDate, 'minute') >= 0) classes += 'due'; - else if (this.now.get().diff(this.date.get(), 'days') >= -1) + else if (now.diff(theDate, 'days') >= -1) classes += 'almost-due'; return classes; } @@ -318,12 +329,16 @@ class CardEndDate extends CardDate { classes() { let classes = 'end-date' + ' '; - if (this.data.dueAt.diff(this.date.get(), 'days') >= 2) - classes += 'long-overdue'; - else if (this.data.dueAt.diff(this.date.get(), 'days') > 0) - classes += 'due'; - else if (this.data.dueAt.diff(this.date.get(), 'days') <= 0) - classes += 'current'; + const dueAt = this.data.dueAt; + if (dueAt) { + const diff = dueAt.diff(this.date.get(), 'days'); + if (diff >= 2) + classes += 'long-overdue'; + else if (diff > 0) + classes += 'due'; + else if (diff <= 0) + classes += 'current'; + } return classes; } 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/settings/invitationCode.js b/client/components/settings/invitationCode.js index c02f860f..a403d8ab 100644 --- a/client/components/settings/invitationCode.js +++ b/client/components/settings/invitationCode.js @@ -1,6 +1,6 @@ Template.invitationCode.onRendered(() => { const setting = Settings.findOne(); - if (setting || setting.disableRegistration) { + if (!setting || !setting.disableRegistration) { $('#invitationcode').hide(); } }); 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; } diff --git a/i18n/ar.i18n.json b/i18n/ar.i18n.json index e3522abf..47c120e8 100644 --- a/i18n/ar.i18n.json +++ b/i18n/ar.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "قائمة اللوحة", "boards": "لوحات", "board-view": "Board View", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "القائمات", "bucket-example": "مثل « todo list » على سبيل المثال", diff --git a/i18n/bg.i18n.json b/i18n/bg.i18n.json index a09cd94b..c2874364 100644 --- a/i18n/bg.i18n.json +++ b/i18n/bg.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Меню на Таблото", "boards": "Табла", "board-view": "Board View", + "board-view-cal": "Calendar", "board-view-swimlanes": "Коридори", "board-view-lists": "Списъци", "bucket-example": "Like “Bucket List” for example", diff --git a/i18n/br.i18n.json b/i18n/br.i18n.json index 58415db1..fa2c25e2 100644 --- a/i18n/br.i18n.json +++ b/i18n/br.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Board Menu", "boards": "Boards", "board-view": "Board View", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "Lists", "bucket-example": "Like “Bucket List” for example", diff --git a/i18n/ca.i18n.json b/i18n/ca.i18n.json index 66b4a2c1..5badc85e 100644 --- a/i18n/ca.i18n.json +++ b/i18n/ca.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Menú del tauler", "boards": "Taulers", "board-view": "Visió del tauler", + "board-view-cal": "Calendar", "board-view-swimlanes": "Carrils de Natació", "board-view-lists": "Llistes", "bucket-example": "Igual que “Bucket List”, per exemple", diff --git a/i18n/cs.i18n.json b/i18n/cs.i18n.json index aec46191..f067e9d3 100644 --- a/i18n/cs.i18n.json +++ b/i18n/cs.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Menu tabla", "boards": "Tabla", "board-view": "Náhled tabla", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "Seznamy", "bucket-example": "Například \"Než mě odvedou\"", diff --git a/i18n/de.i18n.json b/i18n/de.i18n.json index d0973aa3..756bc8f6 100644 --- a/i18n/de.i18n.json +++ b/i18n/de.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Boardmenü", "boards": "Boards", "board-view": "Boardansicht", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "Listen", "bucket-example": "z.B. \"Löffelliste\"", diff --git a/i18n/el.i18n.json b/i18n/el.i18n.json index 9436d7bd..cd00671a 100644 --- a/i18n/el.i18n.json +++ b/i18n/el.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Board Menu", "boards": "Boards", "board-view": "Board View", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "Λίστες", "bucket-example": "Like “Bucket List” for example", diff --git a/i18n/en-GB.i18n.json b/i18n/en-GB.i18n.json index 13b0ae52..0fe7b237 100644 --- a/i18n/en-GB.i18n.json +++ b/i18n/en-GB.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Board Menu", "boards": "Boards", "board-view": "Board View", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "Lists", "bucket-example": "Like “Bucket List” for example", diff --git a/i18n/en.i18n.json b/i18n/en.i18n.json index 68a7612d..51a9b4cc 100644 --- a/i18n/en.i18n.json +++ b/i18n/en.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Board Menu", "boards": "Boards", "board-view": "Board View", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "Lists", "bucket-example": "Like “Bucket List” for example", diff --git a/i18n/eo.i18n.json b/i18n/eo.i18n.json index 0ef39411..a0897302 100644 --- a/i18n/eo.i18n.json +++ b/i18n/eo.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Board Menu", "boards": "Boards", "board-view": "Board View", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "Listoj", "bucket-example": "Like “Bucket List” for example", diff --git a/i18n/es-AR.i18n.json b/i18n/es-AR.i18n.json index 61a31ebb..97a740e2 100644 --- a/i18n/es-AR.i18n.json +++ b/i18n/es-AR.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Menú del Tablero", "boards": "Tableros", "board-view": "Vista de Tablero", + "board-view-cal": "Calendar", "board-view-swimlanes": "Calles", "board-view-lists": "Listas", "bucket-example": "Como \"Lista de Contenedores\" por ejemplo", diff --git a/i18n/es.i18n.json b/i18n/es.i18n.json index 8a7c5cc5..fa4f2f11 100644 --- a/i18n/es.i18n.json +++ b/i18n/es.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Menú del tablero", "boards": "Tableros", "board-view": "Vista del tablero", + "board-view-cal": "Calendar", "board-view-swimlanes": "Carriles", "board-view-lists": "Listas", "bucket-example": "Como “Cosas por hacer” por ejemplo", diff --git a/i18n/eu.i18n.json b/i18n/eu.i18n.json index a2d99631..9bd3510a 100644 --- a/i18n/eu.i18n.json +++ b/i18n/eu.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Arbelaren menua", "boards": "Arbelak", "board-view": "Board View", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "Zerrendak", "bucket-example": "Esaterako \"Pertz zerrenda\"", diff --git a/i18n/fa.i18n.json b/i18n/fa.i18n.json index 107b5894..caa87ded 100644 --- a/i18n/fa.i18n.json +++ b/i18n/fa.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "منوی تخته", "boards": "تختهها", "board-view": "نمایش تخته", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "فهرستها", "bucket-example": "برای مثال چیزی شبیه \"لیست سبدها\"", diff --git a/i18n/fi.i18n.json b/i18n/fi.i18n.json index 0b363b7b..34e58d1b 100644 --- a/i18n/fi.i18n.json +++ b/i18n/fi.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Taulu valikko", "boards": "Taulut", "board-view": "Taulu näkymä", + "board-view-cal": "Kalenteri", "board-view-swimlanes": "Swimlanet", "board-view-lists": "Listat", "bucket-example": "Kuten “Laatikko lista” esimerkiksi", diff --git a/i18n/fr.i18n.json b/i18n/fr.i18n.json index 2cdbe2fc..53e45eb8 100644 --- a/i18n/fr.i18n.json +++ b/i18n/fr.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Menu du tableau", "boards": "Tableaux", "board-view": "Vue du tableau", + "board-view-cal": "Calendar", "board-view-swimlanes": "Couloirs", "board-view-lists": "Listes", "bucket-example": "Comme « todo list » par exemple", diff --git a/i18n/gl.i18n.json b/i18n/gl.i18n.json index 7462b1d3..25e3e662 100644 --- a/i18n/gl.i18n.json +++ b/i18n/gl.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Board Menu", "boards": "Taboleiros", "board-view": "Board View", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "Listas", "bucket-example": "Like “Bucket List” for example", diff --git a/i18n/he.i18n.json b/i18n/he.i18n.json index 943062e1..6d5dd812 100644 --- a/i18n/he.i18n.json +++ b/i18n/he.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "תפריט לוח", "boards": "לוחות", "board-view": "תצוגת לוח", + "board-view-cal": "Calendar", "board-view-swimlanes": "מסלולים", "board-view-lists": "רשימות", "bucket-example": "כמו למשל „רשימת המשימות“", diff --git a/i18n/hu.i18n.json b/i18n/hu.i18n.json index a4fc3c8c..e14e7995 100644 --- a/i18n/hu.i18n.json +++ b/i18n/hu.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Tábla menü", "boards": "Táblák", "board-view": "Tábla nézet", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "Listák", "bucket-example": "Mint például „Bakancslista”", diff --git a/i18n/hy.i18n.json b/i18n/hy.i18n.json index fcbb7a9a..0911aed1 100644 --- a/i18n/hy.i18n.json +++ b/i18n/hy.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Board Menu", "boards": "Boards", "board-view": "Board View", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "Lists", "bucket-example": "Like “Bucket List” for example", diff --git a/i18n/id.i18n.json b/i18n/id.i18n.json index 8eb0d2de..3954f67c 100644 --- a/i18n/id.i18n.json +++ b/i18n/id.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Menu Panel", "boards": "Panel", "board-view": "Board View", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "Daftar", "bucket-example": "Contohnya seperti “Bucket List” ", diff --git a/i18n/ig.i18n.json b/i18n/ig.i18n.json index ece8e7cc..f522a92c 100644 --- a/i18n/ig.i18n.json +++ b/i18n/ig.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Board Menu", "boards": "Boards", "board-view": "Board View", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "Lists", "bucket-example": "Like “Bucket List” for example", diff --git a/i18n/it.i18n.json b/i18n/it.i18n.json index d3e5870f..99c84699 100644 --- a/i18n/it.i18n.json +++ b/i18n/it.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Menu bacheca", "boards": "Bacheche", "board-view": "Visualizza bacheca", + "board-view-cal": "Calendar", "board-view-swimlanes": "Corsie", "board-view-lists": "Liste", "bucket-example": "Per esempio come \"una lista di cose da fare\"", diff --git a/i18n/ja.i18n.json b/i18n/ja.i18n.json index 0f478842..4b8a6d8d 100644 --- a/i18n/ja.i18n.json +++ b/i18n/ja.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "ボードメニュー", "boards": "ボード", "board-view": "Board View", + "board-view-cal": "Calendar", "board-view-swimlanes": "スイムレーン", "board-view-lists": "リスト", "bucket-example": "例:バケットリスト", diff --git a/i18n/ka.i18n.json b/i18n/ka.i18n.json index f8f74ce7..53c2f91a 100644 --- a/i18n/ka.i18n.json +++ b/i18n/ka.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Board Menu", "boards": "Boards", "board-view": "Board View", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "Lists", "bucket-example": "Like “Bucket List” for example", diff --git a/i18n/km.i18n.json b/i18n/km.i18n.json index 29b82bf5..9484c7cc 100644 --- a/i18n/km.i18n.json +++ b/i18n/km.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Board Menu", "boards": "Boards", "board-view": "Board View", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "Lists", "bucket-example": "Like “Bucket List” for example", diff --git a/i18n/ko.i18n.json b/i18n/ko.i18n.json index b9996c88..97963a8a 100644 --- a/i18n/ko.i18n.json +++ b/i18n/ko.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "보드 메뉴", "boards": "보드", "board-view": "Board View", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "목록들", "bucket-example": "예: “프로젝트 이름“ 입력", diff --git a/i18n/lv.i18n.json b/i18n/lv.i18n.json index 47667c40..46d958cc 100644 --- a/i18n/lv.i18n.json +++ b/i18n/lv.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Board Menu", "boards": "Boards", "board-view": "Board View", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "Lists", "bucket-example": "Like “Bucket List” for example", diff --git a/i18n/mn.i18n.json b/i18n/mn.i18n.json index 8f2475fe..b5b97822 100644 --- a/i18n/mn.i18n.json +++ b/i18n/mn.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Board Menu", "boards": "Boards", "board-view": "Board View", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "Lists", "bucket-example": "Like “Bucket List” for example", diff --git a/i18n/nb.i18n.json b/i18n/nb.i18n.json index 30e1963b..1d09cb7c 100644 --- a/i18n/nb.i18n.json +++ b/i18n/nb.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Tavlemeny", "boards": "Tavler", "board-view": "Board View", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "Lists", "bucket-example": "Som \"Bucket List\" for eksempel", diff --git a/i18n/nl.i18n.json b/i18n/nl.i18n.json index 903f6a8f..5dd23d41 100644 --- a/i18n/nl.i18n.json +++ b/i18n/nl.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Bord menu", "boards": "Borden", "board-view": "Bord overzicht", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "Lijsten", "bucket-example": "Zoals \"Bucket List\" bijvoorbeeld", diff --git a/i18n/pl.i18n.json b/i18n/pl.i18n.json index 3f618075..1d52d2ee 100644 --- a/i18n/pl.i18n.json +++ b/i18n/pl.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Menu tablicy", "boards": "Tablice", "board-view": "Board View", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "Listy", "bucket-example": "Like “Bucket List” for example", diff --git a/i18n/pt-BR.i18n.json b/i18n/pt-BR.i18n.json index 3193da3e..15496c0d 100644 --- a/i18n/pt-BR.i18n.json +++ b/i18n/pt-BR.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Menu do Quadro", "boards": "Quadros", "board-view": "Visão de quadro", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "Listas", "bucket-example": "\"Bucket List\", por exemplo", diff --git a/i18n/pt.i18n.json b/i18n/pt.i18n.json index 7404cc09..9f8b9b96 100644 --- a/i18n/pt.i18n.json +++ b/i18n/pt.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Board Menu", "boards": "Boards", "board-view": "Board View", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "Lists", "bucket-example": "Like “Bucket List” for example", diff --git a/i18n/ro.i18n.json b/i18n/ro.i18n.json index 3795e189..0d854bbd 100644 --- a/i18n/ro.i18n.json +++ b/i18n/ro.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Board Menu", "boards": "Boards", "board-view": "Board View", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "Liste", "bucket-example": "Like “Bucket List” for example", diff --git a/i18n/ru.i18n.json b/i18n/ru.i18n.json index 5ad4a4fb..1b85c355 100644 --- a/i18n/ru.i18n.json +++ b/i18n/ru.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Меню доски", "boards": "Доски", "board-view": "Вид доски", + "board-view-cal": "Calendar", "board-view-swimlanes": "Дорожки", "board-view-lists": "Списки", "bucket-example": "Например “Список дел”", diff --git a/i18n/sr.i18n.json b/i18n/sr.i18n.json index 4debc5e5..853e867d 100644 --- a/i18n/sr.i18n.json +++ b/i18n/sr.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Meni table", "boards": "Table", "board-view": "Board View", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "Lists", "bucket-example": "Na primer \"Lista zadataka\"", diff --git a/i18n/sv.i18n.json b/i18n/sv.i18n.json index ba9c8f3f..164a5620 100644 --- a/i18n/sv.i18n.json +++ b/i18n/sv.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Anslagstavla meny", "boards": "Anslagstavlor", "board-view": "Anslagstavelsvy", + "board-view-cal": "Calendar", "board-view-swimlanes": "Simbanor", "board-view-lists": "Listor", "bucket-example": "Gilla \"att-göra-innan-jag-dör-lista\" till exempel", diff --git a/i18n/ta.i18n.json b/i18n/ta.i18n.json index f8f74ce7..53c2f91a 100644 --- a/i18n/ta.i18n.json +++ b/i18n/ta.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Board Menu", "boards": "Boards", "board-view": "Board View", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "Lists", "bucket-example": "Like “Bucket List” for example", diff --git a/i18n/th.i18n.json b/i18n/th.i18n.json index 673e4d80..e7048f6e 100644 --- a/i18n/th.i18n.json +++ b/i18n/th.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "เมนูบอร์ด", "boards": "บอร์ด", "board-view": "Board View", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "รายการ", "bucket-example": "ตัวอย่างเช่น “ระบบที่ต้องทำ”", diff --git a/i18n/tr.i18n.json b/i18n/tr.i18n.json index b7a35156..03798130 100644 --- a/i18n/tr.i18n.json +++ b/i18n/tr.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Pano menüsü", "boards": "Panolar", "board-view": "Pano Görünümü", + "board-view-cal": "Calendar", "board-view-swimlanes": "Kulvarlar", "board-view-lists": "Listeler", "bucket-example": "Örn: \"Marketten Alacaklarım\"", diff --git a/i18n/uk.i18n.json b/i18n/uk.i18n.json index 1d6605d9..ef76ed5f 100644 --- a/i18n/uk.i18n.json +++ b/i18n/uk.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Board Menu", "boards": "Дошки", "board-view": "Board View", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "Lists", "bucket-example": "Like “Bucket List” for example", diff --git a/i18n/vi.i18n.json b/i18n/vi.i18n.json index 9529b016..320942e1 100644 --- a/i18n/vi.i18n.json +++ b/i18n/vi.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "Board Menu", "boards": "Bảng", "board-view": "Board View", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "Lists", "bucket-example": "Like “Bucket List” for example", diff --git a/i18n/zh-CN.i18n.json b/i18n/zh-CN.i18n.json index de79364c..3205f107 100644 --- a/i18n/zh-CN.i18n.json +++ b/i18n/zh-CN.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "看板菜单", "boards": "看板", "board-view": "看板视图", + "board-view-cal": "Calendar", "board-view-swimlanes": "泳道图", "board-view-lists": "列表", "bucket-example": "例如 “目标清单”", diff --git a/i18n/zh-TW.i18n.json b/i18n/zh-TW.i18n.json index 043cad12..88e9bc18 100644 --- a/i18n/zh-TW.i18n.json +++ b/i18n/zh-TW.i18n.json @@ -100,6 +100,7 @@ "boardMenuPopup-title": "看板選單", "boards": "看板", "board-view": "Board View", + "board-view-cal": "Calendar", "board-view-swimlanes": "Swimlanes", "board-view-lists": "清單", "bucket-example": "例如 “目標清單”", diff --git a/models/boards.js b/models/boards.js index 911d82a1..3b6c280b 100644 --- a/models/boards.js +++ b/models/boards.js @@ -284,6 +284,33 @@ Boards.helpers({ return Cards.find(query, projection); }, + + cardsInInterval(start, end) { + return Cards.find({ + $or: [ + { + startAt: { + $lte: start, + }, endAt: { + $gte: start, + }, + }, { + startAt: { + $lte: end, + }, endAt: { + $gte: end, + }, + }, { + startAt: { + $gte: start, + }, endAt: { + $lte: end, + }, + }, + ], + }); + }, + }); Boards.mutations({ diff --git a/models/users.js b/models/users.js index 0093f7cb..5a7fbbe5 100644 --- a/models/users.js +++ b/models/users.js @@ -100,6 +100,11 @@ Users.attachSchema(new SimpleSchema({ 'profile.boardView': { type: String, optional: true, + allowedValues: [ + 'board-view-lists', + 'board-view-swimlanes', + 'board-view-cal', + ], }, services: { type: Object, diff --git a/package.json b/package.json index 6dd21217..e6113045 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wekan", - "version": "1.08.0", + "version": "1.09.0", "description": "The open-source Trello-like kanban", "private": true, "scripts": { diff --git a/sandstorm-pkgdef.capnp b/sandstorm-pkgdef.capnp index 56c0640d..1553133e 100644 --- a/sandstorm-pkgdef.capnp +++ b/sandstorm-pkgdef.capnp @@ -22,10 +22,10 @@ const pkgdef :Spk.PackageDefinition = ( appTitle = (defaultText = "Wekan"), # The name of the app as it is displayed to the user. - appVersion = 93, + appVersion = 94, # Increment this for every release. - appMarketingVersion = (defaultText = "1.07.0~2018-06-27"), + appMarketingVersion = (defaultText = "1.09.0~2018-06-28"), # Human-readable presentation of the app version. minUpgradableAppVersion = 0, diff --git a/server/migrations.js b/server/migrations.js index 976e478c..91ab4cb9 100644 --- a/server/migrations.js +++ b/server/migrations.js @@ -55,7 +55,7 @@ Migrations.add('lowercase-board-permission', () => { // Security migration: see https://github.com/wekan/wekan/issues/99 Migrations.add('change-attachments-type-for-non-images', () => { const newTypeForNonImage = 'application/octet-stream'; - Attachments.forEach((file) => { + Attachments.find().forEach((file) => { if (!file.isImage()) { Attachments.update(file._id, { $set: { @@ -68,7 +68,7 @@ Migrations.add('change-attachments-type-for-non-images', () => { }); Migrations.add('card-covers', () => { - Cards.forEach((card) => { + Cards.find().forEach((card) => { const cover = Attachments.findOne({ cardId: card._id, cover: true }); if (cover) { Cards.update(card._id, {$set: {coverId: cover._id}}, noValidate); @@ -86,7 +86,7 @@ Migrations.add('use-css-class-for-boards-colors', () => { '#2C3E50': 'midnight', '#E67E22': 'pumpkin', }; - Boards.forEach((board) => { + Boards.find().forEach((board) => { const oldBoardColor = board.background.color; const newBoardColor = associationTable[oldBoardColor]; Boards.update(board._id, { @@ -97,7 +97,7 @@ Migrations.add('use-css-class-for-boards-colors', () => { }); Migrations.add('denormalize-star-number-per-board', () => { - Boards.forEach((board) => { + Boards.find().forEach((board) => { const nStars = Users.find({'profile.starredBoards': board._id}).count(); Boards.update(board._id, {$set: {stars: nStars}}, noValidate); }); @@ -132,7 +132,7 @@ Migrations.add('add-member-isactive-field', () => { }); Migrations.add('add-sort-checklists', () => { - Checklists.forEach((checklist, index) => { + Checklists.find().forEach((checklist, index) => { if (!checklist.hasOwnProperty('sort')) { Checklists.direct.update( checklist._id, @@ -153,7 +153,7 @@ Migrations.add('add-sort-checklists', () => { }); Migrations.add('add-swimlanes', () => { - Boards.forEach((board) => { + Boards.find().forEach((board) => { const swimlane = Swimlanes.findOne({ boardId: board._id }); let swimlaneId = ''; if (swimlane) @@ -177,7 +177,7 @@ Migrations.add('add-swimlanes', () => { }); Migrations.add('add-views', () => { - Boards.forEach((board) => { + Boards.find().forEach((board) => { if (!board.hasOwnProperty('view')) { Boards.direct.update( { _id: board._id }, @@ -210,7 +210,7 @@ Migrations.add('add-checklist-items', () => { }); Migrations.add('add-profile-view', () => { - Users.forEach((user) => { + Users.find().forEach((user) => { if (!user.hasOwnProperty('profile.boardView')) { // Set default view Users.direct.update( |