diff options
author | amadilsons <joao.amado.95@gmail.com> | 2017-09-27 14:42:18 +0200 |
---|---|---|
committer | amadilsons <joao.amado.95@gmail.com> | 2017-09-27 14:42:18 +0200 |
commit | 75f15f1be218bbfc4a06c0c57c4b1043091b5dc8 (patch) | |
tree | ef94de1a5a5ed5f975d00423075014987f6b6bc4 | |
parent | bbe37cfad83f261e2c24cca3b4f31baa0e818f58 (diff) | |
parent | eb945f26a3be316fb2ae4452d6db45a11f8b91d4 (diff) | |
download | wekan-75f15f1be218bbfc4a06c0c57c4b1043091b5dc8.tar.gz wekan-75f15f1be218bbfc4a06c0c57c4b1043091b5dc8.tar.bz2 wekan-75f15f1be218bbfc4a06c0c57c4b1043091b5dc8.zip |
Merge branch 'master' of https://github.com/wekan/wekan into issue881
46 files changed, 215 insertions, 52 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index af0c659d..5a22e813 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,48 @@ +# v0.43 2017-09-25 Wekan release + +This release fixes the following bugs: + +* [Add emojis back, because removing them broke local dev Sandstorm](https://github.com/wekan/wekan/issues/1248). + +Thanks to GitHub user xet7 for contributions. + +# v0.42 2017-09-25 Wekan release + +This release fixes the following bugs: + +* [Remove emoji support, because it breaks MAC addresses, urls, code etc](https://github.com/wekan/wekan/issues/1248). + +Thanks to GitHub user xet7 for contributions. + +# v0.41 2017-09-25 Wekan release + +This release fixes the following bugs: + +* [Can't create user and login after install. Reverting REST API: Create user despite disabling registration](https://github.com/wekan/wekan/issues/1249). + +Thanks to GitHub user xet7 for contributions. + +# v0.40 2017-09-25 Wekan release + +This release adds the following new features: + +* [Add translations (en/de/fi) for email notifications regarding checklists and checklist + items](https://github.com/wekan/wekan/pull/1238); +* [Added plus button to add card on top of the list](https://github.com/wekan/wekan/pull/1244); +* [REST API: Create user despite disabling registration](https://github.com/wekan/wekan/issues/1232). + +and fixes the following bugs: + +* [Checklist items are lost when moving items to another checklist](https://github.com/wekan/wekan/pull/1240); +* [Keep state of checklist items when moved to another checklist](https://github.com/wekan/wekan/pull/1242). + +Thanks to GitHub users GhassenRjab, mario-orlicky, soohwa, umbertooo and xet7 for their contributions. + # v0.39 2017-09-18 Wekan release This release adds the following new features: -* [Import checklist sort attributes from Wekan and Trello](https://github.com/wekan/wekan/pull/1226) +* [Import checklist sort attributes from Wekan and Trello](https://github.com/wekan/wekan/pull/1226). Thanks to GitHub user GhassenRjab for contributions. @@ -10,7 +50,7 @@ Thanks to GitHub user GhassenRjab for contributions. This release adds the following new features: -* [Reorder checklists. Move checklist item to another checklist.](https://github.com/wekan/wekan/pull/1215) +* [Reorder checklists. Move checklist item to another checklist.](https://github.com/wekan/wekan/pull/1215); * [Card title is now pre-filled in copy card dialog](https://github.com/wekan/wekan/pull/1214). Thanks to GitHub user frmwrk123 for contributions. diff --git a/client/components/cards/checklists.jade b/client/components/cards/checklists.jade index 74da5863..559dd83e 100644 --- a/client/components/cards/checklists.jade +++ b/client/components/cards/checklists.jade @@ -66,7 +66,7 @@ template(name="editChecklistItemForm") template(name="checklistItems") .checklist-items.js-checklist-items - each item in checklist.getItems + each item in checklist.getItemsSorted +inlinedForm(classNames="js-edit-checklist-item" item = item checklist = checklist) +editChecklistItemForm(type = 'item' item = item checklist = checklist) else diff --git a/client/components/cards/checklists.js b/client/components/cards/checklists.js index 257f1ec8..0596d7eb 100644 --- a/client/components/cards/checklists.js +++ b/client/components/cards/checklists.js @@ -20,24 +20,26 @@ function initSorting(items) { }); items.sortable('cancel'); const formerParent = ui.item.parents('.js-checklist-items'); - let checklist = Blaze.getData(parent.get(0)).checklist; + const checklist = Blaze.getData(parent.get(0)).checklist; const oldChecklist = Blaze.getData(formerParent.get(0)).checklist; if (oldChecklist._id !== checklist._id) { const currentItem = Blaze.getData(ui.item.get(0)).item; for (let i = 0; i < orderedItems.length; i++) { - let itemId = orderedItems[i]; + const itemId = orderedItems[i]; if (itemId !== currentItem._id) continue; - checklist.addItem(currentItem.title); - checklist = Checklists.findOne({_id: checklist._id}); - itemId = checklist._id + (checklist.newItemIndex - 1); - if (currentItem.finished) { - checklist.finishItem(itemId); - } - orderedItems[i] = itemId; - oldChecklist.removeItem(currentItem._id); + const newItem = { + _id: checklist.getNewItemId(), + title: currentItem.title, + sort: i, + isFinished: currentItem.isFinished, + }; + checklist.addFullItem(newItem); + orderedItems[i] = currentItem._id; + oldChecklist.removeItem(itemId); } + } else { + checklist.sortItems(orderedItems); } - checklist.sortItems(orderedItems); }, }); } diff --git a/client/components/lists/list.styl b/client/components/lists/list.styl index cf939a6e..5e20476e 100644 --- a/client/components/lists/list.styl +++ b/client/components/lists/list.styl @@ -69,13 +69,16 @@ padding-left: 10px color: #a6a6a6 - .list-header-menu-icon + .list-header-menu position: absolute padding: 7px margin-top: 1px top: -@padding right: -@padding + .list-header-plus-icon + color: #a6a6a6 + .list-body flex: 1 display: flex diff --git a/client/components/lists/listHeader.jade b/client/components/lists/listHeader.jade index 11905586..68336320 100644 --- a/client/components/lists/listHeader.jade +++ b/client/components/lists/listHeader.jade @@ -13,7 +13,9 @@ template(name="listHeader") if currentUser.isBoardMember if isWatching i.list-header-watch-icon.fa.fa-eye - a.list-header-menu-icon.fa.fa-navicon.js-open-list-menu + div.list-header-menu + a.js-add-card.fa.fa-plus.list-header-plus-icon + a.fa.fa-navicon.js-open-list-menu template(name="editListTitleForm") .list-composer @@ -28,10 +30,9 @@ template(name="listActionPopup") unless currentUser.isCommentOnly hr ul.pop-over-list - li: a.js-add-card {{_ 'add-card'}} if cards.count li: a.js-select-cards {{_ 'list-select-cards'}} - hr + hr ul.pop-over-list li: a.js-close-list {{_ 'archive-list'}} hr diff --git a/client/components/lists/listHeader.js b/client/components/lists/listHeader.js index 1ad9f9dd..7fe42884 100644 --- a/client/components/lists/listHeader.js +++ b/client/components/lists/listHeader.js @@ -24,6 +24,13 @@ BlazeComponent.extendComponent({ events() { return [{ 'click .js-open-list-menu': Popup.open('listAction'), + 'click .js-add-card' () { + const listDom = document.getElementById(`js-list-${this.currentData()._id}`); + const listComponent = BlazeComponent.getComponentForElement(listDom); + listComponent.openForm({ + position: 'top', + }); + }, submit: this.editTitle, }]; }, @@ -36,14 +43,6 @@ Template.listActionPopup.helpers({ }); Template.listActionPopup.events({ - 'click .js-add-card' () { - const listDom = document.getElementById(`js-list-${this._id}`); - const listComponent = BlazeComponent.getComponentForElement(listDom); - listComponent.openForm({ - position: 'top', - }); - Popup.close(); - }, 'click .js-list-subscribe' () {}, 'click .js-select-cards' () { const cardIds = this.allCards().map((card) => card._id); diff --git a/i18n/ar.i18n.json b/i18n/ar.i18n.json index 0d8fd7df..ebf743d8 100644 --- a/i18n/ar.i18n.json +++ b/i18n/ar.i18n.json @@ -2,6 +2,8 @@ "accept": "اقبلboard", "act-activity-notify": "[Wekan] اشعار عن نشاط", "act-addAttachment": "ربط __attachment__ الى __card__", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "علق على __comment__ : __card__", "act-createBoard": "احدث __board__", "act-createCard": "اضاف __card__ الى __list__", diff --git a/i18n/br.i18n.json b/i18n/br.i18n.json index f757ac28..c6882ba1 100644 --- a/i18n/br.i18n.json +++ b/i18n/br.i18n.json @@ -2,6 +2,8 @@ "accept": "Asantiñ", "act-activity-notify": "[Wekan] Activity Notification", "act-addAttachment": "attached __attachment__ to __card__", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "commented on __card__: __comment__", "act-createBoard": "created __board__", "act-createCard": "added __card__ to __list__", diff --git a/i18n/ca.i18n.json b/i18n/ca.i18n.json index f6f3de74..a3a0e7aa 100644 --- a/i18n/ca.i18n.json +++ b/i18n/ca.i18n.json @@ -2,6 +2,8 @@ "accept": "Accepta", "act-activity-notify": "[Wekan] Notificació d'activitat", "act-addAttachment": "adjuntat __attachment__ a __card__", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "comentat a __card__: __comment__", "act-createBoard": "creat __board__", "act-createCard": "afegit/da __card__ a __list__", diff --git a/i18n/cs.i18n.json b/i18n/cs.i18n.json index c8f3f74d..ca2cf7ef 100644 --- a/i18n/cs.i18n.json +++ b/i18n/cs.i18n.json @@ -2,6 +2,8 @@ "accept": "Přijmout", "act-activity-notify": "[Wekan] Notifikace aktivit", "act-addAttachment": "přiložen __attachment__ do __card__", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "komentář k __card__: __comment__", "act-createBoard": "přidání __board__", "act-createCard": "přidání __card__ do __list__", diff --git a/i18n/de.i18n.json b/i18n/de.i18n.json index bf1004c3..bc1120ed 100644 --- a/i18n/de.i18n.json +++ b/i18n/de.i18n.json @@ -2,6 +2,8 @@ "accept": "Akzeptieren", "act-activity-notify": "[Wekan] Aktivitätsbenachrichtigung", "act-addAttachment": "hat __attachment__ an __card__ angehängt", + "act-addChecklist": "hat die Checklist __checklist__ zu __card__ hinzugefügt", + "act-addChecklistItem": "hat __checklistItem__ zur Checkliste __checklist__ in __card__ hinzugefügt", "act-addComment": "hat __card__ kommentiert: __comment__", "act-createBoard": "hat __board__ erstellt", "act-createCard": "hat __card__ zu __list__ hinzugefügt", diff --git a/i18n/en-GB.i18n.json b/i18n/en-GB.i18n.json index 7d53a1eb..8db041a5 100644 --- a/i18n/en-GB.i18n.json +++ b/i18n/en-GB.i18n.json @@ -2,6 +2,8 @@ "accept": "Accept", "act-activity-notify": "[Wekan] Activity Notification", "act-addAttachment": "attached _ attachment _ to _ card _", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "commented on __card__: __comment__", "act-createBoard": "created __board__", "act-createCard": "added __card__ to __list__", diff --git a/i18n/en.i18n.json b/i18n/en.i18n.json index 62b9cc67..64a720db 100644 --- a/i18n/en.i18n.json +++ b/i18n/en.i18n.json @@ -2,6 +2,8 @@ "accept": "Accept", "act-activity-notify": "[Wekan] Activity Notification", "act-addAttachment": "attached __attachment__ to __card__", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "commented on __card__: __comment__", "act-createBoard": "created __board__", "act-createCard": "added __card__ to __list__", diff --git a/i18n/eo.i18n.json b/i18n/eo.i18n.json index 8143516b..5da9e81a 100644 --- a/i18n/eo.i18n.json +++ b/i18n/eo.i18n.json @@ -2,6 +2,8 @@ "accept": "Akcepti", "act-activity-notify": "[Wekan] Activity Notification", "act-addAttachment": "attached __attachment__ to __card__", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "commented on __card__: __comment__", "act-createBoard": "kreiis __board__", "act-createCard": "aldonis __card__ al __list__", diff --git a/i18n/es.i18n.json b/i18n/es.i18n.json index 3d1ba84a..5dca2df5 100644 --- a/i18n/es.i18n.json +++ b/i18n/es.i18n.json @@ -2,6 +2,8 @@ "accept": "Aceptar", "act-activity-notify": "[Wekan] Notificación de Actividad", "act-addAttachment": "adjuntado __attachment__ a __card__", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "comentado en __card__: __comment__", "act-createBoard": "creado __board__", "act-createCard": "añadido __card__ a __list__", @@ -60,7 +62,7 @@ "archive": "Guardar", "archive-all": "Guardar Todo", "archive-board": "Archive Board", - "archive-card": "Archive Card", + "archive-card": "Archivo Tarjeta", "archive-list": "Archivar Lista", "archive-selection": "Archive selection", "archiveBoardPopup-title": "Archive Board?", @@ -111,7 +113,7 @@ "cardLabelsPopup-title": "Etiquetas", "cardMembersPopup-title": "Miembros", "cardMorePopup-title": "Más", - "cards": "Cards", + "cards": "Tarjetas", "change": "Change", "change-avatar": "Cambiar Avatar", "change-password": "Cambiar la clave", diff --git a/i18n/eu.i18n.json b/i18n/eu.i18n.json index 63d75b69..edf7e09a 100644 --- a/i18n/eu.i18n.json +++ b/i18n/eu.i18n.json @@ -2,6 +2,8 @@ "accept": "Onartu", "act-activity-notify": "[Wekan] Jarduera-jakinarazpena", "act-addAttachment": "__attachment__ __card__ txartelera erantsita", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "__card__ txartelean iruzkina: __comment__", "act-createBoard": "__board__ sortuta", "act-createCard": "__card__ __list__ zerrrendara gehituta", diff --git a/i18n/fa.i18n.json b/i18n/fa.i18n.json index 50fb2afd..c7c05a2b 100644 --- a/i18n/fa.i18n.json +++ b/i18n/fa.i18n.json @@ -2,6 +2,8 @@ "accept": "تایید", "act-activity-notify": "[wekan]اطلاع فعالیت", "act-addAttachment": "پیوست __attachment__ به __card__", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "یادداشت بر __card__: __comment__", "act-createBoard": " __board__ ایجادشد", "act-createCard": " __card__ به __list__ اضافه شد", diff --git a/i18n/fi.i18n.json b/i18n/fi.i18n.json index 4f6c0c3c..0a834996 100644 --- a/i18n/fi.i18n.json +++ b/i18n/fi.i18n.json @@ -2,6 +2,8 @@ "accept": "Hyväksy", "act-activity-notify": "[Wekan] Toimintailmoitus", "act-addAttachment": "liitetty __attachment__ kortille __card__", + "act-addChecklist": "lisätty tarkistuslista __checklist__ kortille __card__", + "act-addChecklistItem": "lisätty kohta __checklistItem__ tarkistuslistaan __checklist__ kortilla __card__", "act-addComment": "kommentoitu __card__: __comment__", "act-createBoard": "luotu __board__", "act-createCard": "lisätty __card__ listalle __list__", diff --git a/i18n/fr.i18n.json b/i18n/fr.i18n.json index e4b68948..4f431961 100644 --- a/i18n/fr.i18n.json +++ b/i18n/fr.i18n.json @@ -2,6 +2,8 @@ "accept": "Accepter", "act-activity-notify": "[Wekan] Notification d'activité", "act-addAttachment": "a joint __attachment__ à __card__", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "a commenté __card__ : __comment__", "act-createBoard": "a créé __board__", "act-createCard": "a ajouté __card__ à __list__", diff --git a/i18n/gl.i18n.json b/i18n/gl.i18n.json index 37d19b1a..6b2dd9b6 100644 --- a/i18n/gl.i18n.json +++ b/i18n/gl.i18n.json @@ -2,6 +2,8 @@ "accept": "Aceptar", "act-activity-notify": "[Wekan] Activity Notification", "act-addAttachment": "attached __attachment__ to __card__", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "commented on __card__: __comment__", "act-createBoard": "created __board__", "act-createCard": "added __card__ to __list__", diff --git a/i18n/he.i18n.json b/i18n/he.i18n.json index e23ffdf8..17eb1ea1 100644 --- a/i18n/he.i18n.json +++ b/i18n/he.i18n.json @@ -2,6 +2,8 @@ "accept": "אישור", "act-activity-notify": "[Wekan] הודעת פעילות", "act-addAttachment": " __attachment__ צורף לכרטיס __card__", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "התקבלה תגובה על הכרטיס __card__: __comment__", "act-createBoard": "הלוח __board__ נוצר", "act-createCard": "הכרטיס __card__ התווסף לרשימה __list__", diff --git a/i18n/hu.i18n.json b/i18n/hu.i18n.json index 858268ca..65bed443 100644 --- a/i18n/hu.i18n.json +++ b/i18n/hu.i18n.json @@ -2,6 +2,8 @@ "accept": "Elfogad", "act-activity-notify": "[Wekan] Tevékenység értesítés", "act-addAttachment": "attached __attachment__ to __card__", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "commented on __card__: __comment__", "act-createBoard": "created __board__", "act-createCard": "added __card__ to __list__", diff --git a/i18n/id.i18n.json b/i18n/id.i18n.json index 655ae243..a8bb170f 100644 --- a/i18n/id.i18n.json +++ b/i18n/id.i18n.json @@ -2,6 +2,8 @@ "accept": "Terima", "act-activity-notify": "[Wekan] Pemberitahuan Kegiatan", "act-addAttachment": "Lampirkan__attachment__ke__kartu__", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "Dikomentari di__kartu__:__comment__", "act-createBoard": "Panel__dibuat__", "act-createCard": "Kartu__dilampirkan__ke__Daftar", diff --git a/i18n/it.i18n.json b/i18n/it.i18n.json index 0072f2e6..72963a0f 100644 --- a/i18n/it.i18n.json +++ b/i18n/it.i18n.json @@ -2,6 +2,8 @@ "accept": "Accetta", "act-activity-notify": "[Wekan] Notifiche attività", "act-addAttachment": "ha allegato __attachment__ a __card__", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "ha commentato su __card__: __comment__", "act-createBoard": "ha creato __board__", "act-createCard": "ha aggiunto __card__ a __list__", diff --git a/i18n/ja.i18n.json b/i18n/ja.i18n.json index 0b9330b9..f5c38263 100644 --- a/i18n/ja.i18n.json +++ b/i18n/ja.i18n.json @@ -2,6 +2,8 @@ "accept": "受け入れ", "act-activity-notify": "[Wekan] アクティビティ通知", "act-addAttachment": "__card__ に __attachment__ を添付しました", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "__card__: __comment__ をコメントしました", "act-createBoard": "__board__ を作成しました", "act-createCard": "__list__ に __card__ を追加しました", diff --git a/i18n/ko.i18n.json b/i18n/ko.i18n.json index 43970449..1842be0a 100644 --- a/i18n/ko.i18n.json +++ b/i18n/ko.i18n.json @@ -2,6 +2,8 @@ "accept": "확인", "act-activity-notify": "[Wekan] 활동 알림", "act-addAttachment": "__attachment__를 __card__에 첨부", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "__card__에 내용 추가 : __comment__", "act-createBoard": "__board__ 생성", "act-createCard": "__list__에 __card__ 추가", diff --git a/i18n/nb.i18n.json b/i18n/nb.i18n.json index 0983c6f3..e8cbed4d 100644 --- a/i18n/nb.i18n.json +++ b/i18n/nb.i18n.json @@ -2,6 +2,8 @@ "accept": "Godta", "act-activity-notify": "[Wekan] Aktivitetsvarsel", "act-addAttachment": "la ved __attachment__ til __card__", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "kommenterte til __card__: __comment__", "act-createBoard": "opprettet __board__", "act-createCard": "la __card__ til __list__", diff --git a/i18n/nl.i18n.json b/i18n/nl.i18n.json index 71d4194f..6cbcca6b 100644 --- a/i18n/nl.i18n.json +++ b/i18n/nl.i18n.json @@ -2,6 +2,8 @@ "accept": "Accepteren", "act-activity-notify": "[Wekan] Activiteit Notificatie", "act-addAttachment": "__attachment__ als bijlage toegevoegd aan __card__", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "gereageerd op __card__:__comment__", "act-createBoard": "aangemaakte__bord__", "act-createCard": "toegevoegd__kaart__aan__lijst__", diff --git a/i18n/pl.i18n.json b/i18n/pl.i18n.json index 137144f0..024382ff 100644 --- a/i18n/pl.i18n.json +++ b/i18n/pl.i18n.json @@ -2,6 +2,8 @@ "accept": "Akceptuj", "act-activity-notify": "[Wekan] Activity Notification", "act-addAttachment": "attached __attachment__ to __card__", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "commented on __card__: __comment__", "act-createBoard": "created __board__", "act-createCard": "added __card__ to __list__", diff --git a/i18n/pt-BR.i18n.json b/i18n/pt-BR.i18n.json index 2aaa5c6c..1ea99b76 100644 --- a/i18n/pt-BR.i18n.json +++ b/i18n/pt-BR.i18n.json @@ -2,6 +2,8 @@ "accept": "Aceitar", "act-activity-notify": "[Wekan] Notificação de Atividade", "act-addAttachment": "anexo __attachment__ de __card__", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "comentou em __card__: __comment__", "act-createBoard": "criou __board__", "act-createCard": "__card__ adicionado à __list__", diff --git a/i18n/ro.i18n.json b/i18n/ro.i18n.json index 0f6a3ee1..926d63dc 100644 --- a/i18n/ro.i18n.json +++ b/i18n/ro.i18n.json @@ -2,6 +2,8 @@ "accept": "Accept", "act-activity-notify": "[Wekan] Activity Notification", "act-addAttachment": "attached __attachment__ to __card__", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "commented on __card__: __comment__", "act-createBoard": "created __board__", "act-createCard": "added __card__ to __list__", diff --git a/i18n/ru.i18n.json b/i18n/ru.i18n.json index 890b268c..5b26f7c2 100644 --- a/i18n/ru.i18n.json +++ b/i18n/ru.i18n.json @@ -2,6 +2,8 @@ "accept": "Принять", "act-activity-notify": "[Wekan] Уведомления о активности", "act-addAttachment": "вложено __attachment__ в __card__", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "прокомментировал __card__: __comment__", "act-createBoard": "создана __board__", "act-createCard": "добавлена __card__ в __list__", diff --git a/i18n/sr.i18n.json b/i18n/sr.i18n.json index dadf8472..01b83edb 100644 --- a/i18n/sr.i18n.json +++ b/i18n/sr.i18n.json @@ -2,6 +2,8 @@ "accept": "Prihvati", "act-activity-notify": "[Wekan] Obaveštenje o aktivnostima", "act-addAttachment": "attached __attachment__ to __card__", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "commented on __card__: __comment__", "act-createBoard": "created __board__", "act-createCard": "added __card__ to __list__", diff --git a/i18n/sv.i18n.json b/i18n/sv.i18n.json index 50c780ee..180e6f58 100644 --- a/i18n/sv.i18n.json +++ b/i18n/sv.i18n.json @@ -2,6 +2,8 @@ "accept": "Acceptera", "act-activity-notify": "[Wekan] Aktivitetsavisering", "act-addAttachment": "bifogade __attachment__ to __card__", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "kommenterade __card__: __comment__", "act-createBoard": "skapade __board__", "act-createCard": "lade till __card__ to __list__", diff --git a/i18n/ta.i18n.json b/i18n/ta.i18n.json index 41dd9a70..a1f81080 100644 --- a/i18n/ta.i18n.json +++ b/i18n/ta.i18n.json @@ -2,6 +2,8 @@ "accept": "Accept", "act-activity-notify": "[Wekan] Activity Notification", "act-addAttachment": "attached __attachment__ to __card__", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "commented on __card__: __comment__", "act-createBoard": "created __board__", "act-createCard": "added __card__ to __list__", diff --git a/i18n/th.i18n.json b/i18n/th.i18n.json index 3469d512..a5cee692 100644 --- a/i18n/th.i18n.json +++ b/i18n/th.i18n.json @@ -2,6 +2,8 @@ "accept": "ยอมรับ", "act-activity-notify": "[Wekan] แจ้งกิจกรรม", "act-addAttachment": "แนบไฟล์ __attachment__ ไปยัง __card__", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "ออกความเห็นที่ __card__: __comment__", "act-createBoard": "สร้าง __board__", "act-createCard": "เพิ่ม __card__ ไปยัง __list__", diff --git a/i18n/tr.i18n.json b/i18n/tr.i18n.json index 9c7d5a94..e64510b5 100644 --- a/i18n/tr.i18n.json +++ b/i18n/tr.i18n.json @@ -2,6 +2,8 @@ "accept": "Kabul Et", "act-activity-notify": "[Wekan] Etkinlik Bildirimi", "act-addAttachment": "__card__ kartına __attachment__ dosyasını ekledi", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "__card__ kartına bir yorum bıraktı: __comment__", "act-createBoard": "__board__ panosunu oluşturdu", "act-createCard": "__card__ kartını ___list__ listesine ekledi.", diff --git a/i18n/uk.i18n.json b/i18n/uk.i18n.json index 1f89763b..0da6ce1f 100644 --- a/i18n/uk.i18n.json +++ b/i18n/uk.i18n.json @@ -2,6 +2,8 @@ "accept": "Прийняти", "act-activity-notify": "[Wekan] Сповіщення Діяльності", "act-addAttachment": "__attachment__ додане до __card__", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "комментар в __card__: __comment__", "act-createBoard": "__board__ створенна", "act-createCard": "__card__ карта додана до __list__ листа", diff --git a/i18n/vi.i18n.json b/i18n/vi.i18n.json index 485a4498..93248d56 100644 --- a/i18n/vi.i18n.json +++ b/i18n/vi.i18n.json @@ -2,6 +2,8 @@ "accept": "Chấp nhận", "act-activity-notify": "[Wekan] Thông Báo Hoạt Động", "act-addAttachment": "đã đính kèm __attachment__ vào __card__", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "đã bình luận trong __card__: __comment__", "act-createBoard": "đã tạo __board__", "act-createCard": "đã thêm __card__ vào __list__", diff --git a/i18n/zh-CN.i18n.json b/i18n/zh-CN.i18n.json index 29856476..f49f7b26 100644 --- a/i18n/zh-CN.i18n.json +++ b/i18n/zh-CN.i18n.json @@ -2,6 +2,8 @@ "accept": "接受", "act-activity-notify": "[Wekan] 活动通知", "act-addAttachment": "添加附件 __attachment__ 至卡片 __card__", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "在 __card__ 发布评论: __comment__", "act-createBoard": "创建看板 __board__", "act-createCard": "添加卡片 __card__ 至列表 __list__", diff --git a/i18n/zh-TW.i18n.json b/i18n/zh-TW.i18n.json index 403e5666..23566314 100644 --- a/i18n/zh-TW.i18n.json +++ b/i18n/zh-TW.i18n.json @@ -2,6 +2,8 @@ "accept": "接受", "act-activity-notify": "[Wekan] 活動通知", "act-addAttachment": "新增附件__attachment__至__card__", + "act-addChecklist": "added checklist __checklist__ to __card__", + "act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__", "act-addComment": "評論__card__: __comment__", "act-createBoard": "完成新增 __board__", "act-createCard": "將__card__加入__list__", diff --git a/models/activities.js b/models/activities.js index c732a940..4ddcfa72 100644 --- a/models/activities.js +++ b/models/activities.js @@ -119,6 +119,10 @@ if (Meteor.isServer) { const checklist = activity.checklist(); params.checklist = checklist.title; } + if (activity.checklistItemId) { + const checklistItem = activity.checklistItem(); + params.checklistItem = checklistItem.title; + } if (board) { const watchingUsers = _.pluck(_.where(board.watchers, {level: 'watching'}), 'userId'); const trackingUsers = _.pluck(_.where(board.watchers, {level: 'tracking'}), 'userId'); diff --git a/models/checklists.js b/models/checklists.js index 35ef8ae1..b90656e4 100644 --- a/models/checklists.js +++ b/models/checklists.js @@ -44,11 +44,6 @@ Checklists.attachSchema(new SimpleSchema({ type: Number, decimal: true, }, - newItemIndex: { - type: Number, - decimal: true, - defaultValue: 0, - }, })); const self = Checklists; @@ -57,16 +52,8 @@ Checklists.helpers({ itemCount() { return this.items.length; }, - getItems() { - return this.items.sort(function (itemA, itemB) { - if (itemA.sort < itemB.sort) { - return -1; - } - if (itemA.sort > itemB.sort) { - return 1; - } - return 0; - }); + getItemsSorted() { + return _.sortBy(this.items, 'sort'); }, finishedCount() { return this.items.filter((item) => { @@ -83,6 +70,16 @@ Checklists.helpers({ const items = self.findOne({_id : this._id}).items; return _.pluck(items, '_id').indexOf(itemId); }, + getNewItemId() { + const itemCount = this.itemCount(); + let idx = 0; + if (itemCount > 0) { + const lastId = this.items[itemCount - 1]._id; + const lastIdSuffix = lastId.substr(this._id.length); + idx = parseInt(lastIdSuffix, 10) + 1; + } + return `${this._id}${idx}`; + }, }); Checklists.allow({ @@ -112,14 +109,40 @@ Checklists.mutations({ }, //for items in checklist addItem(title) { - const itemCount = this.itemCount(); - const _id = `${this._id}${this.newItemIndex}`; + const _id = this.getNewItemId(); return { - $addToSet: { items: { _id, title, isFinished: false, sort: itemCount } }, - $set: { newItemIndex: this.newItemIndex + 1}, + $addToSet: { + items: { + _id, title, + isFinished: false, + sort: this.itemCount(), + }, + }, }; }, + addFullItem(item) { + const itemsUpdate = {}; + this.items.forEach(function(iterItem, index) { + if (iterItem.sort >= item.sort) { + itemsUpdate[`items.${index}.sort`] = iterItem.sort + 1; + } + }); + if (!_.isEmpty(itemsUpdate)) { + self.direct.update({ _id: this._id }, { $set: itemsUpdate }); + } + return { $addToSet: { items: item } }; + }, removeItem(itemId) { + const item = this.getItem(itemId); + const itemsUpdate = {}; + this.items.forEach(function(iterItem, index) { + if (iterItem.sort > item.sort) { + itemsUpdate[`items.${index}.sort`] = iterItem.sort - 1; + } + }); + if (!_.isEmpty(itemsUpdate)) { + self.direct.update({ _id: this._id }, { $set: itemsUpdate }); + } return { $pull: { items: { _id: itemId } } }; }, editItem(itemId, title) { @@ -169,11 +192,11 @@ Checklists.mutations({ }, sortItems(itemIDs) { const validItems = []; - for (const itemID of itemIDs) { + itemIDs.forEach((itemID) => { if (this.getItem(itemID)) { validItems.push(this.itemIndex(itemID)); } - } + }); const modifiedValues = {}; for (let i = 0; i < validItems.length; i++) { modifiedValues[`items.${validItems[i]}.sort`] = i; diff --git a/package.json b/package.json index aacb2f90..0cad0e28 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wekan", - "version": "0.39.0", + "version": "0.43.0", "description": "The open-source Trello-like kanban", "private": true, "scripts": { diff --git a/sandstorm-pkgdef.capnp b/sandstorm-pkgdef.capnp index feb000f1..07f1c8ef 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 = 26, + appVersion = 30, # Increment this for every release. - appMarketingVersion = (defaultText = "0.39.0~2017-09-18"), + appMarketingVersion = (defaultText = "0.43.0~2017-09-25"), # Human-readable presentation of the app version. minUpgradableAppVersion = 0, diff --git a/server/migrations.js b/server/migrations.js index 99125976..76721623 100644 --- a/server/migrations.js +++ b/server/migrations.js @@ -130,3 +130,24 @@ Migrations.add('add-member-isactive-field', () => { Boards.update(board._id, {$set: {members: newMemberSet}}, noValidate); }); }); + +Migrations.add('add-sort-checklists', () => { + Checklists.find().forEach((checklist, index) => { + if (!checklist.hasOwnProperty('sort')) { + Checklists.direct.update( + checklist._id, + { $set: { sort: index } }, + noValidate + ); + } + checklist.items.forEach(function(item, index) { + if (!item.hasOwnProperty('sort')) { + Checklists.direct.update( + { _id: checklist._id, 'items._id': item._id }, + { $set: { 'items.$.sort': index } }, + noValidate + ); + } + }); + }); +}); |