mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Revert In Progress additional vote features. Translations are not removed.
Thanks to xet7 ! Related https://github.com/wekan/wekan/pull/3048
This commit is contained in:
parent
8ef435c83e
commit
ee106d1cb4
5 changed files with 37 additions and 61 deletions
|
|
@ -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');
|
||||
},
|
||||
},
|
||||
];
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue