This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/components/featured-topic.js.es6

12 lines
305 B
JavaScript

export default Ember.Component.extend({
classNameBindings: [':featured-topic'],
click(e) {
const $target = $(e.target);
if ($target.closest('.last-posted-at').length) {
this.sendAction('action', {topic: this.get('topic'), position: $target.offset()});
return false;
}
}
});