diff options
author | Lauri Ojansivu <x@xet7.org> | 2020-04-08 23:16:48 +0300 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2020-04-08 23:16:48 +0300 |
commit | 5ebb47cb0ec7272894a37d99579ede872251f55c (patch) | |
tree | ceb4d44c91c0b90d4e2a2e29274117c86fbb8f0a /client | |
parent | 115701fa653067f05ad53677d4398d25e89402b6 (diff) | |
download | wekan-5ebb47cb0ec7272894a37d99579ede872251f55c.tar.gz wekan-5ebb47cb0ec7272894a37d99579ede872251f55c.tar.bz2 wekan-5ebb47cb0ec7272894a37d99579ede872251f55c.zip |
Add setting default NOTIFICATION_TRAY_AFTER_READ_DAYS_BEFORE_REMOVE=2
to all Wekan platforms https://github.com/wekan/wekan/pull/2998
Thanks to xet7 !
Diffstat (limited to 'client')
-rw-r--r-- | client/components/cards/cardDetails.js | 49 | ||||
-rw-r--r-- | client/components/cards/subtasks.js | 15 |
2 files changed, 35 insertions, 29 deletions
diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js index 8492393c..84ba21b1 100644 --- a/client/components/cards/cardDetails.js +++ b/client/components/cards/cardDetails.js @@ -40,31 +40,29 @@ BlazeComponent.extendComponent({ voteState() { const card = this.currentData(); - const userId = Meteor.userId() - let state + const userId = Meteor.userId(); + let state; if (card.vote) { if (card.vote.positive) { state = _.contains(card.vote.positive, userId); - if (state === true) return true + if (state === true) return true; } if (card.vote.negative) { state = _.contains(card.vote.negative, userId); - if (state === true) return false + if (state === true) return false; } } - return null + return null; }, voteCountPositive() { const card = this.currentData(); - if (card.vote && card.vote.positive) - return card.vote.positive.length - return null + if (card.vote && card.vote.positive) return card.vote.positive.length; + return null; }, voteCountNegative() { const card = this.currentData(); - if (card.vote && card.vote.negative) - return card.vote.negative.length - return null + if (card.vote && card.vote.negative) return card.vote.negative.length; + return null; }, isWatching() { const card = this.currentData(); @@ -408,17 +406,17 @@ BlazeComponent.extendComponent({ Meteor.call('toggleSystemMessages'); }, 'click .js-vote'(e) { - const forIt = $(e.target).hasClass('js-vote-positive') - let newState = null + const forIt = $(e.target).hasClass('js-vote-positive'); + let newState = null; if ( this.voteState() == null || - this.voteState() == false && forIt || - this.voteState() == true && !forIt + (this.voteState() == false && forIt) || + (this.voteState() == true && !forIt) ) { - newState = forIt + newState = forIt; } - this.data().setVote(Meteor.userId(), newState) - } + this.data().setVote(Meteor.userId(), newState); + }, }, ]; }, @@ -613,7 +611,7 @@ Template.cardDetailsActionsPopup.events({ 'click .js-set-card-color': Popup.open('setCardColor'), 'click .js-cancel-voting'(event) { event.preventDefault(); - this.unsetVote() + this.unsetVote(); Popup.close(); }, 'click .js-move-card-to-top'(event) { @@ -649,7 +647,7 @@ Template.cardDetailsActionsPopup.events({ }, }); -Template.editCardTitleForm.onRendered(function () { +Template.editCardTitleForm.onRendered(function() { autosize(this.$('.js-edit-card-title')); }); @@ -663,7 +661,7 @@ Template.editCardTitleForm.events({ }, }); -Template.editCardRequesterForm.onRendered(function () { +Template.editCardRequesterForm.onRendered(function() { autosize(this.$('.js-edit-card-requester')); }); @@ -676,7 +674,7 @@ Template.editCardRequesterForm.events({ }, }); -Template.editCardAssignerForm.onRendered(function () { +Template.editCardAssignerForm.onRendered(function() { autosize(this.$('.js-edit-card-assigner')); }); @@ -816,7 +814,7 @@ Template.copyChecklistToManyCardsPopup.events({ // copy subtasks cursor = Cards.find({ parentId: oldId }); - cursor.forEach(function () { + cursor.forEach(function() { 'use strict'; const subtask = arguments[0]; subtask.parentId = _id; @@ -965,7 +963,7 @@ BlazeComponent.extendComponent({ } } }, - 'click .js-delete': Popup.afterConfirm('cardDelete', function () { + 'click .js-delete': Popup.afterConfirm('cardDelete', function() { Popup.close(); Cards.remove(this._id); Utils.goBoardId(this.boardId); @@ -1003,9 +1001,8 @@ BlazeComponent.extendComponent({ 'submit .edit-vote-question'(evt) { evt.preventDefault(); const voteQuestion = evt.target.vote.value; - this.currentCard.setVoteQuestion(voteQuestion) + this.currentCard.setVoteQuestion(voteQuestion); Popup.close(); - }, }, ]; diff --git a/client/components/cards/subtasks.js b/client/components/cards/subtasks.js index cdc227fc..4cd15c11 100644 --- a/client/components/cards/subtasks.js +++ b/client/components/cards/subtasks.js @@ -22,11 +22,20 @@ BlazeComponent.extendComponent({ const listId = targetBoard.getDefaultSubtasksListId(); //Get the full swimlane data for the parent task. - const parentSwimlane = Swimlanes.findOne({boardId: crtBoard._id, _id: card.swimlaneId}); + const parentSwimlane = Swimlanes.findOne({ + boardId: crtBoard._id, + _id: card.swimlaneId, + }); //find the swimlane of the same name in the target board. - const targetSwimlane = Swimlanes.findOne({boardId: targetBoard._id, title: parentSwimlane.title}); + const targetSwimlane = Swimlanes.findOne({ + boardId: targetBoard._id, + title: parentSwimlane.title, + }); //If no swimlane with a matching title exists in the target board, fall back to the default swimlane. - const swimlaneId = targetSwimlane === undefined ? targetBoard.getDefaultSwimline()._id : targetSwimlane._id; + const swimlaneId = + targetSwimlane === undefined + ? targetBoard.getDefaultSwimline()._id + : targetSwimlane._id; if (title) { const _id = Cards.insert({ |