summaryrefslogtreecommitdiffstats
path: root/client/components/cards/cardDetails.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2020-04-26 17:18:41 +0300
committerLauri Ojansivu <x@xet7.org>2020-04-26 17:18:41 +0300
commitff73aa4566fcb96f42eb9ca4d3db7b4ae68a83ed (patch)
treed3931724c50d7807f9a905fdf8893b82da1a650a /client/components/cards/cardDetails.js
parent3908fe0ab875cf4b793c884a3d82df2f1a3b2686 (diff)
parentde993a079d9f528ae1cfe9d4ba8a3a7541d93941 (diff)
downloadwekan-ff73aa4566fcb96f42eb9ca4d3db7b4ae68a83ed.tar.gz
wekan-ff73aa4566fcb96f42eb9ca4d3db7b4ae68a83ed.tar.bz2
wekan-ff73aa4566fcb96f42eb9ca4d3db7b4ae68a83ed.zip
Merge branch 'NicoP-S-master'
Diffstat (limited to 'client/components/cards/cardDetails.js')
-rw-r--r--client/components/cards/cardDetails.js23
1 files changed, 7 insertions, 16 deletions
diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js
index f31c3890..b8c7fa3f 100644
--- a/client/components/cards/cardDetails.js
+++ b/client/components/cards/cardDetails.js
@@ -54,21 +54,7 @@ BlazeComponent.extendComponent({
}
return null;
},
- votePublic() {
- const card = this.currentData();
- if (card.vote) return card.vote.public;
- return null;
- },
- voteCountPositive() {
- const card = this.currentData();
- 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;
- },
+
isWatching() {
const card = this.currentData();
return card.findWatcher(Meteor.userId());
@@ -1001,13 +987,18 @@ BlazeComponent.extendComponent({
evt.preventDefault();
const voteQuestion = evt.target.vote.value;
const publicVote = $('#vote-public').hasClass('is-checked');
- this.currentCard.setVoteQuestion(voteQuestion, publicVote);
+ const allowNonBoardMembers = $('#vote-allow-non-members').hasClass('is-checked');
+ this.currentCard.setVoteQuestion(voteQuestion, publicVote,allowNonBoardMembers);
Popup.close();
},
'click a.js-toggle-vote-public'(event) {
event.preventDefault();
$('#vote-public').toggleClass('is-checked');
},
+ 'click a.js-toggle-vote-allow-non-members'(event) {
+ event.preventDefault();
+ $('#vote-allow-non-members').toggleClass('is-checked');
+ },
},
];
},