summaryrefslogtreecommitdiffstats
path: root/client/components/cards/cardDetails.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2020-04-27 02:54:40 +0300
committerLauri Ojansivu <x@xet7.org>2020-04-27 02:54:40 +0300
commitee106d1cb41b8e7b4ae757936f0f46688325f685 (patch)
tree96d68db8d0d2ec66094cae0363284340ccf1435d /client/components/cards/cardDetails.js
parent8ef435c83e48cbd3df9bf012d60c7833396c4e0a (diff)
downloadwekan-ee106d1cb41b8e7b4ae757936f0f46688325f685.tar.gz
wekan-ee106d1cb41b8e7b4ae757936f0f46688325f685.tar.bz2
wekan-ee106d1cb41b8e7b4ae757936f0f46688325f685.zip
Revert In Progress additional vote features. Translations are not removed.
Thanks to xet7 ! Related https://github.com/wekan/wekan/pull/3048
Diffstat (limited to 'client/components/cards/cardDetails.js')
-rw-r--r--client/components/cards/cardDetails.js23
1 files changed, 16 insertions, 7 deletions
diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js
index b8c7fa3f..f31c3890 100644
--- a/client/components/cards/cardDetails.js
+++ b/client/components/cards/cardDetails.js
@@ -54,7 +54,21 @@ 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());
@@ -987,18 +1001,13 @@ BlazeComponent.extendComponent({
evt.preventDefault();
const voteQuestion = evt.target.vote.value;
const publicVote = $('#vote-public').hasClass('is-checked');
- const allowNonBoardMembers = $('#vote-allow-non-members').hasClass('is-checked');
- this.currentCard.setVoteQuestion(voteQuestion, publicVote,allowNonBoardMembers);
+ this.currentCard.setVoteQuestion(voteQuestion, publicVote);
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');
- },
},
];
},