summaryrefslogtreecommitdiffstats
path: root/client
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
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')
-rw-r--r--client/components/cards/cardDetails.jade13
-rw-r--r--client/components/cards/cardDetails.js23
-rw-r--r--client/components/cards/cardTime.jade7
-rw-r--r--client/components/cards/minicard.jade2
4 files changed, 23 insertions, 22 deletions
diff --git a/client/components/cards/cardDetails.jade b/client/components/cards/cardDetails.jade
index b4259ae6..ae97e0e9 100644
--- a/client/components/cards/cardDetails.jade
+++ b/client/components/cards/cardDetails.jade
@@ -212,8 +212,6 @@ template(name="cardDetails")
else
.card-label.card-label-green {{ voteCountPositive }}
.card-label.card-label-red {{ voteCountNegative }}
- unless ($and currentBoard.isPublic voteAllowNonBoardMembers )
- .card-label.card-label-gray {{ voteCount }} {{_ 'r-of' }} {{ currentBoard.activeMembers.length }}
+viewer
= getVoteQuestion
button.card-details-green.js-vote.js-vote-positive(class="{{#if voteState}}voted{{/if}}") {{_ 'vote-for-it'}}
@@ -574,15 +572,12 @@ template(name="cardStartVotingPopup")
.fields
label(for="vote") {{_ 'vote-question'}}
input.js-vote-field#vote(type="text" name="vote" value="{{card.getVoteQuestion}}" autofocus)
- .check-div
- a.flex.js-toggle-vote-public
+ label(for="vote-public") {{_ 'vote-public'}}
+ a.js-toggle-vote-public
.materialCheckBox#vote-public(name="vote-public")
- span {{_ 'vote-public'}}
- .check-div
- a.flex.js-toggle-vote-allow-non-members
- .materialCheckBox#vote-allow-non-members(name="vote-allow-non-members")
- span {{_ 'allowNonBoardMembers'}}
+
button.primary.confirm.js-submit {{_ 'save'}}
+ //- button.js-remove-color.negate.wide.right {{_ 'delete'}}
template(name="positiveVoteMembersPopup")
ul.pop-over-list.js-card-member-list
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');
- },
},
];
},
diff --git a/client/components/cards/cardTime.jade b/client/components/cards/cardTime.jade
index 177b689f..8af8c414 100644
--- a/client/components/cards/cardTime.jade
+++ b/client/components/cards/cardTime.jade
@@ -4,10 +4,9 @@ template(name="editCardSpentTime")
.fields
label(for="time") {{_ 'time'}}
input.js-time-field#time(type="number" step="0.01" name="time" value="{{card.getSpentTime}}" placeholder=timeFormat autofocus)
- .check-div
- a.flex.js-toggle-overtime
- .materialCheckBox#overtime(class="{{#if getIsOvertime}}is-checked{{/if}}" name="overtime")
- span {{_ 'overtime'}}
+ label(for="overtime") {{_ 'overtime'}}
+ a.js-toggle-overtime
+ .materialCheckBox#overtime(class="{{#if getIsOvertime}}is-checked{{/if}}" name="overtime")
if error.get
.warning {{_ error.get}}
diff --git a/client/components/cards/minicard.jade b/client/components/cards/minicard.jade
index 79dd9127..b6ccd4d7 100644
--- a/client/components/cards/minicard.jade
+++ b/client/components/cards/minicard.jade
@@ -103,9 +103,7 @@ template(name="minicard")
if getVoteQuestion
.badge.badge-state-image-only(title=getVoteQuestion)
span.badge-icon.fa.fa-thumbs-up
- span.badge-text {{ voteCountPositive }}
span.badge-icon.fa.fa-thumbs-down
- span.badge-text {{ voteCountNegative }}
if attachments.count
.badge
span.badge-icon.fa.fa-paperclip