From 1b92d44fb2ecf08948337871da9a3eaa40255cbc Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 6 Jan 2017 10:45:48 -0500 Subject: [PATCH] FIX: A component referenced the controller --- .../discourse/components/topic-footer-mobile-dropdown.js.es6 | 5 ++--- .../discourse/templates/components/topic-footer-buttons.hbs | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/discourse/components/topic-footer-mobile-dropdown.js.es6 b/app/assets/javascripts/discourse/components/topic-footer-mobile-dropdown.js.es6 index 3ed113419e5..07ab1269982 100644 --- a/app/assets/javascripts/discourse/components/topic-footer-mobile-dropdown.js.es6 +++ b/app/assets/javascripts/discourse/components/topic-footer-mobile-dropdown.js.es6 @@ -38,7 +38,6 @@ export default Combobox.extend({ @observes('value') _valueChanged() { const value = this.get('value'); - const controller = this.get('parentView.controller'); const topic = this.get('topic'); const refresh = () => { @@ -48,7 +47,7 @@ export default Combobox.extend({ switch(value) { case 'invite': - controller.send('showInvite'); + this.attrs.showInvite(); refresh(); break; case 'bookmark': @@ -59,7 +58,7 @@ export default Combobox.extend({ refresh(); break; case 'flag': - controller.send('showFlagTopic'); + this.attrs.showFlagTopic(); refresh(); break; } diff --git a/app/assets/javascripts/discourse/templates/components/topic-footer-buttons.hbs b/app/assets/javascripts/discourse/templates/components/topic-footer-buttons.hbs index c717c0ebc02..ec1e9eac88f 100644 --- a/app/assets/javascripts/discourse/templates/components/topic-footer-buttons.hbs +++ b/app/assets/javascripts/discourse/templates/components/topic-footer-buttons.hbs @@ -17,7 +17,9 @@ {{#unless topic.isPrivateMessage}} {{#if site.mobileView}} - {{topic-footer-mobile-dropdown topic=topic}} + {{topic-footer-mobile-dropdown topic=topic + showInvite=showInvite + showFlagTopic=showFlagTopic}} {{else}} {{d-button class=bookmarkClass title=bookmarkTitle