mirror of
https://github.com/discourse/discourse.git
synced 2025-02-16 18:24:52 -06:00
FIX: clicking "show results" wasn't working after casting a vote
This commit is contained in:
parent
eff921d1ec
commit
8129cce104
@ -77,9 +77,7 @@ export default Em.Controller.extend({
|
||||
}.property("min", "max", "poll.options.length"),
|
||||
|
||||
canCastVotes: function() {
|
||||
if (this.get("isClosed") ||
|
||||
this.get("showingResults") ||
|
||||
this.get("loading")) {
|
||||
if (this.get("isClosed") || this.get("showingResults") || this.get("loading")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -137,7 +135,7 @@ export default Em.Controller.extend({
|
||||
options: this.get("selectedOptions"),
|
||||
}
|
||||
}).then(function(results) {
|
||||
self.setProperties({ vote: results.vote, showingResults: true });
|
||||
self.setProperties({ vote: results.vote, showResults: true });
|
||||
self.set("model", Em.Object.create(results.poll));
|
||||
}).catch(function() {
|
||||
bootbox.alert(I18n.t("poll.error_while_casting_votes"));
|
||||
|
@ -68,6 +68,8 @@ div.poll {
|
||||
|
||||
.results {
|
||||
|
||||
width: 100%;
|
||||
|
||||
.option {
|
||||
max-width: 90%;
|
||||
padding-right: 1.6em;
|
||||
@ -88,7 +90,6 @@ div.poll {
|
||||
.bar {
|
||||
height: 10px;
|
||||
background: $primary;
|
||||
transition: all 0.25s;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user