Varsii
28 Aprile 2020, 2:30pm
1
Ciao a tutti
Mi chiedevo come si possa aggiungere un metodo di chiamata quando si clicca sul pulsante ‘rispondi’ in un argomento. Voglio far apparire un messaggio in una finestra di dialogo se alcune condizioni sono vere.
Grazie.
Canapin
(Coin-coin le Canapin)
4 Ottobre 2020, 1:44pm
2
Anch’io sono interessato a questo.
hawm
(Hawm)
4 Ottobre 2020, 4:58pm
3
Credo che api.onAppEvent("page:compose-reply", callback) dovrebbe funzionare
.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 Ottobre 2020, 5:28pm
4
Grazie! Funziona davvero.
Non sono riuscito a trovare l’evento per creare un nuovo argomento, però.
hawm
(Hawm)
4 Ottobre 2020, 5:43pm
5
Trova il template e la classe create-topic-button: potresti scoprire qualcosa. Inoltre, Installing the Inspector - Ember Inspector - Ember Guides può aiutarti a risolvere problemi simili.