UX: Vote now button to show up as primary once options have been selected.

This commit is contained in:
Guo Xiang Tan 2016-07-21 06:05:06 +08:00
parent 87b52e4cea
commit 33a628b0b0
2 changed files with 6 additions and 1 deletions

View File

@ -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 &&

View File

@ -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}}