Add setupTopicController event

This commit is contained in:
Régis Hanol 2013-12-19 17:01:22 +01:00
parent 66afabcf4c
commit 8dad928557

View File

@ -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);