mirror of
https://github.com/discourse/discourse.git
synced 2025-03-22 17:45:34 +08:00
Trivial changes to poll plugin, including a small typo fix.
This commit is contained in:
parent
90430eda62
commit
8be37193ee
@ -1,8 +1,8 @@
|
|||||||
export default Em.Controller.extend({
|
export default Ember.Controller.extend({
|
||||||
isMultiple: Em.computed.equal("poll.type", "multiple"),
|
isMultiple: Ember.computed.equal("poll.type", "multiple"),
|
||||||
isNumber: Em.computed.equal("poll.type", "number"),
|
isNumber: Ember.computed.equal("poll.type", "number"),
|
||||||
isRandom : Em.computed.equal("poll.order", "random"),
|
isRandom : Ember.computed.equal("poll.order", "random"),
|
||||||
isClosed: Em.computed.equal("poll.status", "closed"),
|
isClosed: Ember.computed.equal("poll.status", "closed"),
|
||||||
|
|
||||||
// shows the results when
|
// shows the results when
|
||||||
// - poll is closed
|
// - poll is closed
|
||||||
|
@ -20,7 +20,7 @@ export default {
|
|||||||
|
|
||||||
// listen for back-end to tell us when a post has a poll
|
// listen for back-end to tell us when a post has a poll
|
||||||
messageBus.subscribe("/polls", data => {
|
messageBus.subscribe("/polls", data => {
|
||||||
const post = container.lookup("controller:topic").get('modee.postStream').findLoadedPost(data.post_id);
|
const post = container.lookup("controller:topic").get('model.postStream').findLoadedPost(data.post_id);
|
||||||
// HACK to trigger the "postViewUpdated" event
|
// HACK to trigger the "postViewUpdated" event
|
||||||
Em.run.next(_ => post.set("cooked", post.get("cooked") + " "));
|
Em.run.next(_ => post.set("cooked", post.get("cooked") + " "));
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user