From 8dad928557fd52192392143d7a12612ceecb8997 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Thu, 19 Dec 2013 17:01:22 +0100 Subject: [PATCH] Add setupTopicController event --- app/assets/javascripts/discourse/routes/topic_route.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/routes/topic_route.js b/app/assets/javascripts/discourse/routes/topic_route.js index 5e922405387..8c5b68e0ce5 100644 --- a/app/assets/javascripts/discourse/routes/topic_route.js +++ b/app/assets/javascripts/discourse/routes/topic_route.js @@ -128,10 +128,13 @@ Discourse.TopicRoute = Discourse.Route.extend({ editingTopic: false }); + Discourse.TopicRoute.trigger('setupTopicController', this); + this.controllerFor('header').setProperties({ topic: model, showExtraInfo: false }); + this.controllerFor('composer').set('topic', model); Discourse.TopicTrackingState.current().trackIncoming('all'); controller.subscribe(); @@ -142,4 +145,4 @@ Discourse.TopicRoute = Discourse.Route.extend({ }); - +RSVP.EventTarget.mixin(Discourse.TopicRoute);