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/latest-topic-list-item.js.es6
2019-05-27 10:15:39 +02:00

29 lines
626 B
JavaScript

import {
showEntrance,
navigateToTopic
} from "discourse/components/topic-list-item";
export default Ember.Component.extend({
attributeBindings: ["topic.id:data-topic-id"],
classNameBindings: [
":latest-topic-list-item",
"topic.archived",
"topic.visited"
],
showEntrance,
navigateToTopic,
click(e) {
// for events undefined has a different meaning than false
if (this.showEntrance(e) === false) {
return false;
}
return this.unhandledRowClick(e, this.topic);
},
// Can be overwritten by plugins to handle clicks on other parts of the row
unhandledRowClick() {}
});