Varsii
April 28, 2020, 2:30pm
1
Hi all
I was wondering how can I add a call method when clicking on the ‘reply’ button in some topic? I want to add some message to pop-up if some conditions are true.
Thank you.
Canapin
(Coin-coin le Canapin)
October 4, 2020, 1:44pm
2
I’m also interested in this.
hawm
(Hawm)
October 4, 2020, 4:58pm
3
I think api.onAppEvent("page:compose-reply", callback) should work
.catch(popupAjaxError);
},
editFirstPost() {
this.model
.firstPost()
.then((firstPost) => this.send("editPost", firstPost));
},
// Post related methods
replyToPost(post) {
const composerController = this.composer;
const topic = post ? post.get("topic") : this.model;
const quoteState = this.quoteState;
const postStream = this.get("model.postStream");
this.appEvents.trigger("page:compose-reply", topic);
if (!postStream || !topic || !topic.get("details.can_create_post")) {
return;
}
Canapin
(Coin-coin le Canapin)
October 4, 2020, 5:28pm
4
Thanks! It works indeed.
Couldn’ find the event for creating a new topic though.
hawm
(Hawm)
October 4, 2020, 5:43pm
5
Find the create-topic-button template and Class you may discove something, also Installing the Inspector - Ember Inspector - Ember Guides can help you resolve something like that.