diff options
48 files changed, 290 insertions, 53 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a22e813..29ae3e9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,27 @@ +# Upcoming Wekan relelase + +This release adds the following new features: + +* [Slider for Comments only in activity feed](https://github.com/wekan/wekan/issues/1247). + +and fixes the following bugs: + +* [Data inconsistency when copying card](https://github.com/wekan/wekan/pull/1246). Note: There is no feature for copying card attachment yet. + +Thanks to Github user nztqa for contributions. + +# v0.44 2017-09-30 Wekan release + +This release adds the following new features: + +* [Confirm popup appears before Checklist Delete](https://github.com/wekan/wekan/pull/1257). + +and fixes the following bugs: + +* [Fix errors when importing from Trello](https://github.com/wekan/wekan/pull/1259). + +Thanks to GitHub users amadilsons and GhassenRjab for their contributions. + # v0.43 2017-09-25 Wekan release This release fixes the following bugs: diff --git a/client/components/activities/activities.jade b/client/components/activities/activities.jade index be12a728..deaee25e 100644 --- a/client/components/activities/activities.jade +++ b/client/components/activities/activities.jade @@ -31,7 +31,7 @@ template(name="boardActivities") .activity-checklist(href="{{ card.absoluteUrl }}") +viewer = checklist.title - + if($eq activityType 'addChecklistItem') | {{{_ 'activity-checklist-item-added' checklist.title cardLink}}}. .activity-checklist(href="{{ card.absoluteUrl }}") @@ -90,7 +90,7 @@ template(name="boardActivities") template(name="cardActivities") each currentCard.activities - .activity + .activity.js-card-activity +userAvatar(userId=user._id) p.activity-desc +memberName(user=user) diff --git a/client/components/activities/activities.styl b/client/components/activities/activities.styl index 2285fc0a..36efd771 100644 --- a/client/components/activities/activities.styl +++ b/client/components/activities/activities.styl @@ -1,5 +1,10 @@ @import 'nib' +.activity-title + margin: 0 0.5em 0.8em + display: flex + justify-content:space-between + .activities clear: both diff --git a/client/components/cards/cardDetails.jade b/client/components/cards/cardDetails.jade index 09e0532c..60b20a8a 100644 --- a/client/components/cards/cardDetails.jade +++ b/client/components/cards/cardDetails.jade @@ -85,7 +85,15 @@ template(name="cardDetails") +attachmentsGalery hr - h2 {{ _ 'activity'}} + .activity-title + h2 {{ _ 'activity'}} + .material-toggle-switch + span.toggle-switch-title {{_ 'hide-system-messages'}} + if hiddenSystemMessages + input.toggle-switch(type="checkbox" id="toggleButton" checked="checked" disabled) + else + input.toggle-switch(type="checkbox" id="toggleButton") + label.toggle-label(for="toggleButton") if currentUser.isBoardMember +commentForm if isLoaded.get diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js index 7c6c3ce7..ecffe7aa 100644 --- a/client/components/cards/cardDetails.js +++ b/client/components/cards/cardDetails.js @@ -28,6 +28,11 @@ BlazeComponent.extendComponent({ return card.findWatcher(Meteor.userId()); }, + hiddenSystemMessages() { + console.log('doo:', Meteor.user().hasHiddenSystemMessages()); + return Meteor.user().hasHiddenSystemMessages(); + }, + canModifyCard() { return Meteor.user() && Meteor.user().isBoardMember() && !Meteor.user().isCommentOnly(); }, @@ -99,6 +104,9 @@ BlazeComponent.extendComponent({ this.parentComponent().showOverlay.set(true); this.parentComponent().mouseHasEnterCardDetails = true; }, + 'click #toggleButton'() { + $('div.activity.js-card-activity:not(:has(.activity-comment))').toggle(); + }, }]; }, }).register('cardDetails'); @@ -220,6 +228,7 @@ Template.copyCardPopup.events({ if (title) { card.title = title; + card.coverId = ''; const _id = Cards.insert(card); // In case the filter is active we need to add the newly inserted card in // the list of exceptions -- cards that are not filtered. Otherwise the diff --git a/client/components/cards/checklists.jade b/client/components/cards/checklists.jade index e1dd1d14..9ff52d8e 100644 --- a/client/components/cards/checklists.jade +++ b/client/components/cards/checklists.jade @@ -1,8 +1,14 @@ template(name="checklists") h2 {{_ 'checklists'}} + if toggleDeleteDialog.get + .board-overlay#card-details-overlay + +checklistDeleteDialog(checklist = checklistToDelete) + + .card-checklist-items each checklist in currentCard.checklists +checklistDetail(checklist = checklist) + if canModifyCard +inlinedForm(autoclose=false classNames="js-add-checklist" cardId = cardId) +addChecklistItemForm @@ -18,7 +24,8 @@ template(name="checklistDetail") .checklist-title .checkbox.fa.fa-check-square-o if canModifyCard - a.js-delete-checklist {{_ "delete"}}... + a.js-delete-checklist.toggle-delete-checklist-dialog {{_ "delete"}}... + span.checklist-stat(class="{{#if checklist.isFinished}}is-finished{{/if}}") {{checklist.finishedCount}}/{{checklist.itemCount}} if canModifyCard h2.title.js-open-inlined-form.is-editable {{checklist.title}} @@ -26,6 +33,18 @@ template(name="checklistDetail") h2.title {{checklist.title}} +checklistItems(checklist = checklist) +template(name="checklistDeleteDialog") + .js-confirm-checklist-delete + p + i(class="fa fa-exclamation-triangle" aria-hidden="true") + p + | {{_ 'confirm-checklist-delete-dialog'}} + span {{checklist.title}} + | ? + .js-checklist-delete-buttons + button.confirm-checklist-delete(type="button") {{_ 'delete'}} + button.toggle-delete-checklist-dialog(type="button") {{_ 'cancel'}} + template(name="addChecklistItemForm") textarea.js-add-checklist-item(rows='1' autofocus) .edit-controls.clearfix diff --git a/client/components/cards/checklists.js b/client/components/cards/checklists.js index ba3384a9..1cd77c9f 100644 --- a/client/components/cards/checklists.js +++ b/client/components/cards/checklists.js @@ -66,6 +66,7 @@ Template.checklists.onRendered(function () { }); BlazeComponent.extendComponent({ + addChecklist(event) { event.preventDefault(); const textarea = this.find('textarea.js-add-checklist-item'); @@ -101,6 +102,26 @@ BlazeComponent.extendComponent({ textarea.focus(); }, + canModifyCard() { + return Meteor.user() && Meteor.user().isBoardMember() && !Meteor.user().isCommentOnly(); + }, + + deleteChecklist() { + const checklist = this.currentData().checklist; + if (checklist && checklist._id) { + Checklists.remove(checklist._id); + this.toggleDeleteDialog.set(false); + } + }, + + deleteItem() { + const checklist = this.currentData().checklist; + const item = this.currentData().item; + if (checklist && item && item._id) { + checklist.removeItem(item._id); + } + }, + editChecklist(event) { event.preventDefault(); const textarea = this.find('textarea.js-edit-checklist-item'); @@ -109,10 +130,6 @@ BlazeComponent.extendComponent({ checklist.setTitle(title); }, - canModifyCard() { - return Meteor.user() && Meteor.user().isBoardMember() && !Meteor.user().isCommentOnly(); - }, - editChecklistItem(event) { event.preventDefault(); @@ -123,19 +140,9 @@ BlazeComponent.extendComponent({ checklist.editItem(itemId, title); }, - deleteItem() { - const checklist = this.currentData().checklist; - const item = this.currentData().item; - if (checklist && item && item._id) { - checklist.removeItem(item._id); - } - }, - - deleteChecklist() { - const checklist = this.currentData().checklist; - if (checklist && checklist._id) { - Checklists.remove(checklist._id); - } + onCreated() { + this.toggleDeleteDialog = new ReactiveVar(false); + this.checklistToDelete = null; //Store data context to pass to checklistDeleteDialog template }, pressKey(event) { @@ -148,18 +155,50 @@ BlazeComponent.extendComponent({ }, events() { + const events = { + 'click .toggle-delete-checklist-dialog'(event) { + if($(event.target).hasClass('js-delete-checklist')){ + this.checklistToDelete = this.currentData().checklist; //Store data context + } + this.toggleDeleteDialog.set(!this.toggleDeleteDialog.get()); + }, + }; + return [{ + ...events, 'submit .js-add-checklist': this.addChecklist, 'submit .js-edit-checklist-title': this.editChecklist, 'submit .js-add-checklist-item': this.addChecklistItem, 'submit .js-edit-checklist-item': this.editChecklistItem, 'click .js-delete-checklist-item': this.deleteItem, - 'click .js-delete-checklist': this.deleteChecklist, + 'click .confirm-checklist-delete': this.deleteChecklist, keydown: this.pressKey, }]; }, }).register('checklists'); +Template.checklistDeleteDialog.onCreated(() => { + const $cardDetails = this.$('.card-details'); + this.scrollState = { position: $cardDetails.scrollTop(), //save current scroll position + top: false, //required for smooth scroll animation + }; + //Callback's purpose is to only prevent scrolling after animation is complete + $cardDetails.animate({ scrollTop: 0 }, 500, () => { this.scrollState.top = true; }); + + //Prevent scrolling while dialog is open + $cardDetails.on('scroll', () => { + if(this.scrollState.top) { //If it's already in position, keep it there. Otherwise let animation scroll + $cardDetails.scrollTop(0); + } + }); +}); + +Template.checklistDeleteDialog.onDestroyed(() => { + const $cardDetails = this.$('.card-details'); + $cardDetails.off('scroll'); //Reactivate scrolling + $cardDetails.animate( { scrollTop: this.scrollState.position }); +}); + Template.itemDetail.helpers({ canModifyCard() { return Meteor.user() && Meteor.user().isBoardMember() && !Meteor.user().isCommentOnly(); diff --git a/client/components/cards/checklists.styl b/client/components/cards/checklists.styl index 77668349..d4776397 100644 --- a/client/components/cards/checklists.styl +++ b/client/components/cards/checklists.styl @@ -38,6 +38,46 @@ textarea.js-add-checklist-item, textarea.js-edit-checklist-item .js-delete-checklist @extends .delete-text + +.js-confirm-checklist-delete + background-color: darken(white, 3%) + position: absolute + float: left; + width: 60% + margin-top: 0 + margin-left: 13% + padding-bottom: 2% + padding-left: 3% + padding-right: 3% + z-index: 17 + border-radius: 3px + + p + position: relative + margin-top: 3% + width: 100% + text-align: center + span + font-weight: bold + + i + font-size: 2em + + .js-checklist-delete-buttons + position: relative + padding: left 2% right 2% + .confirm-checklist-delete + margin-left: 12% + float: left + .toggle-delete-checklist-dialog + margin-right: 12% + float: right + +#card-details-overlay + top: 0 + bottom: -600px + right: 0 + .checklist-items margin: 0 0 0.5em 1.33em diff --git a/client/components/forms/forms.styl b/client/components/forms/forms.styl index 646da657..1947c11d 100644 --- a/client/components/forms/forms.styl +++ b/client/components/forms/forms.styl @@ -630,6 +630,59 @@ button a, .quiet color: white +// Material Design Toggle Switch +.material-toggle-switch + display: flex + +.toggle-label + position: relative + display: block + height: 20px + width: 44px + background-color: #a6a6a6 + border-radius: 100px + cursor: pointer + transition: all 0.3s ease + + &:after + position: absolute + left: -2px + top: -3px + display: block + width: 26px + height: 26px + border-radius: 100px + background-color: #fff + box-shadow: 0px 3px 3px rgba(0,0,0,0.05) + content: '' + transition: all 0.3s ease + + &:active + &:after + transform: scale(1.15, 0.85) + +.toggle-switch:checked ~ .toggle-label + background-color: #6fbeb5 + + &:after + left: 20px + background-color: #179588 + +.toggle-switch:checked:disabled ~ .toggle-label + background-color: #d5d5d5 + pointer-events: none + + &:after + background-color: #bcbdbc + +.toggle-switch + display: none + +.toggle-switch-title + margin: 0 0.5em + display: flex + + @media screen and (max-width: 800px) .edit-controls, .add-controls diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js index 724e805b..794f33c2 100644 --- a/client/components/lists/listBody.js +++ b/client/components/lists/listBody.js @@ -83,6 +83,10 @@ BlazeComponent.extendComponent({ evt.stopImmediatePropagation(); evt.preventDefault(); Utils.goBoardId(Session.get('currentBoard')); + } else { + if (!Meteor.user().hasHiddenSystemMessages()) { + $('.toggle-switch').prop('checked', false); + } } }, diff --git a/i18n/ar.i18n.json b/i18n/ar.i18n.json index ebf743d8..88eaf7be 100644 --- a/i18n/ar.i18n.json +++ b/i18n/ar.i18n.json @@ -146,6 +146,7 @@ "comment-only": "التعليق فقط", "comment-only-desc": "يمكن التعليق على بطاقات فقط.", "computer": "حاسوب", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "Copy card link to clipboard", "copyCardPopup-title": "Copy Card", "create": "إنشاء", diff --git a/i18n/br.i18n.json b/i18n/br.i18n.json index c6882ba1..a0a23c2c 100644 --- a/i18n/br.i18n.json +++ b/i18n/br.i18n.json @@ -146,6 +146,7 @@ "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", "computer": "Computer", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "Copy card link to clipboard", "copyCardPopup-title": "Copy Card", "create": "Krouiñ", diff --git a/i18n/ca.i18n.json b/i18n/ca.i18n.json index a3a0e7aa..530f2d98 100644 --- a/i18n/ca.i18n.json +++ b/i18n/ca.i18n.json @@ -146,6 +146,7 @@ "comment-only": "Només comentaris", "comment-only-desc": "Només pots fer comentaris a les fitxes", "computer": "Ordinador", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "Copia l'enllaç de la ftixa al porta-retalls", "copyCardPopup-title": "Copia la fitxa", "create": "Crea", diff --git a/i18n/cs.i18n.json b/i18n/cs.i18n.json index ca2cf7ef..7fa6b0b6 100644 --- a/i18n/cs.i18n.json +++ b/i18n/cs.i18n.json @@ -146,6 +146,7 @@ "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", "computer": "Počítač", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "Kopírovat adresu karty do mezipaměti", "copyCardPopup-title": "Kopírovat kartu", "create": "Vytvořit", diff --git a/i18n/de.i18n.json b/i18n/de.i18n.json index bc1120ed..bc5599ac 100644 --- a/i18n/de.i18n.json +++ b/i18n/de.i18n.json @@ -146,6 +146,7 @@ "comment-only": "Nur kommentierbar", "comment-only-desc": "Kann Karten nur Kommentieren", "computer": "Computer", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "Kopiere die Karte in die Zwischenablage", "copyCardPopup-title": "Karte kopieren", "create": "Erstellen", diff --git a/i18n/en-GB.i18n.json b/i18n/en-GB.i18n.json index 8db041a5..9d9b823d 100644 --- a/i18n/en-GB.i18n.json +++ b/i18n/en-GB.i18n.json @@ -146,6 +146,7 @@ "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", "computer": "Computer", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "Copy card link to clipboard", "copyCardPopup-title": "Copy Card", "create": "Create", diff --git a/i18n/en.i18n.json b/i18n/en.i18n.json index 64a720db..466f58dd 100644 --- a/i18n/en.i18n.json +++ b/i18n/en.i18n.json @@ -146,6 +146,7 @@ "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", "computer": "Computer", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "Copy card link to clipboard", "copyCardPopup-title": "Copy Card", "create": "Create", diff --git a/i18n/eo.i18n.json b/i18n/eo.i18n.json index 5da9e81a..efe04463 100644 --- a/i18n/eo.i18n.json +++ b/i18n/eo.i18n.json @@ -146,6 +146,7 @@ "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", "computer": "Komputilo", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "Copy card link to clipboard", "copyCardPopup-title": "Copy Card", "create": "Krei", diff --git a/i18n/es.i18n.json b/i18n/es.i18n.json index 5dca2df5..6577add6 100644 --- a/i18n/es.i18n.json +++ b/i18n/es.i18n.json @@ -146,6 +146,7 @@ "comment-only": "Sólo comentario", "comment-only-desc": "Solo se puede comentar en tarjetas.", "computer": "Ordenador", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "Copiar enlace a la tarjeta al portapapeles", "copyCardPopup-title": "Copy Card", "create": "Crear", diff --git a/i18n/eu.i18n.json b/i18n/eu.i18n.json index edf7e09a..9bc874fa 100644 --- a/i18n/eu.i18n.json +++ b/i18n/eu.i18n.json @@ -146,6 +146,7 @@ "comment-only": "Iruzkinak besterik ez", "comment-only-desc": "Iruzkinak txarteletan soilik egin ditzake", "computer": "Ordenagailua", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "Kopiatu txartela arbelera", "copyCardPopup-title": "Copy Card", "create": "Sortu", diff --git a/i18n/fa.i18n.json b/i18n/fa.i18n.json index c7c05a2b..53eac924 100644 --- a/i18n/fa.i18n.json +++ b/i18n/fa.i18n.json @@ -146,6 +146,7 @@ "comment-only": "صرفا یادداشت", "comment-only-desc": "صرفا یادداشت برروی کارت ها", "computer": "رایانه", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "Copy card link to clipboard", "copyCardPopup-title": "Copy Card", "create": "ایجاد", diff --git a/i18n/fi.i18n.json b/i18n/fi.i18n.json index 0a834996..64a328fd 100644 --- a/i18n/fi.i18n.json +++ b/i18n/fi.i18n.json @@ -146,6 +146,7 @@ "comment-only": "Vain kommentointi", "comment-only-desc": "Voi vain kommentoida kortteja", "computer": "Tietokone", + "confirm-checklist-delete-dialog": "Haluatko varmasti poistaa tarkistuslistan", "copy-card-link-to-clipboard": "Kopioi kortin linkki leikepöydälle", "copyCardPopup-title": "Kopioi kortti", "create": "Luo", diff --git a/i18n/fr.i18n.json b/i18n/fr.i18n.json index 4f431961..053874c7 100644 --- a/i18n/fr.i18n.json +++ b/i18n/fr.i18n.json @@ -2,8 +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-addChecklist": "a ajouté la checklist __checklist__ à __card__", + "act-addChecklistItem": "a ajouté l'élément __checklistItem__ à la checklist __checklist__ de __card__", "act-addComment": "a commenté __card__ : __comment__", "act-createBoard": "a créé __board__", "act-createCard": "a ajouté __card__ à __list__", @@ -146,6 +146,7 @@ "comment-only": "Commentaire uniquement", "comment-only-desc": "Ne peut que commenter des cartes.", "computer": "Ordinateur", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "Copier le lien vers la carte dans le presse-papier", "copyCardPopup-title": "Copier la carte", "create": "Créer", diff --git a/i18n/gl.i18n.json b/i18n/gl.i18n.json index 6b2dd9b6..27769c08 100644 --- a/i18n/gl.i18n.json +++ b/i18n/gl.i18n.json @@ -146,6 +146,7 @@ "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", "computer": "Computador", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "Copy card link to clipboard", "copyCardPopup-title": "Copy Card", "create": "Crear", diff --git a/i18n/he.i18n.json b/i18n/he.i18n.json index 17eb1ea1..91b39872 100644 --- a/i18n/he.i18n.json +++ b/i18n/he.i18n.json @@ -2,8 +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-addChecklist": "רשימת משימות __checklist__ נוספה ל __card__", + "act-addChecklistItem": " __checklistItem__ נוסף לרשימת משימות __checklist__ בכרטיס __card__", "act-addComment": "התקבלה תגובה על הכרטיס __card__: __comment__", "act-createBoard": "הלוח __board__ נוצר", "act-createCard": "הכרטיס __card__ התווסף לרשימה __list__", @@ -146,6 +146,7 @@ "comment-only": "הערה בלבד", "comment-only-desc": "ניתן להעיר על כרטיסים בלבד.", "computer": "מחשב", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "Copy card link to clipboard", "copyCardPopup-title": "העתק כרטיס", "create": "יצירה", diff --git a/i18n/hu.i18n.json b/i18n/hu.i18n.json index 65bed443..59922ec5 100644 --- a/i18n/hu.i18n.json +++ b/i18n/hu.i18n.json @@ -146,6 +146,7 @@ "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", "computer": "Számítógép", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "Copy card link to clipboard", "copyCardPopup-title": "Copy Card", "create": "Létrehoz", diff --git a/i18n/id.i18n.json b/i18n/id.i18n.json index a8bb170f..894710a4 100644 --- a/i18n/id.i18n.json +++ b/i18n/id.i18n.json @@ -146,6 +146,7 @@ "comment-only": "Hanya komentar", "comment-only-desc": "Bisa komen hanya di kartu", "computer": "Komputer", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "Copy card link to clipboard", "copyCardPopup-title": "Copy Card", "create": "Buat", diff --git a/i18n/it.i18n.json b/i18n/it.i18n.json index 72963a0f..0ed9a895 100644 --- a/i18n/it.i18n.json +++ b/i18n/it.i18n.json @@ -146,6 +146,7 @@ "comment-only": "Solo commenti", "comment-only-desc": "Puoi commentare solo le schede.", "computer": "Computer", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "Copia link della scheda sulla clipboard", "copyCardPopup-title": "Copy Card", "create": "Crea", diff --git a/i18n/ja.i18n.json b/i18n/ja.i18n.json index f5c38263..7c261acc 100644 --- a/i18n/ja.i18n.json +++ b/i18n/ja.i18n.json @@ -146,6 +146,7 @@ "comment-only": "コメントのみ", "comment-only-desc": "カードにのみコメント可能", "computer": "コンピューター", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "カードへのリンクをクリップボードにコピー", "copyCardPopup-title": "Copy Card", "create": "作成", diff --git a/i18n/ko.i18n.json b/i18n/ko.i18n.json index 1842be0a..d865017c 100644 --- a/i18n/ko.i18n.json +++ b/i18n/ko.i18n.json @@ -146,6 +146,7 @@ "comment-only": "댓글만 입력 가능", "comment-only-desc": "카드에 댓글만 달수 있습니다.", "computer": "내 컴퓨터", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "Copy card link to clipboard", "copyCardPopup-title": "Copy Card", "create": "생성", diff --git a/i18n/nb.i18n.json b/i18n/nb.i18n.json index e8cbed4d..538efd2b 100644 --- a/i18n/nb.i18n.json +++ b/i18n/nb.i18n.json @@ -146,6 +146,7 @@ "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", "computer": "Computer", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "Copy card link to clipboard", "copyCardPopup-title": "Copy Card", "create": "Create", diff --git a/i18n/nl.i18n.json b/i18n/nl.i18n.json index 6cbcca6b..60bf3b87 100644 --- a/i18n/nl.i18n.json +++ b/i18n/nl.i18n.json @@ -146,6 +146,7 @@ "comment-only": "Alleen reageren", "comment-only-desc": "Kan alleen op kaarten reageren.", "computer": "Computer", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "Kopieer kaart link naar klembord", "copyCardPopup-title": "Copy Card", "create": "Aanmaken", diff --git a/i18n/pl.i18n.json b/i18n/pl.i18n.json index 024382ff..144c29a3 100644 --- a/i18n/pl.i18n.json +++ b/i18n/pl.i18n.json @@ -146,6 +146,7 @@ "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", "computer": "Komputer", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "Copy card link to clipboard", "copyCardPopup-title": "Copy Card", "create": "Utwórz", diff --git a/i18n/pt-BR.i18n.json b/i18n/pt-BR.i18n.json index 1ea99b76..4c570dab 100644 --- a/i18n/pt-BR.i18n.json +++ b/i18n/pt-BR.i18n.json @@ -146,6 +146,7 @@ "comment-only": "Somente comentários", "comment-only-desc": "Pode comentar apenas em cartões.", "computer": "Computador", + "confirm-checklist-delete-dialog": "Tem a certeza de que pretende eliminar lista de verificação", "copy-card-link-to-clipboard": "Copiar link do cartão para a área de transferência", "copyCardPopup-title": "Copy Card", "create": "Criar", diff --git a/i18n/ro.i18n.json b/i18n/ro.i18n.json index 926d63dc..e6172a02 100644 --- a/i18n/ro.i18n.json +++ b/i18n/ro.i18n.json @@ -146,6 +146,7 @@ "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", "computer": "Computer", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "Copy card link to clipboard", "copyCardPopup-title": "Copy Card", "create": "Create", diff --git a/i18n/ru.i18n.json b/i18n/ru.i18n.json index 5b26f7c2..1be6242b 100644 --- a/i18n/ru.i18n.json +++ b/i18n/ru.i18n.json @@ -146,6 +146,7 @@ "comment-only": "Только комментирование", "comment-only-desc": "Может комментировать только карточки.", "computer": "Загрузить с компьютера", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "Copy card link to clipboard", "copyCardPopup-title": "Copy Card", "create": "Создать", diff --git a/i18n/sr.i18n.json b/i18n/sr.i18n.json index 01b83edb..1659c722 100644 --- a/i18n/sr.i18n.json +++ b/i18n/sr.i18n.json @@ -146,6 +146,7 @@ "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", "computer": "Computer", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "Copy card link to clipboard", "copyCardPopup-title": "Copy Card", "create": "Create", diff --git a/i18n/sv.i18n.json b/i18n/sv.i18n.json index 180e6f58..e980bd4d 100644 --- a/i18n/sv.i18n.json +++ b/i18n/sv.i18n.json @@ -2,8 +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-addChecklist": "lade till checklist __checklist__ till __card__", + "act-addChecklistItem": "lade till __checklistItem__ till checklistan __checklist__ on __card__", "act-addComment": "kommenterade __card__: __comment__", "act-createBoard": "skapade __board__", "act-createCard": "lade till __card__ to __list__", @@ -146,6 +146,7 @@ "comment-only": "Kommentera endast", "comment-only-desc": "Kan endast kommentera kort.", "computer": "Dator", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "Kopiera kortlänk till urklipp", "copyCardPopup-title": "Kopiera kort", "create": "Skapa", diff --git a/i18n/ta.i18n.json b/i18n/ta.i18n.json index a1f81080..3c6d5a52 100644 --- a/i18n/ta.i18n.json +++ b/i18n/ta.i18n.json @@ -146,6 +146,7 @@ "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", "computer": "Computer", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "Copy card link to clipboard", "copyCardPopup-title": "Copy Card", "create": "Create", diff --git a/i18n/th.i18n.json b/i18n/th.i18n.json index a5cee692..8dc7ab8e 100644 --- a/i18n/th.i18n.json +++ b/i18n/th.i18n.json @@ -146,6 +146,7 @@ "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", "computer": "คอมพิวเตอร์", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "Copy card link to clipboard", "copyCardPopup-title": "Copy Card", "create": "สร้าง", diff --git a/i18n/tr.i18n.json b/i18n/tr.i18n.json index e64510b5..83186d66 100644 --- a/i18n/tr.i18n.json +++ b/i18n/tr.i18n.json @@ -146,6 +146,7 @@ "comment-only": "Sadece yorum", "comment-only-desc": "Sadece kartlara yorum yazabilir.", "computer": "Bilgisayar", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "Kartın linkini kopyala", "copyCardPopup-title": "Kartı Kopyala", "create": "Oluştur", diff --git a/i18n/uk.i18n.json b/i18n/uk.i18n.json index 0da6ce1f..d298c2fa 100644 --- a/i18n/uk.i18n.json +++ b/i18n/uk.i18n.json @@ -146,6 +146,7 @@ "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", "computer": "Computer", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "Copy card link to clipboard", "copyCardPopup-title": "Copy Card", "create": "Create", diff --git a/i18n/vi.i18n.json b/i18n/vi.i18n.json index 93248d56..d6b805c2 100644 --- a/i18n/vi.i18n.json +++ b/i18n/vi.i18n.json @@ -146,6 +146,7 @@ "comment-only": "Comment only", "comment-only-desc": "Can comment on cards only.", "computer": "Computer", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "Copy card link to clipboard", "copyCardPopup-title": "Copy Card", "create": "Create", diff --git a/i18n/zh-CN.i18n.json b/i18n/zh-CN.i18n.json index f49f7b26..64687d33 100644 --- a/i18n/zh-CN.i18n.json +++ b/i18n/zh-CN.i18n.json @@ -146,6 +146,7 @@ "comment-only": "仅能评论", "comment-only-desc": "只能在卡片上评论。", "computer": "从本机上传", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "复制卡片链接到剪贴板", "copyCardPopup-title": "复制卡片", "create": "创建", diff --git a/i18n/zh-TW.i18n.json b/i18n/zh-TW.i18n.json index 23566314..3c9224b4 100644 --- a/i18n/zh-TW.i18n.json +++ b/i18n/zh-TW.i18n.json @@ -146,6 +146,7 @@ "comment-only": "只可以發表評論", "comment-only-desc": "只可以對卡片發表評論", "computer": "從本機上傳", + "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist", "copy-card-link-to-clipboard": "將卡片連結複製到剪貼板", "copyCardPopup-title": "Copy Card", "create": "建立", diff --git a/models/trelloCreator.js b/models/trelloCreator.js index e7f98e85..0f801ea3 100644 --- a/models/trelloCreator.js +++ b/models/trelloCreator.js @@ -113,7 +113,6 @@ export class TrelloCreator { check(trelloLabels, [Match.ObjectIncluding({ // XXX refine control by validating 'color' against a list of allowed // values (is it worth the maintenance?) - color: String, name: String, })]); } @@ -184,7 +183,7 @@ export class TrelloCreator { trelloBoard.labels.forEach((label) => { const labelToCreate = { _id: Random.id(6), - color: label.color, + color: label.color ? label.color : 'black', name: label.name, }; // We need to remember them by Trello ID, as this is the only ref we have @@ -398,27 +397,29 @@ export class TrelloCreator { createChecklists(trelloChecklists) { trelloChecklists.forEach((checklist) => { - // Create the checklist - const checklistToCreate = { - cardId: this.cards[checklist.idCard], - title: checklist.name, - createdAt: this._now(), - sort: checklist.pos, - }; - const checklistId = Checklists.direct.insert(checklistToCreate); - // keep track of Trello id => WeKan id - this.checklists[checklist.id] = checklistId; - // Now add the items to the checklist - const itemsToCreate = []; - checklist.checkItems.forEach((item) => { - itemsToCreate.push({ - _id: checklistId + itemsToCreate.length, - title: item.name, - isFinished: item.state === 'complete', - sort: item.pos, + if (this.cards[checklist.idCard]) { + // Create the checklist + const checklistToCreate = { + cardId: this.cards[checklist.idCard], + title: checklist.name, + createdAt: this._now(), + sort: checklist.pos, + }; + const checklistId = Checklists.direct.insert(checklistToCreate); + // keep track of Trello id => WeKan id + this.checklists[checklist.id] = checklistId; + // Now add the items to the checklist + const itemsToCreate = []; + checklist.checkItems.forEach((item) => { + itemsToCreate.push({ + _id: checklistId + itemsToCreate.length, + title: item.name, + isFinished: item.state === 'complete', + sort: item.pos, + }); }); - }); - Checklists.direct.update(checklistId, {$set: {items: itemsToCreate}}); + Checklists.direct.update(checklistId, {$set: {items: itemsToCreate}}); + } }); } diff --git a/package.json b/package.json index 0cad0e28..3b25e182 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wekan", - "version": "0.43.0", + "version": "0.44.0", "description": "The open-source Trello-like kanban", "private": true, "scripts": { diff --git a/sandstorm-pkgdef.capnp b/sandstorm-pkgdef.capnp index 07f1c8ef..0d7aa843 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 = 30, + appVersion = 31, # Increment this for every release. - appMarketingVersion = (defaultText = "0.43.0~2017-09-25"), + appMarketingVersion = (defaultText = "0.44.0~2017-09-30"), # Human-readable presentation of the app version. minUpgradableAppVersion = 0, |