Hola a todos
Me preguntaba cómo puedo agregar un método de llamada al hacer clic en el botón ‘Responder’ en algún tema. Quiero que aparezca un mensaje emergente si se cumplen ciertas condiciones.
Gracias.
Canapin
(Coin-coin le Canapin)
4 Octubre, 2020 13:44
2
También estoy interesado en esto.
hawm
(Hawm)
4 Octubre, 2020 16:58
3
Creo que api.onAppEvent("page:compose-reply", callback) debería funcionar
.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)
4 Octubre, 2020 17:28
4
¡Gracias! De hecho, funciona.
Sin embargo, no pude encontrar el evento para crear un nuevo tema.
hawm
(Hawm)
4 Octubre, 2020 17:43
5
Busca la plantilla y la clase create-topic-button; podrías descubrir algo. Además, Installing the Inspector - Ember Inspector - Ember Guides puede ayudarte a resolver algo así.