mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 11:13:22 +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
|
@ -107,6 +107,11 @@ export default Ember.Controller.extend({
|
|||
|
||||
castVotesDisabled: Em.computed.not("canCastVotes"),
|
||||
|
||||
@computed("castVotesDisabled")
|
||||
castVotesButtonClass(castVotesDisabled) {
|
||||
return `cast-votes ${castVotesDisabled ? '' : 'btn-primary'}`;
|
||||
},
|
||||
|
||||
@computed("loading", "post.user_id", "post.topic.archived")
|
||||
canToggleStatus(loading, userId, topicArchived) {
|
||||
return this.currentUser &&
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
<div class="poll-buttons">
|
||||
{{#if isMultiple}}
|
||||
{{#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}}
|
||||
{{/if}}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user