mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 01:50:41 +08:00
Add setupTopicController event
This commit is contained in:
parent
66afabcf4c
commit
8dad928557
|
@ -128,10 +128,13 @@ Discourse.TopicRoute = Discourse.Route.extend({
|
||||||
editingTopic: false
|
editingTopic: false
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Discourse.TopicRoute.trigger('setupTopicController', this);
|
||||||
|
|
||||||
this.controllerFor('header').setProperties({
|
this.controllerFor('header').setProperties({
|
||||||
topic: model,
|
topic: model,
|
||||||
showExtraInfo: false
|
showExtraInfo: false
|
||||||
});
|
});
|
||||||
|
|
||||||
this.controllerFor('composer').set('topic', model);
|
this.controllerFor('composer').set('topic', model);
|
||||||
Discourse.TopicTrackingState.current().trackIncoming('all');
|
Discourse.TopicTrackingState.current().trackIncoming('all');
|
||||||
controller.subscribe();
|
controller.subscribe();
|
||||||
|
@ -142,4 +145,4 @@ Discourse.TopicRoute = Discourse.Route.extend({
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
RSVP.EventTarget.mixin(Discourse.TopicRoute);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user