summaryrefslogtreecommitdiffstats
path: root/client/components/cards/cardDetails.js
diff options
context:
space:
mode:
authorNico <paetni1@gmail.com>2020-04-26 02:41:26 +0200
committerNico <paetni1@gmail.com>2020-04-26 02:41:26 +0200
commit7bb0aa74884d026bb6a0192bd2c4d0fb43f2953b (patch)
tree7f339bb25c46f856e8f37da9acf4dfb7158c0c4b /client/components/cards/cardDetails.js
parentfe7398faef9670ff9a1885c37673beec148faed8 (diff)
downloadwekan-7bb0aa74884d026bb6a0192bd2c4d0fb43f2953b.tar.gz
wekan-7bb0aa74884d026bb6a0192bd2c4d0fb43f2953b.tar.bz2
wekan-7bb0aa74884d026bb6a0192bd2c4d0fb43f2953b.zip
Additional vote features
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');
+ },
},
];
},