DEV: Upgrades to Ember 3.10 (#7871)

Co-Authored-By: majakomel <maja.komel@gmail.com>
This commit is contained in:
Joffrey JAFFEUX
2019-07-16 12:45:15 +02:00
committed by GitHub
parent e2fa5704e9
commit b3eb67976d
78 changed files with 332 additions and 263 deletions

View File

@ -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;
}
);
}
});