mirror of
https://github.com/discourse/discourse.git
synced 2025-06-07 09:48:45 +08:00
DEV: Upgrades to Ember 3.10 (#7871)
Co-Authored-By: majakomel <maja.komel@gmail.com>
This commit is contained in:
@ -4,19 +4,23 @@ export default Ember.Component.extend({
|
||||
classNames: ["table", "staff-actions"],
|
||||
|
||||
willDestroyElement() {
|
||||
this.$().off("click.discourse-staff-logs");
|
||||
$(this.element).off("click.discourse-staff-logs");
|
||||
},
|
||||
|
||||
didInsertElement() {
|
||||
this._super(...arguments);
|
||||
|
||||
this.$().on("click.discourse-staff-logs", "[data-link-post-id]", e => {
|
||||
let postId = $(e.target).attr("data-link-post-id");
|
||||
$(this.element).on(
|
||||
"click.discourse-staff-logs",
|
||||
"[data-link-post-id]",
|
||||
e => {
|
||||
let postId = $(e.target).attr("data-link-post-id");
|
||||
|
||||
this.store.find("post", postId).then(p => {
|
||||
DiscourseURL.routeTo(p.get("url"));
|
||||
});
|
||||
return false;
|
||||
});
|
||||
this.store.find("post", postId).then(p => {
|
||||
DiscourseURL.routeTo(p.get("url"));
|
||||
});
|
||||
return false;
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user