mirror of
https://github.com/discourse/discourse.git
synced 2025-09-11 21:04:42 +08:00
UX: Vote now button to show up as primary once options have been selected.
This commit is contained in:
parent
87b52e4cea
commit
33a628b0b0
2 changed files with 6 additions and 1 deletions
|
@ -107,6 +107,11 @@ export default Ember.Controller.extend({
|
||||||
|
|
||||||
castVotesDisabled: Em.computed.not("canCastVotes"),
|
castVotesDisabled: Em.computed.not("canCastVotes"),
|
||||||
|
|
||||||
|
@computed("castVotesDisabled")
|
||||||
|
castVotesButtonClass(castVotesDisabled) {
|
||||||
|
return `cast-votes ${castVotesDisabled ? '' : 'btn-primary'}`;
|
||||||
|
},
|
||||||
|
|
||||||
@computed("loading", "post.user_id", "post.topic.archived")
|
@computed("loading", "post.user_id", "post.topic.archived")
|
||||||
canToggleStatus(loading, userId, topicArchived) {
|
canToggleStatus(loading, userId, topicArchived) {
|
||||||
return this.currentUser &&
|
return this.currentUser &&
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
<div class="poll-buttons">
|
<div class="poll-buttons">
|
||||||
{{#if isMultiple}}
|
{{#if isMultiple}}
|
||||||
{{#unless hideResultsDisabled}}
|
{{#unless hideResultsDisabled}}
|
||||||
{{d-button class="cast-votes" title="poll.cast-votes.title" label="poll.cast-votes.label" disabled=castVotesDisabled action="castVotes"}}
|
{{d-button class=castVotesButtonClass title="poll.cast-votes.title" label="poll.cast-votes.label" disabled=castVotesDisabled action="castVotes"}}
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue